You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by RALPH ROPER <RR...@cuscal.com.au> on 2004/02/25 07:16:36 UTC

Submit button does nothing

hi,

I have almost completed an application using Struts 1.1 and Websphere Studio
5.1.x. Everything has worked to date until I try to pop open a new window
and click on Submit. The pop-up window is populating fine (I have one email
address field) but when I  click on Submit absolutely nothing happens. No
errors are displayed in the console and I cannot find any other logs to
assist me. I have changed the Submit button to a href which then calls my
action but does not remember my form bean properties. Aaaargh!

Here is my show_email.jsp that gets shown in the pop-up window.
<html:form action="/enquiry/email.do"/>
	<html:text name="EmailForm" property="emailAddress" size="35"/><br/>
	<div align="right"><p></p>
		<a href="#" class="button1"
onClick="window.close();">Cancel</a>
<!--			<html:link href="../enquiry/email.do"
styleClass="button1">Submit link</html:link>  -->
		<html:link action="/enquiry/email.do"
styleClass="button1">Submit</html:link>
<!--			<html:submit
styleClass="button1">Submit</html:submit> -->
	</div>
</html:form>


In struts-config.xml I have the following.
	<form-bean name="EmailForm"
type="org.apache.struts.action.DynaActionForm">
		<form-property name="emailAddress" type="java.lang.String"
/>
	</form-bean>

<action path="/enquiry/email"
type="com.cuscal.mmdd.action.cuenquiry.EmailAction" name="EmailForm"
scope="request">
		<forward name="success"
path="com/cuscal/mmdd/jsp/cu_enquiry/email.jsp" />
	</action>
	<action path="/enquiry/showEmail"
type="com.cuscal.mmdd.action.cuenquiry.ShowEmailAction" name="EmailForm"
scope="request">
		<forward name="success"
path="com/cuscal/mmdd/jsp/cu_enquiry/show_email.jsp" />
	</action>

Any assistance much appreciated.

regards,

Ralph Roper
Business Technology Services (BTS)
Credit Union Services
02 8299 9388

________________________________________________________
NOTICE
The information in this email and or any of the attachments may contain;
a. Confidential information of Credit Union Services Corporation (Australia) Limited (CUSCAL) or third parties; and or
b. Legally privileged information of CUSCAL or third parties; and or
c. Copyright material of CUSCAL or third parties.
If you are not an authorised recipient of this email, please contact CUSCAL immediately by return email or by telephone on 61-2-8299 9000 and delete the email from your system.
We do not accept any liability in connection with computer virus, data corruption, interruption or any damage generally as a result of transmission of this email.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: validation error in FormBean, where to redirect next?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Yes
----- Original Message ----- 
From: "Marco Mistroni" <mm...@waersystems.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Wednesday, February 25, 2004 10:51 AM
Subject: validation error in FormBean, where to redirect next?


> Hi all,
> Assume that I have following struts-config.xml
> 
> <action path="/receiveLine"      
>               type=" ReceiveLineAction" 
>               input="/receiveLine.jsp" 
>               name="receiveLineForm" scope="request">
> <forward name="failure" path="/receiveLine.jsp">
> </forward>
> <forward name="exitLine"
> path="/receiveHeader.jsp">
> </forward>
> <forward name="lineComplete"
> path="/populateProduct.do">
> </forward>
> </action>
> 
> Now, I have ALWAYS assumed that if validation fails in the
> ReceiveLIneForm bean, I should be redirected to the input page, which is
> receiveLine.jsp
> 
> Is my assumption correct?
> 
> Regards]
> Marco
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


validation error in FormBean, where to redirect next?

Posted by Marco Mistroni <mm...@waersystems.com>.
Hi all,
	Assume that I have following struts-config.xml

<action path="/receiveLine"    	  	
              type=" ReceiveLineAction" 
              input="/receiveLine.jsp" 
              name="receiveLineForm" scope="request">
			<forward name="failure" path="/receiveLine.jsp">
			</forward>
			<forward name="exitLine"
path="/receiveHeader.jsp">
			</forward>
			<forward name="lineComplete"
path="/populateProduct.do">
			</forward>
		</action>

Now, I have ALWAYS assumed that if validation fails in the
ReceiveLIneForm bean, I should be redirected to the input page, which is
receiveLine.jsp

Is my assumption correct?

Regards]
	Marco



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Submit button does nothing

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
You have a '/' at the end of your openning <html:form> tag

Try...
  <html:form action="/enquiry/email.do">

Instead of...
 <html:form action="/enquiry/email.do"/>

Niall

----- Original Message ----- 
From: "RALPH ROPER" <RR...@cuscal.com.au>
To: <st...@jakarta.apache.org>
Sent: Wednesday, February 25, 2004 6:16 AM
Subject: Submit button does nothing


> hi,
>
> I have almost completed an application using Struts 1.1 and Websphere
Studio
> 5.1.x. Everything has worked to date until I try to pop open a new window
> and click on Submit. The pop-up window is populating fine (I have one
email
> address field) but when I  click on Submit absolutely nothing happens. No
> errors are displayed in the console and I cannot find any other logs to
> assist me. I have changed the Submit button to a href which then calls my
> action but does not remember my form bean properties. Aaaargh!
>
> Here is my show_email.jsp that gets shown in the pop-up window.
> <html:form action="/enquiry/email.do"/>
> <html:text name="EmailForm" property="emailAddress" size="35"/><br/>
> <div align="right"><p></p>
> <a href="#" class="button1"
> onClick="window.close();">Cancel</a>
> <!-- <html:link href="../enquiry/email.do"
> styleClass="button1">Submit link</html:link>  -->
> <html:link action="/enquiry/email.do"
> styleClass="button1">Submit</html:link>
> <!-- <html:submit
> styleClass="button1">Submit</html:submit> -->
> </div>
> </html:form>
>
>
> In struts-config.xml I have the following.
> <form-bean name="EmailForm"
> type="org.apache.struts.action.DynaActionForm">
> <form-property name="emailAddress" type="java.lang.String"
> />
> </form-bean>
>
> <action path="/enquiry/email"
> type="com.cuscal.mmdd.action.cuenquiry.EmailAction" name="EmailForm"
> scope="request">
> <forward name="success"
> path="com/cuscal/mmdd/jsp/cu_enquiry/email.jsp" />
> </action>
> <action path="/enquiry/showEmail"
> type="com.cuscal.mmdd.action.cuenquiry.ShowEmailAction" name="EmailForm"
> scope="request">
> <forward name="success"
> path="com/cuscal/mmdd/jsp/cu_enquiry/show_email.jsp" />
> </action>
>
> Any assistance much appreciated.
>
> regards,
>
> Ralph Roper
> Business Technology Services (BTS)
> Credit Union Services
> 02 8299 9388
>
> ________________________________________________________
> NOTICE
> The information in this email and or any of the attachments may contain;
> a. Confidential information of Credit Union Services Corporation
(Australia) Limited (CUSCAL) or third parties; and or
> b. Legally privileged information of CUSCAL or third parties; and or
> c. Copyright material of CUSCAL or third parties.
> If you are not an authorised recipient of this email, please contact
CUSCAL immediately by return email or by telephone on 61-2-8299 9000 and
delete the email from your system.
> We do not accept any liability in connection with computer virus, data
corruption, interruption or any damage generally as a result of transmission
of this email.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org