Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#2770 closed enhancement (invalid)

expose sourceNode in dijit for templates.

Reported by: guest Owned by: bill
Priority: low Milestone:
Component: Widgets Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

in current dojo, stuff from the sourceNode like name, and style attributes are not respected. So in theory you can from a template do: <input type="text" name=${this.sourceNode.name} style="blink: true, ${this.sourceNode.style}" >

and it would pull the values from the sourceNode on the widget, so that widgets can respect the things the users send it. (provided it's a well behaved widget!)

Change History (2)

comment:1 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed
Type: defectenhancement

The sourceNode is available through this.srcNodeRef, but you should be using the standard widget parameter system (see the manual for details, or just at any widget definition) for parameters like name.

mywidget.js:

dojo.declare(...
   name: "",

mywidget.html:

...name=${name}...

The style information is already respected, at least position:absolute, top:10px, left: 30px type settings.

comment:2 Changed 12 years ago by (none)

Milestone: 0.9M2

Milestone 0.9M2 deleted

Note: See TracTickets for help on using tickets.