[ http://mc4j.org/jira/browse/STS-307?page=comments#action_10520 ]
Andy commented on STS-307:
--------------------------
(Tim, please correct/verify me)
Actually, multiple forms in the same screen is already supported. This is
because Stripes mainly passes action beans on request attributes named after
the binding (such as "/xxx/One.action").
Something like
<stripes:form action="/xxx/One.action">
<stripes:text name="propOne"/>
</stripes:form>
<stripes:form action="/xxx/Two.action">
<stripes:text name="propTwo"/>
</stripes:form>
will, for repopulation purposes, use
((OneActionBean)request.getAttribute("/xxx/One.action")).getPropOne()
and
((TwoActionBean)request.getAttribute("/xxx/Two.action")).getPropTwo()
The name "actionBean" is just a convenient alias that is set to point to THE
bean. This only applies if the user goes to URL something.action and not
something.jsp directly.
If you do not like the name "actionBean", you can always assign yet another
alias like this:
<stripes:useActionBean binding="/xxx/One.action" var="ab"/>
This will allow you to refer to the bean as "ab" from this point onward.
Additionally, if the action bean was not in the request attribute
"/xxx/One.action" yet, it will be instantiated without running any event.
(Check the taglib documentation for more powerful uses of the tag.)
> Remove dependancy on "actionBean" request attribute
> ---------------------------------------------------
>
> Key: STS-307
> URL: http://mc4j.org/jira/browse/STS-307
> Project: Stripes
> Issue Type: New Feature
> Components: ActionBean Dispatching
> Reporter: Frank Das
> Assigned To: Tim Fennell
>
> There doesn't seem to be a way of naming an action bean in the request
> attribute. They are all called "actionBean". It would be nice if Stripes had
> a new annotation that allowed you to name the request attribute you wanted to
> use to store the action bean in. Also, add an optional attribute to Stripes
> tags to allow you to specify an action bean name. The advantages of doing so
> are:
> - The controller becomes optionally decoupled from the view. This allows me
> to mix technologies. eg. Use Stripes only as a controller or only as a taglib.
> - Multiple forms can be associated with a single screen.
> - Allowing a bean name attribute on the tags would make it easier to migrate
> from Struts.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development