facebook

question on struts.

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #257986 Reply

    pablogmuller
    Member

    Hi,
    I have an action that fills the elements a dropdown list. Then I have a button that calls a javascript function that removes one of these elements (<option> element) and adds it to another dropdown list.
    This is working fine, I can see this element disappering from one list and appearing in the other. But then, inmediatly, everything goes back to the original state. I included a couple of System.outs in the action, and I realized that after pressing the button it goes back to the action that reloads the page just as it did the first time, which makes me lose all the changes.
    Is there any way to prevent this from happening? I don’t want my page to go back to the action.
    I included the redirect=”true” option in my forward, so now I have the real url in the navigation bar instead of the .do.
    If what I’m trying to do is wrong, if this is the way it should be, is there any other way?
    Thanks a lot.

    #257998 Reply

    pablogmuller
    Member

    Done, I had to add a return false; to the function call.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: question on struts.

You must be logged in to post in the forum log in