on 09-25-2009 7:58 AM
Hi Experts,
I have a Group UI element under Root Ui element. Now in wdDoinit i have crerated a dynamic table. Can some one suggest how can i add my table in that Group UI element?
Regards
Pranav
Hi Pranav,
you can only add dynamic elements in the wdDoModifyView method of your view.
So you best store your table element in the view-context, then use the following in your doModify:
// get the Table from context (may differ)
IWDTable myTable = wdContext.currentContextElement().getMyTable();
// get the group from view
IWDGroup group = view.getElement("<MYGROUP_ID>");
group.addChild(myTable);
hope that helps.
Jan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting table data, which includes data that will appear in table as well as no. of coulmns, from a web service. Once i know the no. of cloumns, this table is just a static display table. So, i dont want to modify it everytime there is some modification in view it can slow down the loading of "view in explorer".
If i am violating the programming model, i think i can keep the table creation code in wddomodify with first time condition.
Will that be fine?
Regards
Pranav
Edited by: Pranav Nagpal on Sep 25, 2009 12:50 PM
The general technique for such use-cases is to use a boolean context attribute, say "tableStructureInvalid". In the controller method that invalidates the table structure, set the flag to true. In wdDoModifyView(), not only at "firstTime", check the flag, rebuild the table structure as needed and set the flag to false again.
Armin
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.