• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Navigation problem in struts

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I have a input form with an action .do, i donno why the .do is opening another window, i want to close the window onsubmit and refresh the parent window.

can i control anything from struts-config or do i need to control from javascript, if javascript i donno on which event i should write the function because the framework is calling the .do

Help Me please...

Thanks in Advance,
Srilakshmi
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps in your Action class code you are forwarding the request to some other form rather than parent form.

Can you post your struts-config file and Action class code.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The target is specified in the html/javascript and should have nothing to do with Struts specifically.
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kaur,

Thanks for your reply.

Corresponding actions are..

<action path="/SubmitContact"
type="org.fdny.cts.actions.SubmitContact"
name="contactForm"
scope="request"
validate="true"
input="/jsp/AddCall.jsp">
<forward name="success" path="/DisplayCallStatus"/>
</action>

<action path="/DisplayCallStatus"
type="org.fdny.cts.actions.CallStatus"
name="contactForm"
scope="request" validate="false">
<forward name="success" path="/jsp/CallStatus.jsp"/>
</action>

Action class is pretty much plain one
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, are you using target attribute in html:form tag.

<action path="/SubmitContact"
type="org.fdny.cts.actions.SubmitContact"
name="contactForm"
scope="request"
validate="true"
input="/jsp/AddCall.jsp">
<forward name="success" path="/DisplayCallStatus"/>
</action>

<action path="/DisplayCallStatus"
type="org.fdny.cts.actions.CallStatus"
name="contactForm"
scope="request" validate="false">
<forward name="success" path="/jsp/CallStatus.jsp"/>
</action>



From the struts-config file I can't make out much about the real flow of actions except that first you have some window for SubmitContact and onsubmit of this page, if error then you have AddCall.jsp page otherwise in your action class you might be forwarding to DisplayCallStatus action(another jsp form). On this form submit, your action class is forwarding the request to another page CallStatus.jsp

I don't know if the above analysis will help you much.
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks!!!

Let me explain my problem!!

I have a page1, which displays set of values, page2 is an input form this is called in a popup window from page1. when page2 submit is hit, submit action is opening in another popup window.
instead i want submit action of page1 should come in the same window and after it should refresh the page1

i.e., on submit of page2 i want to refresh page1
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic