OK that makes sense ... I thought that returning true meant "carry on as normal"
Thanks guys Toby ----- Original Message ---- From: Robert Zeigler <[EMAIL PROTECTED]> To: Tapestry users <users@tapestry.apache.org> Sent: Tuesday, 13 May, 2008 5:59:51 PM Subject: Re: Mixin render phases That appears to be the result of (from: http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html) : "If a method returns a true or false value, this will short circuit processing. Other methods within the phase that would ordinarily be invoked will not be invoked. Most render phase methods should return void, to avoid unintentionally short circuiting other methods for the same phase." Robert On May 13, 2008, at 5/1310:55 AM , Toby Hobson wrote: > Something else i've noticed ... if i modify my mixin to always > return true during the @BeginRender phase I still get the exception! > > ----- Original Message ---- > From: Toby Hobson <[EMAIL PROTECTED]> > To: Tapestry users <users@tapestry.apache.org> > Sent: Tuesday, 13 May, 2008 4:52:33 PM > Subject: Re: Mixin render phases > > So if I've read the JIRA correctly does this mean that simply > implementing @BeginRender and @AfterRender in my mixin is not enough > - I would actually have the modify the component (in this case > textarea)? to check for short-circuiting? > > Toby > > ----- Original Message ---- > From: Kristian Marinkovic <[EMAIL PROTECTED]> > To: Tapestry users <users@tapestry.apache.org> > Sent: Tuesday, 13 May, 2008 3:03:49 PM > Subject: RE: Mixin render phases > > hi toby, > > i think i had the same issue some time ago > > i was also trying to create a mixin for enabled/disabled > handling by short circuiting the render phases. but the > render phases (or at least the short circuiting) do not > work as i was expecting :). > > maybe you can take a look at the problem description (it think > there are a lot of details in the comments) of the jira at > https://issues.apache.org/jira/browse/TAPESTRY-1805 > and comment on it. > > > g, > kirs > > > > > Toby Hobson <[EMAIL PROTECTED]> > 13.05.2008 15:24 > Bitte antworten an > "Tapestry users" <users@tapestry.apache.org> > > > An > users@tapestry.apache.org > Kopie > > Thema > Mixin render phases > > > > > > > Hi guys, > > I'm trying to show/hide an html element based on Robert's recent > suggestion (Re: how do we secure our views) but I've hit a minor > problem. > The mixin's @BeforeRender method is being called but then tapestry > complains that the component (textArea) is unbalanced. I'm using the > component and mixin in a custom component, not a page. Here is the > code > > The mixin: > public class Visible { > @Parameter(required=true) > private boolean visible; > > @BeginRender > boolean render() { > return visible; > } > } > > The custom component: > > @Component(id="reason", parameters={"value=violation.message", > "visible=true"}) > @Mixins("visible") > private TextArea reason; > > The custom component's tml > > <t:form> > <t:textArea t:id="reason" /> > <input type="submit" /> > </t:form> > > When the component renders I get the following exception: > > "Render queue error in > CleanupRender[TestViolations:violations.reason]:Component > TestViolations:violations.reason has rendered unbalancedelements; > either > it has started an element with MarkupWriter.element()and not > followed up > with MarkupWriter.end(), or it has invokedMarkupWriter.end() without > first > invoking MarkupWriter.element()." > > "TestViolations" is the page which includes the custom component, > "Violations" is the custom component > > Does anyone have any ideas? > > Thanks > > Toby > > > > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]