on 04-16-2008 7:38 AM
hi,
How can I refresh dynamically generated UIElements ?
suppose I have a container and few labels which corresponds to number of elements of a node // node.size(); Those are get populated if we give values for the first time. But when I go back and add/delete one element in the node, that is not reflected. (reason: if(firstTime) ).
I tried
container.removeAllChildren(); and
container.removeChild("label"); too.
But still it shows duplicate id error
please tell me how can the UIElements be refreshed ?
nikhiL
HI Nikhil,
Use
wdContext.wdGetAPI().reset(true);
it`ll refresh each and every UI element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't want to refresh elements which are already displayed.
let me be more specific:
1)
I have a node with 5 elements
: in the second view, 5 containers and 5 labels are added
2)
now, I go back to first view and add one more element
: in second view only 5 elements are displayed since it is coded inside if(firstTime) block.
If I do removeAllChildren() without checking for firstTime, it shows duplicate ID error // while dynamic creation for step 2.
nikhiL
Hi Nikhil,
By changing the second view's property from framework controlled to " when visible ", will help you in destroying the UI elements in the second view as soon as you navigate away from that... Now once you are back in your first view and make the desired changes in there, ensure that your coding in the if (firsttime) of second view is done appropriately to accomodate the changes that you make in your first view...This will resolve your issues with getting duplicate ids...
Regards,
Pinac
Hi Nikhil,
For resetting dynamic UI elements : view.resetView();
This will reset view to the state befoe UI modifications. Then create UI elements again, now with new parameter(s)
Regards, Suresh KB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.