Re: WOPopButtton change action
Re: WOPopButtton change action
- Subject: Re: WOPopButtton change action
- From: "Jerry W. Walker" <email@hidden>
- Date: Tue, 19 Apr 2005 11:21:25 -0400
Going back to your original post, you say, "I have tried to bind a
WOAction with the action of the form and then have tried to submit it."
I don't understand exactly what that means, because WOAction is an
abstract class (i.e. it can't be instantiated) and its only subclass in
the WO frameworks that I'm aware of is the WODirectAction.
The simplest approach to getting this working would be to add a
WOSubmit button to the form and bind the WOSubmitButton's action
binding to the method to which you had bound the WOForm's action
binding (removing it from the WOForm, but that's incidental).
When the user selects something from the first pop-up, they click the
submit button (or hit return on the keyboard) which would populate the
second pop-up after a round trip to the server. By the same token,
after selecting something from the second popup, they click the submit
button to populate the third popup.
If only one submit button is used, your action method would have to
determine which pop-up to populate. Alternatively, you could use three
submit buttons, one by each pop-up which would be bound to the action
method to populate the next pop-up. The one by the last pop-up, of
course, would simply act on the final combination of selections.
If you use multiple submit buttons, you have the choice of using only
one WOForm for all the elements or a WOForm for each submit
button-pop-up pair. If you use only one WOForm, be sure to set the
multipleSubmit binding to true, otherwise only the action method bound
to the first WOSubmitButton will be activated. If you use three
WOForms, you shouldn't have this problem.
This is simple, and works, but tends to be pretty clunky UI.
Slightly better from a UI standpoint would be to use JavaScript to send
a request automagically as soon as a selection is made from each popup.
If you use that approach, I'll leave it as an exercise to the reader to
create the correct JavaScript, but then it makes sense to rebind the
action method to the WOForm and leave out the submit buttons entirely.
Good luck,
Jerry
On Apr 19, 2005, at 9:42 AM, Tanmoy Roy wrote:
Hi,
I understand, but please provide me the way to reslove it. I am not
getting anything on the net.
Thanks and Regards
Tanmoy Roy
ACD Team
----------
From: Jerry W. Walker
Sent: Tuesday, April 19, 2005 7:01 PM
To: Tanmoy Roy
Cc: WO DEV LIST (E-mail)
Subject: Re: WOPopButtton change action
From the WebObjects Dynamic Elements Reference documentation for
WOForm's bindings:
================================
action
Action method that> '> s invoked when the form is submitted. If the
form
contains a dynamic element that has its own action (such as a
WOSubmitButton or a WOActiveImage), that action is invoked instead of
the WOForm> '> s.
================================
If you have a submit button in the form to which you've bound an
action
method, then the form's action method won't be called as stated above.
HTH
Jerry
On Apr 19, 2005, at 7:43 AM, Tanmoy Roy wrote:
Hi all,
I am really flustered on this. Following is my requirement:
I have 3 WOPopButton (say WOP1,WOP2,WOP3). I will select some value
in WOP1 and depending on the selection WOP2 will be populated by a
set
of values from database. And depending on the selection og WOP2 WOP3
will be populated like wise.
I have tried to bind a WOAction with the action of the form and then
have tried to submit it. The form is getting submitted without the
function getting called.
Please, anybody help.
Chuck :: I was reading on of your posting in the net. where you have
done something like my requirement. Can you plese let me know the
steps?
Thanks and Regards
Tanmoy Roy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
__ Jerry W. Walker, Partner
C o d e F a b, LLC - "High Performance Industrial Strength
Internet
Enabled Systems"
email@hidden
212 465 8484 X-102 office
212 465 9178 fax
--
__ Jerry W. Walker, Partner
C o d e F a b, LLC - "High Performance Industrial Strength Internet
Enabled Systems"
email@hidden
212 465 8484 X-102 office
212 465 9178 fax
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden