version: v8.3p_2012-12-28/Pro Deployment (built 2012-12-28)
I use Hibernate-Beans and autoDerived Datasources. There are two classes with an One-To-Many relationship.
I use "foreignKey" to create the relationship, "displayField" to set the displayed field and editorType="SelectItem" to let the user choose between the instances of the referenced class (or rows of the corresponding table).
This works fine, when I use the datasource for a DynamicForm. The user can select the referenced instance, submit and the database is updated fine.
But it doesn't work for a ListGrid. The Column is blank and the DropDownList of the filter shows two empty cells.
Neither does it work for a details viewer, the field is empty.
So, how can I make it work with ListGrid and DetailsViewer too?
Datasources
I use Hibernate-Beans and autoDerived Datasources. There are two classes with an One-To-Many relationship.
I use "foreignKey" to create the relationship, "displayField" to set the displayed field and editorType="SelectItem" to let the user choose between the instances of the referenced class (or rows of the corresponding table).
This works fine, when I use the datasource for a DynamicForm. The user can select the referenced instance, submit and the database is updated fine.
But it doesn't work for a ListGrid. The Column is blank and the DropDownList of the filter shows two empty cells.
Neither does it work for a details viewer, the field is empty.
So, how can I make it work with ListGrid and DetailsViewer too?
Datasources
Code:
<DataSource ID="rolle" serverType="hibernate" schemaBean="de.bml.web.versandanzeige.server.model.Rolle" autoDeriveSchema="true"> <fields> <field name="aktiv" hidden="true" /> <field name="bezeichnung" /> </fields> </DataSource>
Code:
<DataSource ID="nutzerlogin" serverType="hibernate" schemaBean="de.bml.web.versandanzeige.server.model.NutzerLogin" autoDeriveSchema="true"> <fields> <field name="aktiv" hidden="true" /> <field name="passwortHash" hidden="true" /> <field name="kennung" /> <field name="nachname" /> <field name="vorname" /> <field name="rolle" foreignKey="rolle.id" displayField="bezeichnung" editorType="SelectItem" /> <field name="idExtern" /> </fields> </DataSource>
Comment