John
There are a number of solutions I would suggest looking at JBuilder doc
located at
http://bdn.borland.com/borcon2004/article/paper/0,1963,32246,00.html
the fastest way is for your button to route to your jsp page is to route to
the page identified by the action mapping in struts-config.xml For example
here is a form which routes to logon page URI when username, password are
satisfied and submit is called
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %><html:form
action="logon.do" focus="userName"><br> User Name: <html:text
maxlength="16" property="userName" size="16"/><br /> Password:
<html:text maxlength="16" property="password" size="16"/><br /><html:submit
value="Submit" property="Submit"/><html:reset value="Reset"/></html:form>you
could also place in a html:link to forward such as <html:link forward="Home">
whereas Home idenitifies a URI which you will link to
from the definition associated with 'home' in the Global forwards defined in
struts-config.xml
HTH,
Martin-
----- Original Message -----
From: "John Andrews" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Wednesday, October 12, 2005 10:57 AM
Subject: action class not being called for repeat initial requests when
using validation
I have the action mapping below in my struts config file:
<action
path="/packageActionCreateT"
type="struts.actions.packages.PackageAction"
name="PackageForm"
input="/pages/createPackage.jsp"
parameter="dispatch"
scope="session">
<forward name="createPackagePage" path="/pages/createPackage.jsp"/>
<forward name="createPackageTResults"
path="/pages/createPackageTResults.jsp"/>
</action>
When I request that the corresponding action be executed using the URL:
http://www.xxxxxx.com/packages/packageActionCreateT.do?dispatch=createPackag
e
Then the action is only executed once - unless i hit the submit button on
the createPackage.jsp page. On all other ocasions the action will act just
like a forward. It will just forward straight back to the
createPackage.jsp
page. This I presume? is because the validation is finding the
corresponding
formbean in the session and then going straight back to the jsp page.
However it is not acting exactly like a normal validation because the
incorrect fields are not highlighted.
Is there someway to get the validator to only return directly to the jsp
page only after a submit - not after an initial request? - or is there
some
other good way to solve/design around this issue?
Thanks for any help
John
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]