on 12-27-2007 12:11 PM
Hi,
I created Tabstrip and table for first tab dynamically. I want to display this table data for second tab dynamically.
1) How to enter data data in the table.
2) How to add view to the tab.
3) Whenever i click the checkboxes in table , corresponding tab will be visible in view. How it is?
These all are dynamically only.
Plz help me, it's very urgent.
Thanks
KSR
Hi,
1) How to enter data data in the table.
Create an element of the node bound to the table or to make it editable initially set the* cardinality of the node bound to 1..n*
2) How to add view to the tab.
You can use viewcontainer UI element to add views to a tab. Place this control in the tab and from window embed the view want.
3) Whenever i click the checkboxes in table , corresponding tab will be visible in view. How it is?
Create a context attribute and bind this to the selectedTab property of the tab and set the ID of the tab to be selected.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In following manner you can create a dynamic node and bind to a dynamically created table
(1)You can create a Node dynamically for Table (data source binding)
IWDNodeInfo tableNodeInfo = wdContext.getNodeInfo().addChild("TABLE_ID", null,true, CMICardinality.MANY,CMICardinality.MANY, true, null);
(2) In Next Step add the attributes in following manner.
IWDAttributInfo attr=tableNodeInfo.addAttribute("att1","com.sap.dictionary.string");
(a)In wdDoModify method create your table dynamically
IWDTable table=(IWDTable)view.createElement(IWDTable.class,"DetailTable");
Binding table with the data source
table.bindDataSource(tableNodeInfo.getName());
(b)Creating Column and cellEditor
IWDTableColumn tableColumn =(IWDTableColumn)view.createElement(IWDTableColumn.class,"tableColumn");
IWDCaption tableHeaderCaption = (IWDCaption)view.createElement(IWDCaption.class,"tableHeaderCaption");
IWDInputField tableCellInputField= (IWDInputField) view.createElement(IWDInputField.class,"tableCellInputField");
(c)binding inputfield value
tableCellInputField.bindValue(tableNodeInfo.getName()"."attr.getName());
REgards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi KSR,
Dont add view to the tab. Create one View in that create tabstrip UI element add your specific table to the corresponding tabstrip content area. so that you easily toggle between the tab using action button.
Code snippet for changing tab view:
wdContext.currentContextElement().setSelectedTab("Tab1");
Dynamic table creation code snippet you can find here(SDN).
Let me know if you need more details.
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.
Hi KSR,
As per your requirements I can see you want to show data dynamically between two tabs according to checkbox action. In this case I would suggest you to create tabstrib using UI element under the content area you create required UI elements rather than adding(embeding) view to the tabstrip.
Dynamic table sample code: [Here|;
Regards, Suresh KB
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.