on 03-05-2008 11:12 PM
In design time in NWDS, my table headers have this up/down arrow icon that is visible to indicate sorting.
At runtime it is not displayed. How come?
HI KF,
You want the icon should be on table header at intial screen call. This sort icon will appear only when you perform sort action. and if you want to make that icon visible befor applying sorting then do one thing.
wdContext.currentContextElement().getContextOf Table().getColumn(no of col where you want icon).getHeader().setImageSource("~sapicons/s_b_srtu.GIF"//or any icon as your wish);
using this method you can apply any icon to your table header..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi KF,
According to the Node Structure
Employee
|----
name
|----
no
|----
sal
public static void wdDoModifyView(IPrivateEmployeeView wdThis, IPrivateEmployeeView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
if (firstTime) {
IWDTable sortTable = (IWDTable) view.getElement("Put the table id here");
<b>
wdContext.currentContextElement().setEmployeeTableSorter(new TableSorter(sortTable, wdThis.wdGetSortEmployeeAction(), null,
new String[]{"name","no","sal"})); </b>
//Instead of column id passes the attribute name of the node that is bound with the table.
}
}
//EmployeeTableSorter is the context attribute of type .utils.TableSorter
public void onActionSortEmployee(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionSortFundID(ServerEvent)
wdContext.currentContextElement().getEmployeeTableSorter().sort(wdEvent, wdContext.nodeEmployee());
//@@end
}
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very strange....I have implemented sorting and filtering on my table and it works. However the little sort icon does not appear in the upper left corner of the first column and the up/down arrows do not appear to the right of my column headings.
After I perform a sort, the icon appears. After I perform a filter the icon appears.
However on the initial screen the user will not know that there is sorting functionality because the arrows dont appear, neither will they know that filter exists cause the icon does not appear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My table columns only have the Event called "onAction" (There is no event called "onSort"), however I created an action call onClickColumn and bound it to the "onAction" and still I do not see the arrow icons.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please look at the following article, it should help you. I guess you haven't implemented the necessary code for sorting. Sorting is not automatically available in WD atleast with older packages.
/people/kapil.kamble/blog/2006/12/21/how-to-get-ready-made-filter-for-your-web-dynpro-table-with-minimal-coding
Thanks.
MSR
Hi
Let me know how you created the table by giving apply template.
Check whether you created sortting action.
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Every table has a attribute called onSort.So,you have to create a action Sort and bind it to the onSort attribute of the table.Then only the icons will be visible at runtime.
Regards,
Sudhir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.