You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Aaron Southwell <Aa...@mybdr.com> on 2004/03/03 16:10:51 UTC
Tile definitions used as forwards and action input
Hi,
Can anyone explain where tile definitions can be used in action mappings (see below)? I have had trouble when I use ActionError to return to the input page.
Also, I see examples of definitions starting with a '.'. Is this important/relevant?
I have had some success without doing this.
Main Definition
<definition name="common.mainLayout" path="/common/mainLayout.jsp">
<put name="header" value="/common/header.jsp" />
<put name="body" value="/common/body" />
<put name="footer" value="/common/footer.jsp" />
</definition>
Extended definition
<definition name="app.homeDefinition" extends="common.mainLayout">
<put name="body" value="/app/home.jsp" />
</definition>
Action using defintion as "input" as well as forward path.
<action path="/Home" type="com.mybdr.actions.HomeAction" name="appForm" scope="session" validate="true"
input="app.homeDefinition">
<forward name="Add" redirect="false" contextRelative="false" path="app.homeDefinition" />
<forward name="Extract" path="app.extractDefinition" redirect="false" />
</action>
Can links be set to defintions?
<html:link action="app.extractDefinition" >
This didn't seem to work and I had to use:
<html:link href="/ToExtract" >
and:
<action path="/ToExtract" forward="app.extractDefinition" />
I have read a lot but haven't found a clear outline to using defintions in Struts.
Thanks,
Aaron
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org