Re: T5 which button did you hit?

2007-11-01 Thread Marcus
Hi Nick,

Thanks,

Marcus


Re: T5 which button did you hit?

2007-11-01 Thread Nick Westgate

Oops, that should be:
To get the "submit" event from the component named Submit, use:
onSubmitFromSubmit()

You can see it's better to give meaningful names to your components.

Cheers,
Nick.


Nick Westgate wrote:

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:
...

  



...

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]





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



Re: T5 which button did you hit?

2007-10-31 Thread Nick Westgate

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:
...

  



...

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]



T5 which button did you hit?

2007-10-31 Thread Marcus
Hi,

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

SomePage.tml:
...

  



...

localhost:8080/SomeTest/SomePage

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

Thanks,

Marcus