[ 
https://issues.apache.org/struts/browse/WW-2505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeromy Evans closed WW-2505.
----------------------------

    Resolution: Duplicate

This is facilitated by JSP 2.0 dynamic attributes. 

Support has been added to most(?) Struts2 tags already (since 2.0.9 or earlier) 
within the tag implementation.  
See WW-2132 and WW-2092 tracking this issue.

At this time however, the DTD does not enable dynamic attributes and an 
alternate DTD is not provided.  You must either disable validation against the 
DTD or create a custom DTD to enable dynamic attributes on the tags of interest.

When enabled, dynamic attributes are used as such:
<s:textfield name="user.username" dojoType="dijit.form.TextBox">

> Tag does not support Dojo specified field name, like "dojoType"
> ---------------------------------------------------------------
>
>                 Key: WW-2505
>                 URL: https://issues.apache.org/struts/browse/WW-2505
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.0.9
>            Reporter: James Y.J.
>            Priority: Minor
>
> First of all, thank you guys for your great work. I like Struts2.
> Last night, I found I could not use my <s:textfield /> to generate HTML code 
> like: <input type="text" length="10" name="grossIncome"  
> dojoType="dijit.form.TextBox">.
> There is no field named "dojoType" in <s:textfield/>.
> It would be wonderful if I can use  <s:textfield/> in this way:
> <s:textfield name="user.username">
>     <s:add name="dojoType" value="dijit.form.TextBox" />
> </s:textfield>
> <s:add /> tag adds custom field to the genrated HTML.
> I am using 2.0.9 right now. Don't know whether 2.0.9+ already makes it 
> possible.
> That will be the best.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to