Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link to action-forward without calling the action-class

Status
Not open for further replies.

qualiTom

Programmer
Nov 7, 2005
1
DE
Hi everyone,

I'm runnig Struts 1.2.7 with tiles and I am wondering if it is possible to call an action-link, that is defined in the struts-config.xml without calling the defined action-class and the corresponding execute/perfom-method.
Right now I have the problem that I have html:links and references to a ".do"-link to link between pages. As globale-forwards don't work with tiles anymore I created actions-forwards. But if I reference to an action-forward with a defined action-class and an action-form, I always have the problem, that the validate() or execute/perform() method were called. But I only want to call them afer submitting my form (pressing the submit button). So right now I have the following workaround: I defined 2 entries in my struts-config.xml like shown here. But I can't imagine, that this is the real solution and the real idea behind all this.

<action path="/myLinkGo"
forward="tiles.myTilesDefinition" />

<action
path="/myLink"
type="myclasses.myActionClass"
name="myFormClass"
validate="true"
scope="request"
input="tiles.myTilesDefinition">
<forward name="success" path="tiles.myNextTilesDefinition"/>
</action>

So actually I always want to use the "/myLink". Is there a way to tell struts, not to call the actionClass but use the same definition? Or did I miss anything in the struts/tiles-concept?

Thanks for your help

Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top