PDA

View Full Version : One more question regarding the command object


Michael Kastner
Oct 4th, 2005, 11:54 AM
I know, this might sound confusing, but I couldn't find much in the documentation about the relationship between session, command object, and model

I created an object in session scope in the MultiActionController. This object should serve as a command object in the view, i.e. the form. But how can I make the SimpleFormController recognize this object as form command Object?

The binder doesn't find the session object.

Should I put the command object in the model map? But then again, the scope of the model is request and not session.


Can anybody give me a hint?

Sincerely

Michael Kastner

Colin Yates
Oct 5th, 2005, 08:04 AM
If your SimpleFormController is being backed by an already existing form then you can override formBackingObject to simply retrieve it off the session.

You will still need to populate the SFC with the appropriate name and tell it to store it in the session.