This feels totally hacky, but if you have control over the component you are creating a mixin for you can pass a flag in the Environment that the component can use to determine phase results...yeah, ugly.
On 10/10/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > I logged a JIRA for this a few moons back: > https://issues.apache.org/jira/browse/TAPESTRY-1662 > > The other JIRA (1805) is more concerned with symmetry > of the render events called before & after. > > Certainly a bit more work needs to be done there. > > Cheers, > Nick. > > > Todd Orr wrote: > > I'm receiving this same type of exception message when attempting to > > alter the SetupRender phase result of the component I'm applying my > > mixin to. Is this expected behavior? It seems that a lack of the > > ability to override the components' or mixins' phases is a limiting > > factor for mixins' usefulness. > > > > On 10/10/07, Kristian Marinkovic <[EMAIL PROTECTED]> wrote: > >> hi howard, > >> > >> i receive an exception when i assign two mixins which > >> both return a value on the same render phase method > >> > >> public class FirstMixin { > >> boolean setupRender() {return true;} > >> } > >> public class SecondMixin { > >> boolean setupRender() {return true;} > >> } > >> > >> @MixinClasses({FirstMixin.class,SecondMixin.class}) > >> private TextField dealerNo; > >> > >> is this an invalid use case (using latest from SVN)? could > >> this problem be reated to > >> https://issues.apache.org/jira/browse/TAPESTRY-1805 > >> > >> funny thing: the stacktrace points to the EventImpl > >> class that says : > >> > >> @SuppressWarnings("unchecked") > >> public boolean storeResult(Object result) > >> { > >> // Given that this method is *only* invoked from code > >> // that is generated at runtime and proven to be correct, > >> // this should never, ever happen. But what the hell, > >> // let's check anyway. > >> > >> if (_aborted) > >> throw new IllegalStateException(ServicesMessages > >> .componentEventIsAborted(_methodDescription)); > >> > >> :) > >> > >> g, > >> kris > >> > >> > >> Exception: > >> # org.apache.tapestry.ioc.internal.util.TapestryException > >> Can not store result from invoking method > >> com.poi.cross.adm.licensing.mixins.SecondMixin.setupRender() (at > >> SecondMixin.java:5), because an event result value has already been > >> obtained from some other event handler method. > >> > >> location > >> classpath:com/poi/cross/adm/licensing/components/DealerSearch.tml, > >> line 3, column 27 > >> 1 <div xmlns:t= > >> "http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > >> 2 <div id="search"> > >> 3 <form t:id="dealerForm"> > >> 4 <div t:id="errors" /> > >> 5 <label t:id="dealerNoLabel">Dealer No.</label> > >> 6 <input t:id="dealerNo" type="text" maxlength="5" size="10" /> > >> 7 <a t:id="searchDealer">Search</a> > >> 8 <a t:id="newDealer">New</a> > >> > >> # java.lang.IllegalStateException > >> Can not store result from invoking method > >> com.poi.cross.adm.licensing.mixins.SecondMixin.setupRender() (at > >> SecondMixin.java:5), because an event result value has already been > >> obtained from some other event handler method. > >> > >> Stack trace > >> > >> * > >> org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:58) > >> * > >> com.poi.cross.adm.licensing.mixins.SecondMixin.setupRender(SecondMixin.java) > >> * > >> org.apache.tapestry.internal.structure.ComponentPageElementImpl$12$1.run(ComponentPageElementImpl.java:480) > >> * > >> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:931) > >> * > >> org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$0(ComponentPageElementImpl.java:915) > >> * > >> org.apache.tapestry.internal.structure.ComponentPageElementImpl$12.render(ComponentPageElementImpl.java:484) > >> * > >> org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:58) > >> * > >> org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40) > >> * > >> org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:71) > >> * > >> org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:81) > >> * > >> org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:72) > >> * > >> org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:1099) > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
