I have a master controller named Screening. I have build view workflow for this controller (e.g : create, edit, list, show).
On my edit view I'm using Jquery TABS (each tab get content from a template associated to a domain). So to sum up :
Controller (Screening) -> Edit View -> tabs -> Eligibility Inclusion(tab - template/domain)
Eligibility Exclusion(tab - template/domain)
Demographics(tab - template/domain)
So, in my Screening edit view, I'm using formRemote to add template part, ex :
<div id="tabs">
<ul>
<li><a href="#demographics"><span>Demographics</span></a></li>
</ul>
<div id="demographics">
<g:formRemote url="[controller:'demographics', action:'update']" update="ajaxMessage" name="demographicsForm">
<span class="onvButton"><g:actionSubmit value="Save" action="update" /></span>
<g:render template="/demographics/editDemographics" model="[demographicsInstance:demographicsInstance]" />
</g:formRemote>
</div>
I would like to keep validations/saving on Screening view, how can I handle this ?
Actually, if users try save (or if validation failed), they are redirected to demographics controller/view ; how to avoid this ? I don't want users to be redirected.
Is there a best way to handle multi-forms (with template/domain association) in one controller/domain ?
This sounds doing the stuff :
Controller :
index.gsp :
_remote.gsp (template) :
If I try to use : update="[success:'reply2', failure:'updateArea']" in my g:formRemote, it sound not working, I get 2 div (the old one and new one). I think it's a javascript issue.
Did somebody get something better ?