On 02/10/2012 02:55 PM, Poitras Christian wrote:
> Hi,
>
> To answer to your questions:
> 1. Yes, it's the intended behaviour. As it's specified in most Stripes' tags
> like text
> (http://stripes.sourceforge.net/docs/current/taglib/stripes/text.html),
> Stripes tag uses the value attribute only if the ActionBean's properties is
> unavailable.
> 2. As you can see in the best practices page
> (http://www.stripesframework.org/display/stripes/Best+Practices), it's
> recommended to pre-populate domain objects using @Before. I suggest you do
> the same thing for all ActionBean's pre-population. It greatly simplifies the
> initialisation of fields in JSPs.
I have an interface with a property:
interface SomeInterface
{
public void setProperty(String value);
}
And an ActionBean that gets this interface as a parameter from URL like
this: My.action?someInterface.someProperty=someValue
class MyActionBean implements ActionBean
{
public SomeInterface someInterface;
// ...
}
Now of course due to the nature of an interface stripes can't
instantiate the interface. But from the value of someProperty I can
derive the information which class is needed. Thus I wrote a converter
that looks at the value, creates an object of appropriate type and
populates the property. Unfortunately this means that I gave to change
to URL above to the following:
My.action?someInterface=someValue
This seemed to be really smart to me but: If I access a value for
reading in my JSP, then I the path to my variable is
someInterface.someProperty, but in the URL it is just someInterface in
order to trigger the converter.
Well, I can think of a couple of ways to change my structure. I hoped I
could implement it like described with stripes form-tags...
>
> Christian
Thomas
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users