struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel Belingueres" <>
Subject Re: [S2] One hidden value doesn't get submitted (another one does). Why?
Date Tue, 02 Sep 2008 13:39:58 GMT
I'm just guessing here but consider the following:

Is there any chance that you are being disabling the hidden field
using javascript? (disabled form fields will not be submitted.)

How many forms are in your page? (when you submit one form, other
form's fields are not submitted.)

2008/9/2, Ylva Degerfeldt <>:
> Thanks for your response, Dave.
> I'm sorry about the long mail but I really thought all of that was
> relevant stuff. The problem itself though is (like the subject says)
> that the hidden value "state" doesn't get submitted to the Action, but
> other hidden values (like the String "id" value and the int "index"
> value) do get submitted. I see no logical explanation for this but
> there must be one.
> See more below..
> > If you're always iterating over the list in the session then you'll always get the
values from the list in the session. If your action doesn't change the data in the session
list you'll always see the same thing.
> Ok, but (like I said), in my action I'm setting the list attribute of
> the session to point to the list property in the action. And anyway,
> reading the list values from the JSP works. It's the submitting that
> doesn't entirely work.
> >> [...] (I mean just this "session and Action thing")?
> >
> > If you mean "how do I get the list into the JSP the first time" then that's what
the Preparable interface is for.
> Ok, but do you think this might solve the problem with the hidden
> value not being submitted? (That would be weird but I don't know
> enough about Struts 2 to say the chance doesn't exist.)
> > All of this aside, I think you'd be far better served by not re-rendering the page
and either have hidden input elements, or create an input element, or use Ajax.
> I can't change that structure now. I just want to solve the mysterious
> "hidden value" problem.
> Please help me! There must be something I can do to solve this. I just
> don't know what or where to start.
> /Ylva
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message