Well if it were me, I'd put all that stuff into some sort of persisted
bean on the server side, so all you'd need on the page is the database
key - a single parameter.  Then the bean could evolve as much as you
need it to, and the pages wouldn't ever have to change, and nor would
the annotations on different action beans using the same information.


On Fri, Apr 20, 2012 at 8:34 AM, bastian stephane
<stephane.bast...@monpetitguide.com> wrote:
> Mike McNally <emmecinque@...> writes:
>
>>
>> > Does it make sense to others people?
>>
>> Not really. If you know what the parameters are when typing in the
>> annotation, why can't you just set them as the default values of the
>> action bean properties?
>>
>
> Mike,
>
> Our use-case for it is building an ActionBean allowing to search products 
> based
> on some criterias. When we first started to build the bean and jsp we would 
> only
> filter on price and category. Each time we would generate a link for this
> actionBean we would do something like this in the jsp:
>
> <stripes:url actionBean="SearchProductActionBean">
>  <!-- the following parameters must be there for * all links* -->
>  <stripes:param name="price" value="${actionBean.price}"/>
>  <stripes:param name="category" value="${actionBean.category}"/>
>
>  <!-- param name/value specific -->
>  <stripes:param name="category" value="${actionBean.xxx}"/>
> </stripes:url>
>
> Then we started to add more filters (dates, brand, model...)
> we had to modify *all url tags* in our jsp to add the common params:
>
> <stripes:url actionBean="SearchProductActionBean">
>  <!-- the following parameters must be there for * all links* -->
>  <stripes:param name="price" value="${actionBean.price}"/>
>  <stripes:param name="category" value="${actionBean.category}"/>
>  <stripes:param name="date" value="${actionBean.date}"/>
>  <stripes:param name="brand" value="${actionBean.brand}"/>
>  <stripes:param name="model" value="${actionBean.model}"/>
>
>  <!-- param name/value specific -->
>  <stripes:param name="category" value="${actionBean.xxx}"/>
> </stripes:url>
>
> It definitely works but is a pain to maintain. What we do now is include
> a jsp containing only the common parameters and stuff this inside the url Tag.
>
> However we also have java code in the model which returns urls  as well...
> We came up top the conclusion that we had to put all this in one place (DRY
> principle)
> The controller is probably the best place for it
>
> Still doesn't make sens?
>
>
>
>
>
> Stephane
>
>
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to