Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme
-----------------------------------------------------------------------
Key: WW-2311
URL: https://issues.apache.org/struts/browse/WW-2311
Project: Struts 2
Issue Type: New Feature
Components: Plugin - Dojo Tags
Reporter: Sami Dalouche
Attachments: dojo.tar.gz
It would be nice to have a set of Dojo taglib templates that :
1] are (X)HTML compliant (no non-standard dojoType=.. attribute)
2] follow the Progressive Javascript enhancement philosophy
(http://domscripting.com/presentations/xtech2006/) : the tags should fallback
to pure HTML mechanisms without javascript
I have attached what I consider the starting point of this : a few templates,
based on the css_xhtml theme on which I have added dojo/dijit programmatic
calls to enhance the html widgets.
For instance, the textfield template (text.ftl) is exactly the same as
css_xhtml's text.ftl, except that it can "enhance" the HTML text field into :
- a CurrencyTextBox
- a NumberTextBox
- a ValidationTextBox
- a NumberSpinner
(I currently use non documented taglib attributes to do that, so the templates
are only useable from Freemarker views...)
So, you would create a number spinner like that :
<@s.textfield
theme="dojo"
labelposition="left"
label="%{getText('labelblabla')}"
required="true"
name="numberOfWhatever"
dojoType="NumberSpinner"
dojoMinConstraint="1"
/>
What is currently missing :
- a LOT of dijit's parameters are not exposed (constraints, etc)
- a LOT of widjits are not exposed (tree, ajax grid, etc..)
- the creation of dojo's overrides should probably be completly computer in
Freemarker / Java to create a compact JS representation, instead of currently
relying on javascript to create this variable and progressively populate it
Feel free to reuse this work under whatever license suits you.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.