Dave Newton wrote:
--- On Thu, 12/4/08, Robert Graf-Waczenski wrote:
<s:textfield name="theValue"
value="#session.mySessionBeanKey.theValue"/>

The form field is only pre-filled if i explicitly use
value="#session...", but with this, [...]

If the action implements modelDriven, and the getModel() call returns the 
session bean under mySessionBeanKey, then you should only need:

<s:textfield name="theValue"/>

The model is pushed onto the stack, so the getTheValue() call would hit the 
model first.

Is that not happening? You actually wouldn't *have* to implement model-driven, 
you could just set the action's instance of the bean class to the value 
retrieved from session, also.

No, this is actually not happening. If i set a breakpoint in my getModel() implementation, i see that getModel() is not even called when the JSP is accessed. It is only called when the action is executed, which is too late (for me, that is).

I'm using Struts 2.0.14, any chance that this is a fixed bug? If it is unknown, i'll go file a bug then.

Robert

Reply via email to