Pablo

i have attached  a simple html and page class.

Thanks a lot for looking into this.

Attachment: AddService.java
Description: Binary data



Anjana Gopinath
True North Technology
11465 John's Creek Parkway, Suite 300
Duluth, GA 30079





On Mar 16, 2007, at 4:01 PM, Pablo Ruggia wrote:

Can you send us your page template and class ?

On 3/16/07, Anjana Gopinath <[EMAIL PROTECTED]> wrote:

Thanks Peter and Pablo

I tried giving both options suggested by Pablo

<input t:type="Submit" value="Select applications" t:id="addApps" />


  @OnEvent(value = "submit",component="addApps")
           void  addApps(){
                  System.out.println("-----------here ");
              // return "viewSummary";
           }

This is not getting invoked at all!. if i just give onEvent
(component="addApps") , it is invoked , but wont take a returntype.


Also tried

  public String onSubmitFromAddApps()
  {
        return "ViewSummary";

  }

That too didnt work

Thanks

Anjana Gopinath
True North Technology
11465 John's Creek Parkway, Suite 300
Duluth, GA 30079





On Mar 16, 2007, at 2:19 PM, Peter Beshai wrote:

> Note that you have more values to choose from than simply SUBMIT
> (note, you
> can use the value "submit" -- case insensitivity). You may be
> interested in
> only having your method called if the form submits successfully, in
> which
> case you would use the value "success".
>
> You can view the list of event types forms have on the javadoc page:
> apache/tapestry/corelib/components/Form.html
>
>
> On 3/16/07, Pablo Ruggia <[EMAIL PROTECTED]> wrote:
>>
>> You have two choices:
>>
>> 1) Using naming convention:
>>
>>     public String onSubmitFromMyForm(){
>>         return "AnotherPage";
>>     }
>>
>> Where "Submit" is the event name and "MyForm" is the component id.
>>
>> 2) Using annotations:
>>
>>     @OnEvent(value="SUBMIT", component="myForm")
>>     public String onSubmitFromMyForm(){
>>         return "AnotherPage";
>>     }
>>
>>
>> On 3/16/07, Anjana Gopinath <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi
>> >
>> > How to specify a listener method in T5? I have a page with multiple
>> > submit buttons and need to navigate to a different page when the
>> user
>> > clicks on a particular button.
>> > i tried doing this
>> >
>> > @OnEvent(component = "deleteApp")
>> >         String deleteApp()
>> >         {
>> >                 System.out.println("deleteApp");
>> >                 return "AddService";
>> >         }
>> >
>> > but got an exception
>> > "This type of event does not support return values from event
>> handler
>> > methods"
>> >
>> > cant find the listener parameter for submit component. Can some one
>> > please help me out? Thanks!
>> >
>> >
>> > Anjana Gopinath
>> > True North Technology
>> > 11465 John's Creek Parkway, Suite 300
>> > Duluth, GA 30079
>> >
>> >
>> >
>> >
>> >
>> >
>>
>
>
>
> --
> Peter Beshai
>
> Pure Mathematics/Computer Science Student
> University of Waterloo



Reply via email to