Hi, I'm currently implementing a feature where Layout component has a link "Register" that pops up a dialog for user registration. The dialog itself rendered by my <t:registrationForm /> component into a hidden div, and I'm showing that div using fancybox (http://fancybox.net) when user clicks "Register".
The <t:registrationForm /> is pretty simple, in contains some input fields (first/last name, email, password) in <t:form /> and handles logic for creating a new user. The <t:form /> is actually in a zone and is submitted by ajax. If I submit this <t:form />, it will trigger page's onActivate(EventContext) method (which is expected). The problem is, is that current page had some activation context, then I have to put this context to <t:form />'s context parameter, to restore the page state. And I don't really like this, because my <t:registrationForm /> component has to know about every page ('s activation context) it's used in, and I need some solution to pass context to that component. (And I have to pass that context, because one of such pages return 404 if it doesn't find the context and ajax call won't event hits the <t:registrationForm />'s handler). What I was thinking about is just to change <t:form>'s action URL -- so that it leaded to some "Register" page, which would also contain <t:registrationForm />, and which would return a zone in response. I know <t:form /> won't allow me to change the URL from code, so I have to change that URL in javascript at the client side (or, maybe write some mixin). Another option is to load <t:registrationForm's /> content by the ajax call from the "Register" page when user clicks "Register" link. This may work, but in that case user has to wait the ajax result returned. Anyway, I'd like to hear from you, what the best option by your opinion? Or maybe I'm missing something... -- Dmitry Gusev AnjLab Team http://anjlab.com