I tried using the beanclass attribute of the <stripes:useActionBean> tag, 
but it did not solve my problem.

Clearly all the input tags are picking up as their defaults the most recent 
value set in the {actionBean} i.e. the most recently-set value, whichever 
bean was used.  That is not what I need.  I need the page to retain all the 
properties of two distinct action beans.  Calling one form changes the 
properties of its own action bean, but the properties of the other action 
bean must be separately retained for later use.  The properties of the 
second bean must not change even if the first bean is changed several times.

The comment about an input tag picking up their values from the Action Bean 
to which it is linked is actually "cart before the horse" as far as my 
problem is concerned.  What I have so far failed to do is control which 
Action Bean is linked to which input tag, given that the default setting is 
not what I need.

Gary
----- Original Message ----- 
From: "Freddy D." <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, April 12, 2008 2:49 AM
Subject: Re: [Stripes-users] Using Multiple Forms on the same JSP page


> Hi Gary,
>
> It depends what you're trying to do, but hopefully the following
> information will be of some help.
>
> - The Quick Start example indicates that
> - ${actionBean} can be used if there is just one ActionBean on the
> - page, but does not mention the case where there are many.
>
> Actually, ${actionBean} refers to the Action Bean that handled the
> last request, providing that you linked to an Action Bean, not to a
> JSP. You can have multiple forms in a JSP pointing to different Action
> Beans, but there can only be one Action Bean that handled the last
> request.
>
> - So all the properties of all the action
> - beans must be available throughout the page, even outside the forms
> - in which they are used.
> -
> - Each maps is slightly different, but obviously they
> - all have many common properties (width and height of the map display,
> - line width, color and opacity etc).  So the different action beans do
> - have many properties with the same name and data type.
>
> You could have a base Action Bean that contains all the properties
> that are common, and have other Action Beans extend the base and add
> the properties that are specific to them.
>
> - The  <stripes:text> tags were not picking up the values which had
> - previously been set in the corresponding Action Bean, indeed they
> - were not picking up any default values at all (I am using
> - BeanFirstPopulationStrategy to allow the ActionBeans to set default
> - values for their properties on exit).
>
> If you link to an Action Bean and use BFPS, <s:text
> name="someProperty"/> should pick up the value of someProperty from
> the Action Bean to which you linked. If the property is on the base
> Action Bean, it should work regardless of which subclass was the
> target.
>
> For your multiple forms, you can just have multiple <s:form> tags each
> with their own beanclass= attribute. You can indicate the Action Bean
> class name, or ${actionBean.class} to create a form that submits to
> the last used Action Bean.
>
> Hope that helps. Let me know if you're still having problems.
>
> Cheers,
> Freddy
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
> 


-- 
I am using the free version of SPAMfighter for private users.
It has removed 1360 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len




-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to