struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leticia Golubov" <lgolu...@micromuse.com>
Subject FW: Displaying same page after submiting a form
Date Mon, 12 Jan 2004 17:56:46 GMT

That works!!!! :)  Interesting...  thanks so much!

-----Original Message-----
From: Shishir K. Singh [mailto:sksingh@synapsistech.com]
Sent: 12 January 2004 17:27
To: lgolubov@micromuse.com
Subject: RE: Displaying same page after submiting a form


Don't think I got any. However, try out the 

<html:base/> 



And see if you still get the errors. If yes, send in the source (that
you can view from the browser when the page is displayed).

Shishir  

-----Original Message-----
From: Leticia Golubov [mailto:lgolubov@micromuse.com] 
Sent: Monday, January 12, 2004 12:22 PM
To: Struts Users Mailing List
Subject: RE: Displaying same page after submiting a form

Hiya,

Find attached before and after screen shots...

regards

-----Original Message-----
From: Shishir K. Singh [mailto:sksingh@synapsistech.com]
Sent: 12 January 2004 17:00
To: Struts Users Mailing List
Subject: RE: Displaying same page after submiting a form


Hmmm..strange...can you send a screen shot of how the page looks before
and after the submit.  

-----Original Message-----
From: Leticia Golubov [mailto:lgolubov@micromuse.com]
Sent: Monday, January 12, 2004 11:41 AM
To: Struts Users Mailing List
Subject: RE: Displaying same page after submiting a form

That's what i did initially, but it caused the page to be displayed with
errors (images missing, etc) even though the forwar path was exactly the
same as the parameter path...
i.e. parameter="/pages/disco/config_toolbar.jsp"
     forward name ="success" path="/pages/disco/config_toolbar.jsp"

thanks

-----Original Message-----
From: Shishir K. Singh [mailto:sksingh@synapsistech.com]
Sent: 12 January 2004 16:31
To: Struts Users Mailing List
Subject: RE: Displaying same page after submiting a form


I think you need to add the forward to your action definition

  <action path="/saveData"
        type="com.micromuse.precision.disco.action.SaveAction"
        name="saveDataForm"
        parameter="/pages/disco/config_toolbar.jsp"
        scope="session">
	 <forward    name="success" path="your jsp"/>
	 <forward    name="failure" path="your jsp"
  </action>

In your action, when your forward to success or failure, your will be
brought to the specific jsp that you want (in your case the same )


Shishir

-----Original Message-----
From: Leticia Golubov [mailto:lgolubov@micromuse.com]
Sent: Monday, January 12, 2004 11:25 AM
To: Struts User Mailing List
Subject: Displaying same page after submiting a form

I'm using the following code to submit an action in a .jsp file
(config_toolbar.jsp):

<html:form method="post" action="/saveData" name="saveForm"
type="text/html"
type="org.apache.struts.action.DynaActionForm" enctype="text/html">
    <td><a onClick="javascript:void(document.saveForm.submit());"

onMouseOver="javascript:SwapImage('save','../../images/button_toolbar_sa
ve_o
ver.png'); SetStatus('Save Configuration'); return true;"

onMouseOut="javascript:SwapImage('save','../../images/button_toolbar_sav
e.pn
g'); SetStatus(''); return true;"

onMouseDown="javascript:SwapImage('save','../../images/button_toolbar_sa
ve_c
lick.png');"

onMouseUp="javascript:SwapImage('save','../../images/button_toolbar_save
_ove
r.png');">
    <img name="save" src="../../images/button_toolbar_save.png"
border="0"
width="26" height="26" alt="Save Configuration"></a></td>  </html:form>

The action is found/executed, and, as a default I'm returning a
findforward("success") at the end of the ActionForward method in my
SaveAction.java class.

in struts_config.xml I have the following defined:
  <action path="/saveData"
        type="com.micromuse.precision.disco.action.SaveAction"
        name="saveDataForm"
        parameter="/pages/disco/config_toolbar.jsp"
        scope="session">
  </action>

In the hope that config_toolbar.jsp will still be displayed instead of
the blank page I get after I do a mouseClick on the
button_toolbar_save.png image.  I've tried setting the forward name to
the config_toolbar.jsp, but that caused strange side effect (all images
were missing, the page didn't display properly).

So, essentiall, I want the same page to be displayed after the saveData
action is executed.  Does anyone know how to do this?

p.s. I'm new to struts, so could (and I hope it is) be something very
simple.

regards

Leticia :)




---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


Mime
View raw message