Hello, I am using SmartGWTEE 2.2 to build a user management component. I am customizing the SmartGWTEE showcase example. I need help getting a different icon image to indicate that a user is of a certain role. For example, I would like it to default to person.png, although if it's a manager, have it change to manager.png. Can someone assist me?
Here is the relevant code so far:
EntryPoint:
employees.ds.xml:
Sample Data Output (expressed in XML)
Regards,
Brant
Here is the relevant code so far:
EntryPoint:
Code:
treeGrid.setDataSource(DataSource.get("employees")); treeGrid.setNodeIcon("icons/16/person.png"); treeGrid.setFolderIcon("icons/16/person.png"); treeGrid.setCanReorderRecords(true); treeGrid.setCanDragRecordsOut(true); treeGrid.setCanAcceptDroppedRecords(true); treeGrid.setAutoFetchData(true); treeGrid.setShowOpenIcons(false); treeGrid.setDropIconSuffix("into"); treeGrid.setClosedIconSuffix("");
Code:
<field name="partyId" title="Party ID" type="text" primaryKey="true" required="true"/> <field name="managerPartyId" title="Manager" type="text" required="true" foreignKey="partyId" rootValue="MY_INC" detail="true"/> <field name="roleTypeIdTo" title="roleTypeIdTo" hidden="false" type="text" length="128"/>
Code:
<List> <employee> <partyId>TRONIX</partyId> <managerPartyId>MY_INC</managerPartyId> <roleTypeIdTo>DEPARTMENT</roleTypeIdTo> </employee> <employee> <partyId>JohnSmith</partyId> <managerPartyId>MY_INC</managerPartyId> <roleTypeIdTo>EMPLOYEE</roleTypeIdTo> </employee> <employee> <partyId>JaneDoe</partyId> <managerPartyId>MY_INC</managerPartyId> <roleTypeIdTo>MANAGER</roleTypeIdTo> </employee> </List>
Brant
Comment