You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ben Tomasini <be...@gmail.com> on 2007/07/02 18:59:52 UTC

Re: T5: form context not invoking onActivate with matching parameters

Now that I read the manual I see that all I needed to track the id was this:

    BigDecimal id = null;

    void onActivate(BigDecimal id) {
        this.id = id;
    }

    BigDecimal onPassivate() {
        return id;
    }

Very elegant... Thank you, Tapestry!

Ben


On 6/28/07, Ben Tomasini <be...@gmail.com> wrote:
>
> I was using the following code:
>
> Start.html
> <t:form context="literal:test">
>     <t:submit />
> </t:form>
>
> Start.java
>
>     void onActivate() {
>         System.out.println ("No args");
>     }
>
>     void onActivate(String value) {
>         System.out.println("String arg");
>     }
>
> On a form submit,  the console shows:
>
> No args
>
> I expected the form tag above to invoke the onActivate method with
> matching arguments, it only invokes the noargs method.  Is this a bug, by
> design, or am I missing something?
>
> Ben
>
>
>
>
>