Grid in form and pager

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Grid in form and pager

Adriaan Joubert-3
Hi,

putting a grid in a form is really fantastically simple. I have one
issue though: if a user modifies some fields on one page and then goes
to the next using the pager, the changes are lost (there is no submit
of the form). I can see why it was implemented this way, but believe
that this is going to cause problems for users, as they will see their
changes disappear. Is there an easy way to force a submit with the
page navigation? Seems to me that it is going to be tricky to both
navigate and submit data in the same request? Only solution I could
think of up to now is to use javascript on the fields to force a
submit when fields are modified, but this is not ideal.

Thanks,

Adriaan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Grid in form and pager

Francois Armand
Adriaan Joubert wrote:
> Hi,
>  
Hello
> [...] Is there an easy way to force a submit with the
> page navigation? Seems to me that it is going to be tricky to both
> navigate and submit data in the same request? Only solution I could
> think of up to now is to use javascript on the fields to force a
> submit when fields are modified, but this is not ideal.
>  
I had the kind of issue in a rather similar context : a composed form
where some fields may be add or deleted while other have been edited but
not yet commited. I believe there is no other way to handle the problem
that submitting the form and perhaps chain this validation with an other
action (in my case add/delete a field, in your case : change the grip
current page).

So, the javascript solution seems to be the way to go if the action is
done by a link, what is the case in the grid's pager, but well, it's not
really "beautifull degradation friendly" (no javascript => no submit).
In my case, I choose to do action with a submit button + a context value
passed thanks to an hidden field. It's a lot heavier to implement, and
I'm not quite satisfied with it. Nonetheless, if you want to see how it
works, here is the "submit with context" component :
http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-common/trunk/src/main/java/org/interldap/wui/t5lib/components/SubmitContext.java?rev=672&view=markup
and an example of use is here :
http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-common/trunk/src/main/resources/org/interldap/wui/t5lib/components/ListEditor.tml?rev=547&view=markup

Note : I will be very happy with other solution to this very problem :)

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/
Open Source identities management and federation


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Grid in form and pager

Adriaan Joubert-3
Thanks for the example, Francois. I'll have a play with these ideas
and see how I get on.

Cheers,

Adriaan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]