cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <j.re...@hippo.nl>
Subject Re: which submitbutton was pressed?
Date Tue, 12 Dec 2006 10:50:26 GMT
Hi Niclas,

If you've defined the submit button as an fd:submit, you can react in 
flow based on the submitId of the form.

You can request the submitId from flow by using:

form.submitId

Example:

form.showForm();
switch(form.submitId) {
   case "details":
     showDetails();
     break;
   case "create":
     createNew();
     break;
   case "ok":
     redisplayForm = false;
     processForm(form);
     break;
}

I hope this helps you out.

Kind regards,

Jeroen Reijn


ZongoZongo wrote:
> Hi
> 
> Couldnt solve the problem. But I am now using cforms. Inside the definition
> of the submitbutton you can set the <attribute/> tags.
> But the problem stays the same. How can I find out which button has been
> pressed und how can I extract the attributes? Please help. This is very
> fundamtel for my further work :-(
> 
> greetings,
> 
> Niclas
> 
> 
> ZongoZongo wrote:
>> Hi
>>
>> One simple short question :-)
>> How can I get the name of the submitbutton that has been pressed in a form
>> (inside flowscript).
>> something like cocoon.request.getpressedButton() :-)
>>
>> By the way, I am not using CForms. But I think, that doesnt change
>> anything.
>>
>> THX,
>>
>> Niclas
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message