Hi

The solution to this is as simple as it can get: Use the "input" directive and 
point this at a new tiles definition which overiredes your contact definition, 
where you only override the banner.

Hermod

-----Original Message-----
From: Andreas Kurtz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 09, 2005 3:11 PM
To: user@struts.apache.org
Subject: including error-tiles on validation error / exception


hi folks,

i have some questions on using struts with tiles and the corresponding 
error-handling.

we've created a tiles-defintion mainLayout:

        <definition name="mainLayout" path="/layout/basicLayout.jsp">
                <put name="banner" value="/layout/common/banner.jsp" />
                        ...
                <put name="footer" value="/layout/common/footer.jsp" />
        </definition>

from which other definitions were derived (e.g. a page displaying a 
contact-form):

        <definition name="contact" extends="mainLayout">
                <put name="content" value="/pages/contact.jsp" />
        </definition>

including the following action-mapping (and fitting form-bean):

        <action path="/ContactAction"
                type="ContactAction"                                            
                name="ContactForm"
                scope="request"
                validate="true"
                parameter="contact"
                input="/Contact.do">
             <forward name="success" path="mainLayout" />
             <forward name="failure" path="error" />
        </action>

we met the following problem:

when a validation-error or an exception appears, the banner-tile in 
mainLayout should be replaced with error-banner-tile.
in fact there is the possibility to use forward-directive on failure 
(not on validation), but we want to remain on the same input-page 
(contact) with just another error-banner-tile included on 
validation-error or exception.

is there any handy possibility to solve that problem? or is it the only 
way to create a additional error-tile-definition for every page?

thanks for helping.

   andy


--
Medizinische Informatik
http://www.mi.uni-heidelberg.de
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB NOR cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to