The book from Alexander Kolesnikov uses the 5.0.6 version, which is a
little different from the latest one (5.0.13)...

According with the component reference
(http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Submit.html),
you have to change your code to this:

 private Class nextPage;

       void onSelectedFromSubmitButton()
       {
               System.out.println("submit pressed");
               nextPage = Administration.class;
       }


       Object onSubmit()
       {
               System.out.println("form submitted");
               return nextPage;
       }


On Tue, Jul 29, 2008 at 9:23 AM,  <[EMAIL PROTECTED]> wrote:
> Again, I'm trying to follow what is in the Kolesnikov book and I can't get
> it to work:
>
> template:
>
>                <t:form t:id="newUserForm">
>
>                        <table>
>                                <tr>
>                                        <td colspan="2" align="left">
>                                                <input type="submit"
> t:type="submit" t:id="submitButton" value="Submit"/>
>                                        </td>
>                                </tr>
>                        </table>
>
>                </t:form>
>
> code:
>
>        private Class nextPage;
>
>        @OnEvent(component="submitButton")
>        void onSubmitButton()
>        {
>                System.out.println("submit pressed");
>                nextPage = Administration.class;
>        }
>
>
>        Object onSubmitFromNewUserForm()
>        {
>                System.out.println("form submitted");
>
>                return nextPage;
>        }
>
> ----------
> onSubmitButton is never called. All I see is the output "form submitted".
>
> what's going on? From reading the component Events section on the T5 website
> it looks like I have got this right.
>
> thanks,
> p.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Atenciosamente,

Marcelo Lotif
Programador Java e Tapestry
FIEC - Federação das Indústrias do Estado do Ceará
(85) 3477-5910

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

Reply via email to