1.表的onsort.
解决方案:
加进TableSorter.java类[url]http://loky.iteye.com/blog/221536[/url]
在view的context里加一个Attribute Value:TableSorter其property指定为TableSorter类型。
然后在view的wdDoModifyView方法里加进以下代码:
public static void wdDoModifyView(IPrivateDownpaymentMainView wdThis, IPrivateDownpaymentMainView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
view.nowCreateAllCustomExtensionFields();
if(firstTime){
IWDTable table = (IWDTable)view.getElement("Table_0");
//对所有列排序。
wdContext.currentContextElement().setTableSorter(
new TableSorter(table,wdThis.wdGetSortAction(),null));
//对指定的列排序
/**wdContext.currentContextElement().setTableSorter(new TableSorter(table,wdThis.wdGetSortAction(),null,new String[] {"column name1",...}
*/
}
//@@end
}
新建一个Action,命名为Sort,在里面加入以下代码:
public void onActionSort(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionSort(ServerEvent)
wdContext.currentContextElement().getTableSorter().sort(wdEvent,wdContext.nodeDownpr_List());
//@@end
}
2.上载文件(KM)
解决方案:
加进TableSorter.java类[url]http://loky.iteye.com/blog/221536[/url]
在view的context里加一个Attribute Value:TableSorter其property指定为TableSorter类型。
然后在view的wdDoModifyView方法里加进以下代码:
public static void wdDoModifyView(IPrivateDownpaymentMainView wdThis, IPrivateDownpaymentMainView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
view.nowCreateAllCustomExtensionFields();
if(firstTime){
IWDTable table = (IWDTable)view.getElement("Table_0");
//对所有列排序。
wdContext.currentContextElement().setTableSorter(
new TableSorter(table,wdThis.wdGetSortAction(),null));
//对指定的列排序
/**wdContext.currentContextElement().setTableSorter(new TableSorter(table,wdThis.wdGetSortAction(),null,new String[] {"column name1",...}
*/
}
//@@end
}
新建一个Action,命名为Sort,在里面加入以下代码:
public void onActionSort(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionSort(ServerEvent)
wdContext.currentContextElement().getTableSorter().sort(wdEvent,wdContext.nodeDownpr_List());
//@@end
}
2.上载文件(KM)