Hi,
another Intake-related problem: I have a form that should go into 2
different tables (Peers).
Inbetween Intake should validate the fields and on success populate the
Peer-Objects.
I understand it is possible to populate a Peer with form-fields that belong
all to this Peer by using code like this in my action method:
IntakeTool intake = (IntakeTool) context.get("intake");
Group group = intake.get("KundeAnlegenGroup", IntakeTool.DEFAULT_KEY);
if (!group.isAllValid()) {
//Log.debug("Gruppenelemente ung�ltig");
setTemplate(data,"kunden,Anlegen.vm");
return;
} else {
Kunden k = new Kunden();
group.setProperties(k);
k.save();
setTemplate(data,"kunden,Verwaltung.vm");
}
Q: Is it possible to populate multiple Peers automatically?
How do I assign the fields to one of those Peers?
I do have mapToObject and mapToPropterty attributes in each of the
field-elements in my group-definition in intake.xml.
but
Kunden k = new Kunden();
group.setProperties(k);
assigns all my fields to the single Peer Object.
What code to use to populate the Peer-Objects according to the
group-definition in intake.xml, so that both Peer Objects are populated
accordingly.
Regards
Marc
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>