WHat I do is to have the button call a JavaScript function that stores
the context/value in a hidden field (a normal TextField with display:
none, since Tapestry's hidden field type is broken. Then call
form.submit(). That works well.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Sep 16, 2009, at 6:27 AM, Felix Gonschorek wrote:
Same problem here: I have a delete button which removes an object
from a list. Changes to other fields in the form get currently lost,
as i have to use a event link. Using a submit button inside the loop
with custom context and event would be great - but it does not work
as always the last item in the loop emits the event and gets removed.
Another option would be to add a checkbox to each row and one
"add"/"remove" button outside of the loop. Checked rows are being
removed (in my case) or a job is added (stephans case) - i will try
this out and report here.
felix
Stephan Windmüller schrieb:
Thiago H. de Paula Figueiredo schrieb:
What I need is a button which does some change to an object. I do
not
want the user to lose data he entered for other objects, so I
decided to
use a form submit.
If you don't need to submit a form, just to fire an event in the
server, an EventLink is the best solution.
But an EventLink will call a GET instead of a POST, so the changes in
all other objects on that page are lost.
Perhaps I should give a more detailed example:
The page lists a couple of jobs. Each job has a title, description
and a
list of assigned users. I want to edit more than one job, so I am
looping over all jobs, displaying title, description and users for
each
of them in one big form.
Now I want to add a user to a job, so I add an "Add user" button to
each
job. But if this is realized as an EventLink or ActionLink, all
changes
to title and description for each job on the page are lost when I
click
on them.
What I tried was a submit button which receives the current job in
its
context. The form was submitted, changes saved and with the context I
would be able to add another user. But the context is (as stated in
my
first post) every time the same.
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org