source: Dev/branches/rest-dojo-ui/client/dojox/mobile/TextArea.js @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

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