From memory, I believe that Stripes binds in order of parameter name
length. Shortest first.
/Jeppe
On 30/08/2008, at 07.06, sboulay wrote:
>
> What is the binding order when a form is submitted? I came across an
> example
> in the Stripes book (which is a very nice read) that had a form with a
> hidden field that contained the object that was being edited. When
> the form
> is submitted for update the action bean form checks to see if the id
> is
> null, if it's not it reads it from the database and uses that model
> object
> to back the form.
>
> ActionBean
> ---------------------------------
>
> private Integer contactId;
> public Integer getContactId() {
> return contactId;
> }
> public void setContactId(Integer id) {
> contactId = id;
> }
>
> public Contact getContact() {
> if (contactId != null) {
> return contactDao.read(contactId);
> }
> return contact;
> }
>
> Is there any guarantee that the hidden form value (contactId) would
> be set
> on the ActionBean before getContact is called? Is it the form order
> that
> determines this? I have no idea.
>
> Thanks
> -Serge-
> --
> View this message in context:
> http://www.nabble.com/Stripes-book-example-question-tp19213699p19213699.html
> Sent from the stripes-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users