TextArea.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. define("dojox/mobile/TextArea", [
  2. "dojo/_base/declare",
  3. "dojo/dom-construct",
  4. "./TextBox"
  5. ], function(declare, domConstruct, TextBox){
  6. /*=====
  7. TextBox = dojox.mobile.TextBox;
  8. =====*/
  9. return declare("dojox.mobile.TextArea",TextBox, {
  10. // summary:
  11. // Non-templated TEXTAREA widget.
  12. //
  13. // description:
  14. // A textarea widget that wraps an HTML TEXTAREA element.
  15. // Takes all the parameters (name, value, etc.) that a vanilla textarea takes.
  16. //
  17. // example:
  18. // | <textarea dojoType="dojox.mobile.TextArea">...</textarea>
  19. baseClass: "mblTextArea",
  20. postMixInProperties: function(){
  21. // Copy value from srcNodeRef, unless user specified a value explicitly (or there is no srcNodeRef)
  22. // TODO: parser will handle this in 2.0
  23. if(!this.value && this.srcNodeRef){
  24. this.value = this.srcNodeRef.value;
  25. }
  26. this.inherited(arguments);
  27. },
  28. buildRendering: function(){
  29. if(!this.srcNodeRef){
  30. this.srcNodeRef = domConstruct.create("textarea", {});
  31. }
  32. this.inherited(arguments);
  33. }
  34. });
  35. });