I really don't want to write an entire new set of actions - to tie them to a simplified layout (i.e. just the 'content')
Ideally, I'd like to be able to determine (within my action code) which layout to use... but I fear it is too late in the process to do that.
My actions are tied to the Tile/layout by (I think) my input=gymMaintenance.page (i believe this may be part of the problem/solution) - below are 2 of my a action definitions:
This is my tile/layout definition:
If I could just override that "extends='layout_b'" with (something like) "extends='contentOnlyLayout'" at runtime, based on my switch AJAX=1
I'm new to Struts and Java... hope I'm making some sense!
First, if you are new to Struts why are you leasrning an old version and not the latest version?
As to your problem, no, you cannot do an override.
From what I can gather about your question it looks like you want to submit the form but then only have the "content" tiles section refreshed. If that's what you want to do then you need to make if so your content, gymMaintenance.jsp, can be refreshed using AJAX. That will be the only way you can change the content only.
Joined: Jun 28, 2010
Ok - so there is a solution. First, I had to change my struts config to NOT associate the page with a layout/template. Next, I had to create a stub jsp file that would examine my parameter 'AJAX=1' - depending on the value, the stub file chooses the definition:
My actions now point to the stub page (gymMaintenanceStub.jsp) and each of the above mentioned tile definitions point to my original jsp page for their content section:
Everything works fine - validation, ActionForm is accessible... there was no further work needed on the server.