Hi... As i see, <s:select/> is an Struts2 tag, and it uses OGNL to retrieve objects from your action to jsp...
To solve your problem, you must provide "officeTrialByIdTrialList" getter in you action class... Cheers 2009/7/29 Wojciech Wąsowicz <wojciech.wasow...@gmail.com> > Hi all, > > I am quite new to appfuse. For one i have succesfully generated & > started new application with archetype spring, mvc, hibernate (simple), > generated pojos and application for new tabes but I am stuck with problem > how to solve edition (best select field ) of foreign key > > I have generated model like that: > > @Entity > @Table(name = "office_trial", schema = "public") > public class OfficeTrial extends BaseObject implements java.io.Serializable > { > > /../ > private Set<OfficeTrialNote> officeTrialNotesForIdTrial = new > HashSet<OfficeTrialNote>(0); > /../ > > @OneToMany(fetch = FetchType.LAZY, mappedBy = > "officeTrialByIdTrial") > public Set<OfficeTrialNote> getOfficeTrialNotesForIdTrial() { > return this.officeTrialNotesForIdTrial; > } > > public void setOfficeTrialNotesForIdTrial( > Set<OfficeTrialNote> officeTrialNotesForIdTrial) { > this.officeTrialNotesForIdTrial = > officeTrialNotesForIdTrial; > } > } > > @Entity > @Table(name = "office_trial_note", schema = "public") > public class OfficeTrialNote extends BaseObject implements > java.io.Serializable { > > private OfficeTrial officeTrialByIdTrial; > > /../ > > @ManyToOne(fetch = FetchType.EAGER) > @JoinColumn(name = "id_trial", nullable = false) > public OfficeTrial getOfficeTrialByIdTrial() { > return this.officeTrialByIdTrial; > } > > public void setOfficeTrialByIdTrial(OfficeTrial > officeTrialByIdTrial) { > this.officeTrialByIdTrial = officeTrialByIdTrial; > } > } > > For one - I am not sure if model is correctly (for appfuse generation) > defined. > > I have found following in jsp form: > > <!-- todo: change this to read the identifier field from the other pojo > --> > <s:select name="officeTrialNote.officeTrialByIdTrial.id" > list="officeTrialByIdTrialList" listKey="id" > listValue="id"></s:select> > > What shall I do with that? > > regards > Wojtek > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > > -- Atentamente Óscar Álvarez Vielma (09) 8416 4052