There must be following in the forms on the both window.

<input type="hidden"
name="<%=org.apache.struts.taglib.html.Constants.TOKEN_KEY%>"
value="<bean:write name="<%=Globals.TRANSACTION_TOKEN_KEY%>"/>">

When the pop up appears, find the above described element in the page
source, you will find that on both the page such elements are identical,
which is not desirable. For every request new token is generated and stored
as a session attribute with the key Globals.TRANSACTION_TOKEN_KEY. We have
to make sure that this generated token is different for the parent and the
child window.

Since, for every request, a new token is generated by the action which
renders the form, try to load the parent and the pop up through different
actions.

Think about it and reply,
Piyush

On Wed, Jan 25, 2012 at 10:14 PM, Arpan <arpan.deb...@gmail.com> wrote:

> Actually what is happening that when my child window submits, it has a
> specific struts token.
> When I close the child and try to submit the parent window, it shows that
> the form has already been submitted.
>  So can any one know, how  to solve this problem.
>
> Thanks
>
>
> On Mon, Jan 23, 2012 at 12:56 AM, Arpan <arpan.deb...@gmail.com> wrote:
>
> > Hi Piyush,
> >
> > If I close my child window and try to submit the parent one, submit
> button
> > doesn't work.
> > There's no JS error shown in the browser.
> > But if I reload the parent window,submit button works .
> >
> > Thanks
> >
> >
> >
> > On Sun, Jan 22, 2012 at 1:58 PM, Piyush Kumar <alivelove2...@gmail.com
> >wrote:
> >
> >> why are you reloading the parent window on child window close. i think
> >> your
> >> problem can be solved with pure javascript. please describe it more.
> >>
> >> On Sat, Jan 21, 2012 at 9:52 PM, Arpan <arpan.deb...@gmail.com> wrote:
> >>
> >> > Hi,
> >> >
> >> > My requirement is like as follows:
> >> >
> >> > User can edit fields in a page. This page will have a link, which will
> >> open
> >> > a child window, which will work independently.
> >> > The child window uses different Action classes and different submit
> flow
> >> > altogether.
> >> >
> >> > But after closing the child window, the user can again start editing
> the
> >> > parent page fields and should submit also.
> >> >
> >> > If I reload the parent page,while closing the child window, one pop up
> >> > warning message comes out and all the parent window field values get
> >> reset,
> >> > which are not desirable.
> >> >
> >> > Can any one knows how to do it. I am using Struts1.
> >> >
> >> > Thanks
> >> >
> >>
> >
> >
>

Reply via email to