cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josema Alonso" <>
Subject Re: xmlForm on update
Date Sun, 08 Dec 2002 23:15:03 GMT
> I am trying to use xmlForm on my DB actions (enter, update).
> With "enter" I understood, but questions on update:
> I have general actions some like DatabaseAddAction, DatabaseUpdateAction
> use these on my actions.
> So after retrieve data from DB by ID (use DatabaseSelectAction), what the
> next? How to set attributes of Bean?

What about making a method and call it in the perform action in one of the
steps, or use the setters there directly?
I do not know how your actions work but, for example, if your
DatabaseSelectAction returns a ResultSet with just one record, iterate
through it and use the setter methods of the Model Bean for each of the
wanted columns. Making controls in the XML pages referencing the model bean
properties should be enough then. Manipulate the data in the form editing
the required fields, and then use your DatabaseUpdateAction (again in the
perform action, for example after checking the button that was pressed in
the form). I only tried this with Xindice and loading query results in DOM
Nodes, but I'm sure it'll work with a relational database, too.

Hope it helps.

Please check that your question  has not already been answered in the
FAQ before posting.     <>

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

View raw message