There are some docs about this here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html

To get the "success" event from the component named Form, use:
onSuccessFromForm()

To get the "submit" event from the component named Submit, so use:
onSuccessFromSubmit()

It's good practice to add a t:id="ComponentName" to your components.
(Otherwise the default name is the component type.) Then you can use:
onEventFromComponentName()

Cheers,
Nick.


Marcus wrote:
Hi,

SomePage.java:
...
public Object onSubmit() {  System.out.println("Button1");  }
public Object onSuccess()  {  System.out.println("Button 2"); }
...

SomePage.tml:
...
<form t:type="form">
  <input type="submit" value="Button 1">
</form>
<form t:type="BeanEditForm" object="somelist" submitLabel="Button 2">
</form>
...

localhost:8080/SomeTest/SomePage

How do you know, in java class, which button did you hit?
Console always display:
Button2
Button1

Thanks,

Marcus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to