Hi,
I am using DMI-spring-hibernate. I have a scenario like populating Role table records in roles list grid and up on clicking on particular role record I have to show the assigned users in users list grid. The relation ship between roles and the users is many-to-many. I am able achieve data in the userRoleDMI, but I don't know how to map the userRole collection in DataSource, So that I can achieve user data in another listgird. For now I am succesfully achieved roles information in roles list grid ..But related users information mapping in Datasource is the problem. Please help me more details below and help me in this regard.
Properties of Role.java
----------------------
roleId number
roleNm String
userRoles Collection-- this collections contains UserRole.java objects.
Properties of User.java
-----------------------
userId number
userNm String
Properites of UserRole.java
-------------------------
userRoleId number
user User--It is user object
role Role-- It is role object
In my DMI I have data for the entire roles and their collection userroles. But I am not getting idea of mapping user details in below Datasource, so that I can achieve related users data in userslistgrid.
I am using DMI-spring-hibernate. I have a scenario like populating Role table records in roles list grid and up on clicking on particular role record I have to show the assigned users in users list grid. The relation ship between roles and the users is many-to-many. I am able achieve data in the userRoleDMI, but I don't know how to map the userRole collection in DataSource, So that I can achieve user data in another listgird. For now I am succesfully achieved roles information in roles list grid ..But related users information mapping in Datasource is the problem. Please help me more details below and help me in this regard.
Properties of Role.java
----------------------
roleId number
roleNm String
userRoles Collection-- this collections contains UserRole.java objects.
Properties of User.java
-----------------------
userId number
userNm String
Properites of UserRole.java
-------------------------
userRoleId number
user User--It is user object
role Role-- It is role object
In my DMI I have data for the entire roles and their collection userroles. But I am not getting idea of mapping user details in below Datasource, so that I can achieve related users data in userslistgrid.
Code:
<DataSource ID="userRoleDS" serverType="generic"> <fields> <field name="roleId" type="sequence" hidden="true" primaryKey="true"/> <field name="roleNm" type="text" title="Name" length="128" required="true"/> <!-- guide me how to configure users here--> </fields> <serverObject lookupStyle="spring" bean="userRoleDMI"/> </DataSource>
Comment