views:

102

answers:

1

In my build action, I have an object that I put into my session map.

InputField testField = new InputField();
testField.setName("testName");
testField.setValue("testValue");
sessionMap.put("TEST_FIELD", testField);

In the JSP, I want to build a textfield using this object.

<s:textfield name="#session.TEST_FIELD.value"/>

Upon submit of this form, I'd like to update the session with the new value from the textfield.

And after filling in the textfield and submitting the form it's a part of, this 'testResult' still contains the original value from when the object was built.

String testResult = ((InputField) sessionMap.get("TEST_FIELD")).getValue();

>> testValue

Where am I going wrong?

Thanks!