If component does not have any interaction with an enclosing Form
component, by design.  Things become pathologically complicated if it
does.

2011/5/15 Василий Жуков <vip.del...@gmail.com>:
> Hi everyone,
>
> I have some problem with t:if
>
> It's my form in Start.tml
>
> <t:form>
>    <t:errors/>
>    <t:checkbox value="check"/>
>    <t:if test="check">
>        Hello
>    </t:if>
>    <t:submit/>
> </t:form>
>
> It's my Start.java
>
> public class Start
> {
>    @Property
>    private boolean check;
>
>    @Environmental
>    private ValidationTracker tracker;
>
>    void pageAttached()
>    {
>        check = true;
>    }
>
>    Object onValidateForm()
>    {
>        tracker.recordError("onValidateForm");
>        return false;
>    }
> }
>
> After the first render, page shows the checked checkbox and word "Hello". if
> I uncheck the checkbox and press submit, checkbox save you state in
> ValidationTracker and after post (in render stage) restore it, but "t:if"
> dose not save its state in ValidationTracker and in "render after post"
> stage test "check" property from page (and get true). But, in the "post
> stage" "t:if" has "false" value, not true. Hence, after form post we see
> unchecked checkbox and word "Hello". I think it's wrong.
>
> Yes, I can use @Persist on "check" property, but I need a full page refresh
> when pressing F5.
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to