on 05-06-2009 9:16 AM
Hi
I am trying to get the column id by using
wdEvent.getString(<NameOfColumn>);
But I always get null.
Any idea why?
thank you for your help and regards
yuval
Hi,
1. Edit your action and add a new parameter of type int and call it "fromcolum". Check that your event handler is also updated with this new parameter.
2. Add this code to the "wdDoModifyView()":
if (firstTime){
IWDTableColumn column = (IWDTableColumn )view.getElement("<id of the tablecolum UI element>");
column.mappingOfOnAction().addParameter("fromcolum",1);
}
3. In your event handler simply access this parameter to find out which column was clicked.
Thanks
Abhilasha
Edited by: Abhilasha Dahare on May 6, 2009 10:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are working in NW 7.0, you should map the predefined event parameter "col" to an action parameter of type "string". See
In NW >= 7.1 you shouldn't use the "onAction" event anymore.
Armin
Hallo Armin
As you mention elsewhere on the forum javadoc does not specify what "name-of-action-parameter" // (type String) " mean.
Just to recapitualte:
On the one hand I have a col name "Type". Its onAction is bound to onActionSort.
On the other hand I have the wdDoModify whee i have the foll code:
if(firstTime)
{
IWDAbstractTableColumn col = (IWDAbstractTableColumn ) view.getElement("Type");
col.mappingofAction.addSourceMapping(IWDAbstractTableColumn.IWDOnAction.COL,
"wdEvent");
IWDTable table = (IWDTable) view.getElement("MyTable");
wdContext.currentContextElement.setTableSorter(new TableSorter(table, wdThis.wdGetSortAction,
null));
}
In addition of course I have onActionsort:
public void onActionSort(wdevent)
{
wdContext.currentContextElemet().getTableSorter().sort("Type", wdContext.myNode(), false);
wdContext.nodemyNode().moveFirst();
}
I put a berakpoint at TableSorter.sort() and interestingly enough the method returns after
ReversibleComperator reversible = (ReversibleComparator) comperatorForColumn.get(column);
because reversible gets null. Any idea??
Thank you!!
regards
Yuval
Hi Armin
Sorry for the late reply.
Apparently the problem, as always, was the version.
There are two versions of "TableSorter" one is for ECC6 and one for ECC7.
To implement my solution I have been referring to
Bertram Ganz' blog: 'WDTableSorter_NW04s.zipEnhanced Web Dynpro Java TableSorter for SAP '
which can be found here:
/people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s
Hi,
Can you elobrate your problem a bit more.
can you tell us which column id you are trying to access.
Sarbjeet Singh
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 | |
10 | |
7 | |
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.