[
https://issues.apache.org/jira/browse/WW-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rene Gielen resolved WW-3285.
-----------------------------
Resolution: Won't Fix
Fix Version/s: (was: 2.5)
2.3.2
Assignee: Rene Gielen
I neither see a usecase for this, nor do I think this would be a way to work in
Struts 2. You may want to rethink if your Action together with OGNL expressions
makes for the kind of builder you are looking for.
Nevertheless, while we won't put it in core, feel free to build your own
extension tag library - this easy and clean.
> Improve flexibility for optGroup tag in Struts 2
> ------------------------------------------------
>
> Key: WW-3285
> URL: https://issues.apache.org/jira/browse/WW-3285
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.1.8
> Reporter: Thang Minh Le
> Assignee: Rene Gielen
> Priority: Minor
> Fix For: 2.3.2
>
>
> It would be nice if optGroup tag can support this:
> <s:optGroup
> builderClass="com.test.OptionBuilderImpl"
> builderArgs="prop1:value1;prop2:value2;prop3:value3"
> visitorClass="com.test.OptionVisitorImpl"
> visitorArgs="prop3:value3;prop4:value4"
> />
> Attributes:
> - builderClass: accepts class name
> - builderArgs: accepts list of values in pair (key and value) separated by
> semicolon ";"
> - visitorClass: similar as in builderClass
> - visitorArgs: similar as in builderArgs
> Roles:
> - builder class is to build option list
> - visitor class is to perform any change (modify/delete/add) to option list
> produced by builder class. But visit class should not overlap the role of
> builder class
> OptGroup takes a role as controller which will perform these:
> 1) Use reflection to create instance of class defined "builderClass"
> 2) Load values in builderArgs to Properties and set this properties to
> builder class
> 3) Execute builder class
> 4) Set option list returned from step 3 to optGroup
> 5) Construct visitor class instance
> 6) Load values in visitorArgs to Properties and set this properties to
> visitor class
> 7) execute visit(OptGroup options)
> Since optGroup is creating builder class and visitor instances, whatever
> environment information accessible from optGroup should make available to
> builderClass and visitorClass (PageContext is one of a good candidate).
> It is great to make this improvement on both Struts1& Struts2. If this
> improvement is going to be done, please make sure JSP Container doesn't
> recompile jsp page using optGroup tag every time it gets loaded.
> Looking forward to your comments.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira