on 04-13-2007 3:42 PM
HI,
I want to implement linktoURL ui element dynamically in a table.
Can you please sugegst mehow to achieve this ?
Regards,
Debasish
What do you mean exactly, adding a table column with LinkToURL as editor at runtime?
Say context looks like:
Rows (node)
-- Url (attribute, string)
and table is bound to node "Rows".
Then the code would be
wdDoModifyView(...)
{
if (<column-to-added>)
{
IWDTable table = (IWDTable) view.getElement("TableID");
IWDTableColumn column = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
table.addGroupedColumn(column); /* use addColumn() in NW04 */
IWDLinkToURL link = (IWDLinkToURL) view.createElement(IWDLinkToURL.class, null);
column.setTableCellEditor(link);
link.bindReference("Rows.Url");
<reset-column-to-be-added>
}
}
<column-to-be-added> denotes a flag (boolean context attribute) used to indicate when the additional column should be added.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What seems to be the issue ?
You need to do this in wdDoModifyView.
Find the table , add a table column element of type LinkURLElement.
Refer this :
Regards,
Subramanian V.<a href="http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/content.htm">Dynamic UI Element Creation</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
If u want to create a rows that contains linkToAction dynamically, then u only need to create elements of node which is bound to the table.
If it is dynamic column creation of table, with one column as LinkToAction, then, do the following
1.Create an action for LinkToAction. Let it be onActionDoThis();
2.Create dynamic table and its columns in wdDomodifyView()
3.Add the LinkToAction Element to the Table as
IWDLinkToAction espnLink=(IWDLinkToAction)view.createElement (IWDLinkToAction.class,"SPNLink");
espnLink.bindText("TextOfLink");
espnCols.setTableCellEditor(espnLink);
tab1.addColumn(espnCols);
4. Set the action of this Link as
espnLink.setOnAction(wdThis.wdGetDoThis());
Please be free to ask, if u didnt understood
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.