struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Southwell" <Aaron.Southw...@mybdr.com>
Subject Tile definitions used as forwards and action input
Date Wed, 03 Mar 2004 15:10:51 GMT
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


Mime
View raw message