on 12-12-2006 4:12 PM
Quite often I have header details relationships that I want to display. The volumes of data are typically small, so rather than make multiple trips to the database I choose to load all the data into context during the init routine. Implementing an efficient way to dispay this data and keep the header details relationship syncronized on the screen is where I am looking for suggestions.
A good example would be selecting a user from a list and displaying details of that user in a series of text views.
Currently to implement this, I load all the user detail into separate elements within a node. Simultaniously I load a value set with key information which is then used by a drop down list. A series of text views are bound to attributes in the context outside the detail node. These attributes contain the currently selected user detail information. When a user is selected from the drop down list, the select event fires, and a search is performed of all the detail node elements for that key. Once found, the user detail information is copied from the appropriate element to the corresponding 'current value' attributes.
This process seems a bit cumbersome to me. I am wondering if there are more efficient ways to manage this routine scenario. Possibly there is a way of binding the text views directly to the attributes in the detail node and switching the element that is currently displayed? I am just not aware of any way to do that.
Any suggestions would be greatly appreciated
-Sheldon
Say you have a context node "Users", cardinality 0:N, with attributes like "Name" etc.
Use a DropDown<b>ByIndex</b> element, bind property "texts" to attribute "Name". Assign an empty action to the "onSelect" event.
Create a form for the details, bind the contained InputField, TextView, whatever to the attributes inside node "Users".
Then you can select a user from the dropdown list (which displays the user names) and the detail form automatically displays the data of the (lead-)selected context element.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.