J
Joshua
Im using Struts 1.1 and Im new and dont have a sense of when to do
what -- so,
I have one action designed to find a recordset -- it uses OJB and
stores it in the session under the known key for the ActionForm that
will later then be used t edit it. This way, when the Action finishes
and forwards to the view (which happens to be the JSP which is capable
of editing such a bean), the form is prepopulated. Naturally, when you
click ok on the form its a whole different process.
Is this appropriate? is there some more elegant solution besides
sticking stuff in the session under known keys? How would the
prototypical find record to edit/edit record sequence go in a Struts
app? is there way to make the whole thing one action such that one
action mapping needs to be written to support it?
Also, Im wondering about to customize what gets found. I think perhaps
interaction with a form which in turn flows to an Action that puts the
id (which OJB can then use to materialize the object) is the best
approach. But Could one just as elegantly stick a whole DAO i nthe
session and not fetch it later?
Lastly -- how would I use get style variables? Are they available in
an action? Where do they die in the processing chain ? That is, in all
the stages of any given action, what part would have the request
variable under ?id=23 or some such thing? I know it cant be ideal to
use it in the view, so wahts most appropriate.
Thanks in advance for your help,
Joshua
what -- so,
I have one action designed to find a recordset -- it uses OJB and
stores it in the session under the known key for the ActionForm that
will later then be used t edit it. This way, when the Action finishes
and forwards to the view (which happens to be the JSP which is capable
of editing such a bean), the form is prepopulated. Naturally, when you
click ok on the form its a whole different process.
Is this appropriate? is there some more elegant solution besides
sticking stuff in the session under known keys? How would the
prototypical find record to edit/edit record sequence go in a Struts
app? is there way to make the whole thing one action such that one
action mapping needs to be written to support it?
Also, Im wondering about to customize what gets found. I think perhaps
interaction with a form which in turn flows to an Action that puts the
id (which OJB can then use to materialize the object) is the best
approach. But Could one just as elegantly stick a whole DAO i nthe
session and not fetch it later?
Lastly -- how would I use get style variables? Are they available in
an action? Where do they die in the processing chain ? That is, in all
the stages of any given action, what part would have the request
variable under ?id=23 or some such thing? I know it cant be ideal to
use it in the view, so wahts most appropriate.
Thanks in advance for your help,
Joshua