You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Sami Dalouche (JIRA)" <ji...@apache.org> on 2007/11/10 10:58:34 UTC

[jira] Created: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

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.


[jira] Commented: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

Posted by "Sami Dalouche (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43207#action_43207 ] 

Sami Dalouche commented on WW-2311:
-----------------------------------

BTW, I am wondering : what is the struts-preferred way to generate the JavaScript code that is needed to create the widgets ? For instance, when writing the javascript manually, it is often necessary to write stuff such as :

dijit.create(WidgetClass, { param1 : "bla", param2 : "bli" };

When generating this code with freemarker, I have found it much more easier (to avoid handling the commas) to generate code such as :
params = {};
param.param1 = "bla";
param.param2 = "bli";

Which way do you guys prefer ? readable ftl files or readable generated JS ?

> 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
>             Fix For: Future
>
>         Attachments: dojo.tar.gz, funala.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.


[jira] Updated: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

Posted by "Sami Dalouche (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sami Dalouche updated WW-2311:
------------------------------

    Attachment: dojo.tar.gz

> 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.


[jira] Updated: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-2311:
--------------------------

    Fix Version/s:     (was: 2.1.1)
                   Future

This looks pretty cool, but will take a lot more work to integrate.  I'd recommend creating a new plugin, patterned after the dojo plugin, which could surpass the dojo plugin or at least become the dojo plugin's 2.0.

> 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
>             Fix For: Future
>
>         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.


[jira] Resolved: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-2311.
---------------------------------

    Resolution: Won't Fix

The dojo plugin is deprecated, as Don said, I would recommend to write a plugin and register it in the plugin registry

> 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
>             Fix For: Future
>
>         Attachments: dojo.tar.gz, funala.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.


[jira] Commented: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

Posted by "Tsemach Hadad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42856 ] 

Tsemach Hadad commented on WW-2311:
-----------------------------------

It would be great if we could enjoy both worlds:
1. Dojo Toolkit 1.00 on Client
2. Struts 2.00 on Backend
Concpetually Framework can't wrap all other framework's components , and should supply
in some manner ability to expand other widgets with other parameters without the need to couple it
to a tag I think s:component fails to this category , not sure if it's enough I'll have to dig it

> 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.


[jira] Updated: (WW-2311) Dojo 1.0.0 support with Progressive Javascript Enhancement Plugin/Theme

Posted by "Sami Dalouche (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sami Dalouche updated WW-2311:
------------------------------

    Attachment: funala.tar.gz

Here's the new version (funala.tar.gz) of my theme  that has been updated to work with Struts 2.1.x 

So, any work toward porting the dojo plugin to dojo 1.0 should probably start from this version.



> 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
>             Fix For: Future
>
>         Attachments: dojo.tar.gz, funala.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.