on 10-03-2006 8:25 AM
Hi ALL,
I have a table with four columns. One out of them is a unique column. I want to filter the table for 1000 of records w.r.t. the unique column.
Code snippets will be appreciated.
Regards
DK
Hi Dipendra,
See this blog: <a href="/people/subramanian.venkateswaran2/blog/2005/05/10/filtering-table-values-using-webdynpro Table Values using WebDynpro</a>
Regards,
SK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi:
try:
/people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create one context value attribute with String datatype for ex. Filter_Value. And bind this attribute to the filterValue property of the table column.
write the following code in OnFilter event of the table.
String filterName = wdContext.currentContextElement().getFilter_Value();
if(filterName!=null && !filterName.equals(""))
{
// Here, call the method (or) write the code which is used to load the table.
IPrivate<View>.I<Table_Node> myNode = wdContext.node<Table_Node>();
int n = myNode.size();
HashMap filterMap=new HashMap();
int val=0;
for (int i = n - 1; i >= 0; i--)
{
String value = (String) myNode.get<Table_Node>ElementAt(i).get<Attribute_Name>();
if (value.toLowerCase().startsWith(filterName.toLowerCase()))
{
IPrivate<View>.I<Table_Node>Element myElement = myNode.get<Table_Node>ElementAt(i);
filterMap.put("Elem" + val,newElement);
val++;
}
}
myNode.invalidate();
for(int j=0;j<val;j++)
{
myNode.addElement((IPrivate<View>.I<Table_Node>Element)filterMap.get("Elem" +j));
}
}
regards
karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.