Re: WO form and multiple submit buttons
Yamuna Vallipuram <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Johann!
This is what (what you described in your mail) I did the first time.
But when I clicked on the "search" button the directAction which was
bound to the "search" button did not get invoked, but I got the
following url instead.
http://edderkopp:7100/as/WebObjects/frida.woa/wo/13.0.27.23.1.3
PS: I have multiple forms on my page.
What am I missing here? Any comments will be appreciated
Yamuna
On 11. aug. 2007, at 16.32, Johann Werner wrote:
> Hi Yamuna,
>
> the behaviour you describe is quite simple to explain: you have set
> a directActionName in you WOForm bindings. That means that this is
> the default behaviour of your form. This is ok as long as you want
> only one action to be called when clicking on one submit button
> (regardless of which if there are more than one) inside the WOForm.
> But as in your example you want two different actions to be fired
> you have to move these bindings to your corresponding submit
> buttons and leaving only multipleSubmit = true inside the WOForm.
>
> Your bindings should then be:
>
> Form3 : WOForm {
> multipleSubmit = true;
> }
>
> SearchButton : WOSubmitButton {
> directActionName = doMySearch;
> ?additionalBindings = thatNeedToBeAppendedForSearch;
> }
>
> ResetButton : WOSubmitButton {
> directActionName = doMyReset;
> ?additionalBindings = thatNeedToBeAppendedForReset;
> }
>
> The binding actionClass = "DirectAction" is not really necessary as
> long as your direct actions are all in the default DirectAction class.
>
> jw
>
>
> Am 09.08.2007 um 13:12 schrieb Yamuna Vallipuram:
>
>> Hi!
>>
>> I am having problems with submitting a button in a WO form. The WO
>> form is
>> bound to a Direct Action and it consists of two submit buttons.
>> One is
>> bound to a search action (the same Direct Action as the form) and the
>> other one nullifies the input variables (a kind of reset action- this
>> action method is defined in the components java file). The
>> multipleSubmit
>> is set to true in WO form bindings.
>>
>> When the "search" button is clicked it works well. But the "Reset"
>> button
>> does seems to call the same action as the WO form.
>>
>> How do I get the reset button to invoke the reset action defined
>> in the
>> components java file instead?
>>
>> Any help would be highly appreciated.
>>
>> regards
>> Yamuna
>>
>> Bindings of the WO form looks like this
>>
>> Form3: WOForm {
>> multipleSubmit = true;
>> actionClass = "DirectAction";
>> ?modus = "sok";
>> directActionName = "presentasjonSok";
>> method = "get";
>> ?type = presentasjonstype.presentasjonstypeKode;
>> ?sted = sokSted.stedkode;
>> ?inst = sokInstitusjon.institusjonsnr;
>> }
>>
>> when I click on the nullify button the url looks like this
>> http://edderkopp:7100/as/WebObjects/frida.woa/wa/presentasjonSok?
>> pord=Yamuna
>> +Vallipuram&kjonn=Begge&eord=&nullstillknapp=Nullstill&modus=sok&type
>> =PERSON&inst=185
>>
>>
>> _______________________________________________
>> WebObjects-dev mailing list
>> [email protected]
>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>