on 09-27-2007 12:05 PM
hi,
I am unable to find the plugin "com.sap.tc.webdynpro.tests.utils.TableSorter" in the available plugins.
What can be done about that??
Please help
Thanks,
Sirisha Matta.
Hi
Check this blog
/people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s
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
You will get TableSorter.java file..just download it
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not confident, but this may be correct( Please somebody can correct if I am wrong). Steps are as follows:
1) Create context variable of type TableSort( I ahve doubt here)
2) table properties:<b>sort property</b> assocaite sort method ---> create a method sort with code as follows
wdContext.currentContextElement().getTableSorter().sort(
wdEvent,
wdContext.nodeEtb_Cbrgem_Dta());
Regards,
ganga.
Hi,
from the blog
Add the TableSorter class TableSorter.java to the new package folder src/packages/com/sap/tc/webdynpro/tests/utils
Declare a new context attribute TableSorter of type com.sap.tc.webdynpro.tests.utils.TableSorter within the view controller context.
Declare a new action with name Sort (or SortCustomers in this example) and with the associated action event handler onActionSort() to the view controller.
Implement the following source code in the wdDoModifyView()-hook-method of the view controller:
public static void wdDoModifyView(
IPrivateWork wdThis, IPrivateWork.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
if (firstTime) {
IWDTable table = (IWDTable) view.getElement("CustomerTable");
wdContext.currentContextElement().setCustomerTableSorter(
new TableSorter(table, wdThis.wdGetSortCustomersAction(), null, new String[] { "CustomerTable_Name" }));
}
//@@end
}
In case you apply the new generic UI service which automatically creates all custom extension fields (only supported for Adaptive RFC models) in the view layout you must additionally invoke the IWDView interface. By default, custom extension fields are created automatically after the first call to wdDoModifyView() that follows the creation of a parent element (e.g. table) that aggregates custom extension fields. Of course, this only relates to custom extension fields that have been explicitly configured by an administrator for the current user role. In case you want to modify these custom extension fields (e.g. making table columns sortable) you must call the method IWDView.nowCreateAllCustomExtensionFields() before:
public static void wdDoModifyView(IPrivateWork wdThis, IPrivateWork.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
if (firstTime) {
view.nowCreateAllCustomExtensionFields();
IWDTable table = (IWDTable) view.getElement("CustomerTable");
wdContext.currentContextElement().setCustomerTableSorter(
new TableSorter(table, wdThis.wdGetSortCustomersAction(), null, new String[] { "CustomerTable_Name" }));
}
//@@end
}
Organize imports within the view controller class so that import com.sap.tc.webdynpro.tests.utils.TableSorter; is added.
Implement the following source code in the action event handler onActionSort() (or onActionSortCustomers in this example).
//@@begin javadoc:onActionSortCustomers(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionSortCustomers(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionSortCustomers(ServerEvent)
wdContext.currentContextElement().getCustomerTableSorter().sort(wdEvent, wdContext.nodeCustomers());
//@@end
}
Regards
Ayyapparaj
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.