Hi, I have problem with replacing one custom component with another one via AJAX, using zone component. Replacing first component with second should happen on action inside first component. On parent page i have one block(with second component inside him) , zone component and first component inside her(zone).
Event bubbling is working (method in the first component is invoking the method in the parent page) but not as i was hopping to(it doesn't change the first component with the second one). Any help i can get is very much appreciated. Sorry for the wall of code. //parent page public class Index { @Property @InjectComponent private Zone loginzone; @Component private SignUp signUp; @Component private SignIn singin; @Inject private Block loginblock; public Block onProba() { return loginblock; } } Index.tml <html t:type="layout" title="com.faks.kab Index" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> <t:zone t:id="loginZone" id="zone"> <div t:type="SignIn" t:id="singin" zone="zone"/> </t:zone> <t:block t:id="loginblock"> <div t:type="SignUp" t:id="signup" /> </t:block> </html> SignIn.tml <t:container xmlns:p="tapestry:parameter" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <t:form t:id="signinform" t:zone="prop:zone"> <input type="submit" value="Login" /> </t:form> </t:container> //first component SignIn.java public class SignIn { @Inject private ComponentResources componentResources; @Component private Form signinform; @Parameter(defaultPrefix = BindingConstants.LITERAL) @Property @SuppressWarnings("unused") private String zone; boolean onSuccessFromSignInForm() { componentResources.triggerEvent("proba", null, callback); return false; } private ComponentEventCallback callback = new ComponentEventCallback() { public boolean handleResult(Object result) { if(!(result instanceof Block)){ return true; } return false; } }; Best regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-Custom-Component-via-Zone-tp4918130p4918130.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org