Hi Alex,
if i would take your code and try to change something,
i would lose some time to find where this damn select options come from,
of course getter would be the last place to check.
That's the only real con that i can think of.

Best greetings,
Paweł Wielgus.


2010/3/30 Alex Rodriguez Lopez <alo...@flordeutopia.pt>:
> Hi to all,
>
> as I learn more things about S2 some questions emerge about best practices
> more experiences users might know how to do best.
>
> I believe it is a common problem having to populate fields like selects
> first thing (with data from DB or stored in session) before any task is
> done.
>
> This is accomplished by the prepare() method, but I have been doing this too
> directly in getters, so when the form wants the list data they are called
> and if necessary retrieve data from session or DB (all in the getter from
> that property, usually lists for selects).
>
> So why sould I use prepare() to populate things or do it directly in
> getters? What do you use to accomplish this? Advantages of either method?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to