You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kristian Marinkovic <kr...@porsche.co.at> on 2007/10/03 15:52:20 UTC

T5: Mixin on Form does not work as expected

hi,

i get an exception from the Form.cleanupRender method although
i have a Mixin attached that returns false on setupRender.

as i understand the documentation correctly the Form component
should never enter the cleanupRender method/event... 

can someone point me to my error?

i'm trying to short-circuit the form rendering when a certain state
occurs 

thanks
g,
kris

code:
page:
    @Component(parameters={"tracker=tracker","Editable.edit=display"}) 
    @MixinClasses(Editable.class)
    private Form orderForm;



Editable Mixin:
public class Editable {
 ...
 
@Parameter(defaultPrefix=TapestryConstants.PROP_BINDING_PREFIX,value="true")
    private boolean edit;

    boolean setupRender(MarkupWriter writer) {
        if(!edit)
            writer.write(value);
        return edit;
    }
}

Re: T5: Mixin on Form does not work as expected

Posted by Howard Lewis Ship <hl...@gmail.com>.
A stack trace would be helpful.

On 10/3/07, Kristian Marinkovic <kr...@porsche.co.at> wrote:
>
> hi,
>
> i get an exception from the Form.cleanupRender method although
> i have a Mixin attached that returns false on setupRender.
>
> as i understand the documentation correctly the Form component
> should never enter the cleanupRender method/event...
>
> can someone point me to my error?
>
> i'm trying to short-circuit the form rendering when a certain state
> occurs
>
> thanks
> g,
> kris
>
> code:
> page:
>     @Component(parameters={"tracker=tracker","Editable.edit=display"})
>     @MixinClasses(Editable.class)
>     private Form orderForm;
>
>
>
> Editable Mixin:
> public class Editable {
> ...
>
> @Parameter(defaultPrefix=TapestryConstants.PROP_BINDING_PREFIX
> ,value="true")
>     private boolean edit;
>
>     boolean setupRender(MarkupWriter writer) {
>         if(!edit)
>             writer.write(value);
>         return edit;
>     }
> }




-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind