wdj - a generic java class for filtering web dynpro tables · 2019. 11. 12. · wdj - a generic...

37
WDJ - A Generic Java Class for Filtering Web Dynpro Tables SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 1 WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro Java Summary Web Dynpro Table offers a Table Sorter Java Class that can be directly used to sort any table with very few line of coding. It is a powerful tool, easy to implement and easy to use. Web Dynpro Table offers also a filtering possibility described within this article. Author: Peter Vignet Company: SAP Labs Created on: 08 January 2007 Author Bio Peter joined SAP Labs, Palo Alto as a senior developer in 2001 for Web Dynpro Composite Applications on NetWeaver platform. Previously Peter was involved in consulting and engineering for various industries. Peter has a dual US Master in Industrial Engineering and Operations Research. He is also Certified Sun Java Programmer; Certified in Production Inventory Management (APIC); Certified System Integrator (IIE); Certified Plant Engineer (AIPE ) ;Registered Professional Engineer (P.E.) in California; Registered European Engineer.

Upload: others

Post on 30-Mar-2021

11 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 1

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

Applies to: SAP NetWeaver 04s, Web Dynpro Java

Summary Web Dynpro Table offers a Table Sorter Java Class that can be directly used to sort any table with very few line of coding. It is a powerful tool, easy to implement and easy to use. Web Dynpro Table offers also a filtering possibility described within this article. Author: Peter Vignet Company: SAP Labs Created on: 08 January 2007

Author Bio Peter joined SAP Labs, Palo Alto as a senior developer in 2001 for Web Dynpro Composite Applications on NetWeaver platform. Previously Peter was involved in consulting and engineering for various industries. Peter has a dual US Master in Industrial Engineering and Operations Research. He is also Certified Sun Java Programmer; Certified in Production Inventory Management (APIC); Certified System Integrator (IIE); Certified Plant Engineer (AIPE ) ;Registered Professional Engineer (P.E.) in California; Registered European Engineer.

Page 2: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 2

Table of Contents Introduction .................................................................................................................................. 2 Table Filter ................................................................................................................................... 3 Filtering capabilities:..................................................................................................................... 4

Step 1: Add TableFilter............................................................................................................. 4 Step 2: Create Nodes ............................................................................................................... 4 Step 3: Associate Filter to Column ........................................................................................... 5 Step 4: Create Table Filter in Context View ............................................................................. 6 Step 5: Create filter Action........................................................................................................ 8 Step 6: Code Filter Action......................................................................................................... 8 Step 7: Code wdDoModifyView................................................................................................ 9 Step 8: Add explanation: ........................................................................................................ 10

Filtering Icons............................................................................................................................. 10 Filtering Drop down: ............................................................................................................... 12 Updating the all data node from the table node. .................................................................... 13

Tips & Trick: ............................................................................................................................... 17 If the data of the AllDataNode are not changed: ................................................................... 17

Header 2 ......................................................................................Error! Bookmark not defined. Header 3...................................................................................Error! Bookmark not defined.

Java Web Dynpro Table Filter

Introduction Web Dynpro Table offers a Table Sorter java Class that can be directly used to sort any table with very few line of coding. It is powerful tool, easy to implement and use. Web Dynpro Table offers also a filtering possibility through the filtering row that allows filter input. The Filtering row is the first row. Only the UI is provided, the filtering action is not. The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the filtering action to be executed (see SAP UI Web Dynpro Table documentation). The Java Class described below intends to offer a filtering tool as easy to implement and to use as the Table Sorter Java Class.

Page 3: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 3

Table Filter The Java Web Dynpro TableFilter is a Java class. It filters the column of a table according the filter value located at the top of a column. It can be implemented in few steps.

Here is an example of filtering using the Table Filter java class:

When the TableFilter’s filter action is triggered, the filter method passes two nodes. The first node contains all the data and the table’s node, the node that show the data. The TableFilter populates the table node from the all data node according the filter values. Filtering is done for each filter value of each column , only the row matching all the filters are shown.

Page 4: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 4

Filtering capabilities: The table filter has the following capabilities: Strings : if the filter value is a “a” it returns any fields that as a “a” , what ever is the position of the a in the string and does not makes difference between upper case and lower case. It also accepts the # (exclude) or (=) include sign in first position. Numeric values , dates, times: It filter for the exact value, a range(~) , include(=) , exclude(#) sign. The include or exclude sign should be in first position. For range “~100”, gives the values up to 100 included;”1~100” gives all values between 1 and 100 , 1 and 100 included;” 100~” gives all the values about 100 , 100 included Boolean values: Booleans can be filter using include (=) or exclude (#). Icons: Icons can be filtered according there legend. Legend is language dependant. Icons legend can be shown as a tool tip of the icon.

Quick Steps for default implementation: First we will speak about the quick default implantation. Then we will see how we can improve the default implementation. The default implementation assumes that the table node is a value node and drop down and icons if any in the table are not filtered and no columns are updatable.

Step 1: Add TableFilter Add the table filter to the package.

Step 2: Create Nodes The filter table needs 3 nodes (see figure below) One table node, on filter node, one all data node. All these nodes should be under the root node context. The All data node that contains always all the data , it is called in the figure below “sourceNode” . The “FilterNode” contains the filter values. The attributes of the SourceNode & TableNode are identical. They have the same attribute names; and the attributes with the same name are of the same type. The Filter node is of cardinality 1,1 and contains the values of the filter , one attribute per column you want to filter. All the filter attributes are of type string.

Page 5: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 5

Step 3: Associate Filter to Column Each column that you want to filter must have a filter.

Page 6: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 6

Step 4: Create Table Filter in Context View In the view controller create a context attribute “TableFilter” . Its type is TableFilter:

The details steps to do it are : The type is chosen by selecting the “…” button

Then select button Java Native Type & Browse button:

Page 7: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 7

Page 8: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 8

Step 5: Create filter Action Go to the Actions tab and create an action with the name filter.

Step 6: Code Filter Action Go to the implementation tab and under the onActionFilter() put the following code: public void onActionfilter(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionfilter(ServerEvent)

wdContext.currentContextElement().getTableFilter().filter(wdContext.nodeSource(), wdContext.nodeTable(),null);

//@@end

}

Page 9: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 9

Step 7: Code wdDoModifyView Switch to the method wdDoModifyView and enter the following source code: public static void wdDoModifyView(IPrivateTableFilterCV wdThis, IPrivateTableFilterCV.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

if (firstTime ) {

IWDTable table = (IWDTable) view.getElement("Table");

wdContext.currentContextElement().setTableFilter(

new TableFilter(table, wdThis.wdGetFilterAction(), wdContext.nodeSource(),null));

}

//@@end

}

“Table” is the id of the UI table:

Page 10: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 10

At the first time wdDoModifyView initialize the table filter. The constructor of the table filter for each column finds the associated filter and the needed comparator to perform the column filtering.

Step 8: Add explanation: Add an explanation of the filter’s capabilities above you table:

The text could be like this: Character fields are filtered for any character in the field, include =, exclude #. Numeric, Date fields can be filtered for exact value, range ~, exclude #; Check boxes can be filtered for include = or exclude #; Icon by legend.

Improving the default implementation The default implementation can be improved to filter icons, dropdown, and update the all data node, if the table has been updated or if the table had some rows that have been added or deleted.

Filtering Icons A icon is filtered according its legend., you need in the all data node and the table node a attribute for the legend icons (legend icon are language dependent and will have to be translated) so in the TableFilter constructor the last parameter is a hash table that indicates the mapping between the icon column ids and the icon legend attribute. The constructor becomes: if (firstTime ) {

// mapping of the icon column to the legend column

Hashtable hash=new Hashtable(); hash.put("Icon","IconLegend");

// table constructor has the hash table as a parameter

IWDTable table = (IWDTable) view.getElement("Table");

wdContext.currentContextElement().setTableFilter(

wdContext.currentContextElement().setTableFilter(

new TableFilter(table, wdThis.wdGetFilterAction(), (IWDNode)wdContext.nodeSource(),hash));

}

The logic is explained in the figure below.

Page 11: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 11

The result is:

Page 12: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 12

Warning: never make a column legendIcon in the table. The reason is that at initialization of the TableFilter will automatically associate the legendIcon column with the legendIcon attribute. The icon mapping given by the hashtable will be disregarded.

Filtering Drop down: Since drop down shows text but the column value is a key, the filtering must be done the same way the icon filtering is done. This means that at the initialization, the hashtable indicates a mapping between the drop down column and the node attribute to filter. In our example the column shown is owner, but the filtering is done on the attribute ownertext.

Page 13: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 13

Updating the all data node from the table node. Default implementation does not update the all data node. If the table is updatable, and some data are updated, or some rows are added or deleted, the TableFilter does not update the all data node, the “sourceNode” in our example. The DC has to do the update.

The Source Node (all data) and the Table Node should be under the root context. If you want the table node to update the source node, see paragraph “Enhancing the default implementation if the all data node needs to be update from the table node.” If the table has be updated or if some rows have been added or deleted. The All data node needs to be updated from the table node. TableFilter has currently two methods that are doing that. To update the AllDataNode from the table node, each method has to know what attribute is the unique identifier of the element (this identifier cannot be the element index)

Page 14: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 14

The method to update is: public void updateAllDataNodeElment( IWDNode sourceNode, IWDNode targetNode, String attributeRowId, boolean addRowOnFly);

String attributeRowId: is the attribute name that uniquely identify the rowed, this attribute is of type String. Boolean addRowonFly : if a row has been added in the table not only the updated existing row will be updated in AllDataNode but if a row has been created, if the flag is set to true a new element is created in the AllDataNode. The method to delete is:

public void deleteAllDataNodeElement(IWDNode sourceNode, IWDNode targetNode, String attributeRowId, ArrayList idsToDelete)

String attributeRowId : is the attribute name that uniquely identify the row, this attribute is of type String.

ArrayList idsToDelete: contains a list of the unique row identifier to delete.

Page 15: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 15

Coming back to our example , the table has now three buttons “Update”“Add “ & “Delete ” for adding or deleting a row. First we update the first row , we change the integer column from 1000 to 1, By pressing the button update and directly invoking the method updateAllDataNodeElment , the all data node is updated and so the table can be filtered and this new value will be taken into account.

If we have a drop down update before invoking the updateAllDataNodeElment method, the table attribute “Ownertext” should be updated accordingly.

Page 16: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 16

Continuing with our example , using the button “Add” add a new row to the table, the “Add” button invoke at the end the updateAllDataNodeElment with the boolean addRowOnFly= true that update the all data node .and a new filtering will take into account the new row.

Consequently a new filtering will take into account the new row.

Inversely, by selecting motile rows and pressing the “Delete “ button the deleteAllDataNodeElement method is invoked and the row are deleted from the table node and the all data node.

Page 17: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 17

So the next filtering will be accurate and take into account the fact that some rows have been deleted.

Tips & Trick:

If the data of the AllDataNode are not changed: If you initiate the TableFilter with the AllDataNode fully populated, and the data are not changed, when using the filter action, you can pass a null instead of the AllDataNode, the method will retrieve the data from the AllDataNode you pass at the initialization. Or the last time you passed it through the filter action.

Page 18: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 18

TableFilter Class Code package com.pv.test.tablefilter.utils; import java.io.FileWriter; import java.io.IOException; import java.math.BigDecimal; import java.sql.Date; import java.text.Collator; import java.text.NumberFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.StringTokenizer; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDAbstractDropDownByIndex; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDAbstractDropDownByKey; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDAbstractInputField; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDAbstractTableColumn; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDCaption; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDCheckBox; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDLink; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDProgressIndicator; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDRadioButton; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTable; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTableCellEditor; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTableColumn; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTableColumnGroup; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTextEdit; import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTextView; import com.sap.tc.webdynpro.progmodel.api.IWDAction; import com.sap.tc.webdynpro.progmodel.api.IWDAttributeInfo; import com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent; import com.sap.tc.webdynpro.progmodel.api.IWDNode;

Page 19: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 19

import com.sap.tc.webdynpro.progmodel.api.IWDNodeElement; import com.sap.tc.webdynpro.progmodel.api.IWDViewElement; import com.sap.tc.webdynpro.progmodel.api.WDCopyService; import com.sap.tc.webdynpro.services.sal.localization.api.WDResourceHandler; /** * Helper class that makes a Web Dynpro table filterable. */ public final class TableFilter { public TableFilter(IWDTable table, IWDAction filterAction, IWDNode sourceNode, Hashtable hashicons) { init(table, filterAction, sourceNode, hashicons); } private void init(IWDTable table, IWDAction filterAction, IWDNode sourceNode, Hashtable hashicons) { this.table = table; // sanity checks if (sourceNode == null) throw new IllegalArgumentException("SourceNode must be given"); if (filterAction == null) throw new IllegalArgumentException("Filter action must be given"); if (table == null) throw new IllegalArgumentException("Table must be given"); if (table.bindingOfDataSource() == null) throw new IllegalArgumentException("Data source of table with id '" + table.getId() + "' must be bound"); this.sourceNode = sourceNode; if (hashicons != null) { this.hashIcon = new Hashtable(); this.hashIcon = hashicons; } String dataSourcePrefix = table.bindingOfDataSource() + "."; //works on columns setFiltersForColumns(dataSourcePrefix, table.iterateColumns(), sourceNode); setFiltersForColumns(dataSourcePrefix, table.iterateGroupedColumns(), sourceNode); //set up the table properties table.setOnFilter(filterAction); filterAction.setEnabled(true); //filterAction.setText("TESTTTTTT"); logString("filter text"+filterAction.getText()); this.sourceNode = sourceNode;

Page 20: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 20

} /** * Try to make the given columns filtertable */ private void setFiltersForColumns(String dataSourcePrefix, Iterator columnIterator, IWDNode sourceNode) { attributeSource = new Hashtable(); for (Iterator iter = sourceNode.getNodeInfo().iterateAttributes(); iter.hasNext();) { IWDAttributeInfo attribInfo = (IWDAttributeInfo) iter.next(); String attribName = attribInfo.getName(); attributeSource.put(attribName, attribInfo.getSimpleType().getBuiltInType()); } int index = 0; for (Iterator it = columnIterator; it.hasNext(); ++index) { // for every column: try to make it bindable IWDAbstractTableColumn abstractColumn = (IWDAbstractTableColumn) it.next(); if (abstractColumn instanceof IWDTableColumn) { IWDTableColumn column = (IWDTableColumn) abstractColumn; String columnId = column.getId(); Comparator comparator = null; NodeElementByAttributeComparator elementComparator = null; String bindingOfPrimaryProperty = bindingOfPrimaryProperty(column.getTableCellEditor()); String attributeName = null; if (bindingOfPrimaryProperty == null || !bindingOfPrimaryProperty.startsWith(dataSourcePrefix)) { if (hashIcon == null) { continue; } else { if (!hashIcon.containsKey(columnId)) { continue; } else { attributeName = hashIcon.get(columnId).toString(); } } } else { attributeName = bindingOfPrimaryProperty.substring(dataSourcePrefix.length()); if (hashIcon.containsKey(columnId)) attributeName = hashIcon.get(columnId).toString(); }

Page 21: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 21

String attributeInfo = null; if (attributeSource.containsKey(attributeName)) attributeInfo = (String) attributeSource.get(attributeName); elementComparator = new NodeElementByAttributeComparator(attributeInfo, column, comparator); filterForColumn.put(attributeName, elementComparator); } else if (abstractColumn instanceof IWDTableColumnGroup) { //if it is column group -> try to bind the columns of the column group IWDTableColumnGroup columnGroup = (IWDTableColumnGroup) abstractColumn; setFiltersForColumns(dataSourcePrefix, columnGroup.iterateColumns(), sourceNode); } } } /*filter data * * */ public void filter( IWDNode allDataNode, IWDNode targetNode) { if (allDataNode != null) { this.sourceNode = allDataNode; } HashMap FilterValuesByAttribute = prepareFilterValuesByAttribute(); ArrayList ar = new ArrayList(); for (int i = 0; i < sourceNode.size(); i++) { IWDNodeElement el = sourceNode.getElementAt(i); boolean addelement = true; for (Enumeration e = this.attributeSource.keys(); e.hasMoreElements();) { String attributeName = e.nextElement().toString(); Object o1 = el.getAttributeValue(attributeName); if (FilterValuesByAttribute.containsKey(attributeName) && filterForColumn.containsKey(attributeName)) { NodeElementByAttributeComparator elementComparator = (NodeElementByAttributeComparator) filterForColumn.get(attributeName); HashMap valuehash = new HashMap(); valuehash = (HashMap) FilterValuesByAttribute.get(attributeName); String attributetype = elementComparator.attributeInfo; Comparator comparator = elementComparator.comparator; if (valuehash.size()==0){

Page 22: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 22

elementComparator.column.setIsFiltered(false); } else { elementComparator.column.setIsFiltered(true); } addelement = this.evaluateFilteredAttributeValue(valuehash, attributetype, comparator, o1); if (!addelement) break; } if (!addelement) break; } if (!addelement) continue; IWDNodeElement targetElement = targetNode.createElement(); ///***~182 WDCopyService.copyCorresponding(el, targetElement); ar.add(targetElement); } targetNode.bind(ar); } /* delete all data node if the table node had some elements deleted * */ public void deleteAllDataNodeElement( IWDNode sourceNode, IWDNode targetNode, String attributeRowId, ArrayList idsToDelete) { for (int j = sourceNode.size() - 1; j >= 0; --j) { IWDNodeElement els = sourceNode.getElementAt(j); String elsid = els.getAttributeAsText(attributeRowId); if (!idsToDelete.contains(elsid)) continue; sourceNode.removeElement(els); } for (int i = targetNode.size() - 1; i >= 0; --i) { IWDNodeElement elt = targetNode.getElementAt(i); String eltid = elt.getAttributeAsText(attributeRowId);

Page 23: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 23

if (!idsToDelete.contains(eltid)) continue; targetNode.removeElement(elt); } } /*Update all data node if the table node has been updated * if a row has been added in the table node, * the all data node can also be updated by using the using the flag addRowOnFly */ public void updateAllDataNodeElement( IWDNode sourceNode, IWDNode targetNode, String attributeRowId, boolean addRowOnFly) { HashMap hashs = new HashMap(); HashMap hasht = new HashMap(); HashMap hashup = new HashMap(); IWDNodeElement elt; IWDNodeElement els; for (int j = sourceNode.size() - 1; j >= 0; --j) { els = sourceNode.getElementAt(j); String elsid = els.getAttributeAsText(attributeRowId); hashs.put(elsid, els); } for (int i = 0; i < targetNode.size(); i++) { elt = targetNode.getElementAt(i); String rowid = elt.getAttributeAsText(attributeRowId); boolean isInSource = hashs.containsKey(rowid); if (isInSource && !elt.isChangedByClient()) continue; if (!isInSource) { els = sourceNode.createElement(); WDCopyService.copyCorresponding(elt, els); //logString("isInSource"); sourceNode.addElement(els); } else { els = (IWDNodeElement) hashs.get(rowid); WDCopyService.copyCorresponding(elt, els);

Page 24: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 24

} } } /*find if an cloumn has a valid filter * and if so parse the filter and put in a hash table * */ private HashMap prepareFilterValuesByAttribute() { HashMap hashmap = new HashMap(); for (Enumeration e = this.attributeSource.keys(); e.hasMoreElements();) { String attributeName = e.nextElement().toString(); if (filterForColumn.containsKey(attributeName)) { NodeElementByAttributeComparator elementComparator = (NodeElementByAttributeComparator) filterForColumn.get(attributeName); IWDTableColumn column = elementComparator.column; column.setIsFiltered(false); String filtervalue = column.getFilterValue(); if (filtervalue == null || filtervalue.trim().length() == 0) { continue; } String attributetype = elementComparator.attributeInfo; HashMap valuehash = new HashMap(); valuehash = this.detectFilterSign(filtervalue); hashmap.put(attributeName, valuehash); } } return hashmap; } /* generate a filter value into the right object * */ private Object generateObject(String filtervalue, String attributetype, String sign) { Object o2 = filtervalue; try { if (filtervalue == null) {

Page 25: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 25

return o2; } if (attributetype.equalsIgnoreCase("decimal")) { o2 = new BigDecimal(filtervalue); } if (attributetype.equalsIgnoreCase("double")) { o2 = new Double((filtervalue)); } if (attributetype.equalsIgnoreCase("long")) { o2 = new Long(filtervalue); } if (attributetype.equalsIgnoreCase("float")) { o2 = new Float(filtervalue); } if (attributetype.equalsIgnoreCase("short")) { o2 = new Short(filtervalue); } if (attributetype.equalsIgnoreCase("integer")) { o2 = new Integer(filtervalue); //***254 for 2000 ~ } if (attributetype.equalsIgnoreCase("long")) { o2 = new Long(filtervalue); } if (attributetype.equalsIgnoreCase("date")) { try { java.util.Date dtTmp = new java.util.Date(filtervalue); SimpleDateFormat template = new SimpleDateFormat("yyyy-MM-dd"); o2 = Date.valueOf(template.format(dtTmp)); } catch (Exception ex) { o2 = filtervalue; } } if (attributetype.equalsIgnoreCase("time")) { try { SimpleDateFormat timeformater = new SimpleDateFormat("hh:mm:ss", WDResourceHandler.getCurrentSessionLocale()); o2 = timeformater.parse(filtervalue);

Page 26: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 26

} catch (ParseException ex) { o2 = filtervalue; } } if (attributetype.equalsIgnoreCase("boolean")) { if (sign.equalsIgnoreCase(NE)) { o2 = new Boolean(true); } else { o2 = new Boolean(true); } } return o2; }catch (Exception ex){ return filtervalue; } } /*compare object according the filter * */ private boolean evaluateFilteredAttributeValue(HashMap filter, String attributetype, Comparator comparator, Object o1) { boolean accept = true; try{ if (filter == null || filter.size() == 0) //***268 return accept; if (attributetype == null || attributetype.trim().length() == 0) return accept; Object o2 = filter.get("value1"); if (filter.get("sign") == null) { if (o2 != null) { String value1 = filter.get("value1").toString(); o2 = generateObject(value1, attributetype, null); } int compared = comparator.compare(o1, o2);

Page 27: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 27

if (!attributetype.equalsIgnoreCase("string")) { if (compared == 0) { return accept; } else { return (!accept); } } else { if (compared >= 0) { return accept; } else { return (!accept); } } } String sign = filter.get("sign").toString(); String place = filter.get("place").toString(); if (sign.equalsIgnoreCase(EQ) && place.equalsIgnoreCase("S")) { if (o2 != null) { String value1 = filter.get("value1").toString(); o2 = generateObject(value1, attributetype, sign); } else { if (attributetype.equalsIgnoreCase("boolean")) { o2 = generateObject("", attributetype, sign); } if (attributetype.equalsIgnoreCase("string") && o1 != null && o1.toString().trim().length() == 0) { o2 = generateObject("", attributetype, sign); } } int compared = comparator.compare(o1, o2); if (!attributetype.equalsIgnoreCase("string")) { if (compared == 0) { return accept; } else { return (!accept); } } else { if (compared >= 0) { return accept;

Page 28: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 28

} else { return (!accept); } } } if (sign.equalsIgnoreCase(NE) && place.equalsIgnoreCase("S")) { if (o2 != null) { String value1 = filter.get("value1").toString(); o2 = generateObject(value1, attributetype, sign); } else { if (attributetype.equalsIgnoreCase("boolean")) { o2 = generateObject("", attributetype, sign); } if (attributetype.equalsIgnoreCase("string") && o1 != null && o1.toString().trim().length() == 0) { o2 = generateObject("", attributetype, sign); } } int compared = comparator.compare(o1, o2); if (!attributetype.equalsIgnoreCase("string")) { if (compared == 0) { return !accept; } else { return (accept); } } else { if (compared >= 0) { return !accept; } else { return (accept); } } } if (sign.equalsIgnoreCase(R) && place.equalsIgnoreCase("S")) { if (o2 != null) { String value1 = filter.get("value1").toString(); o2 = generateObject(value1, attributetype, sign); } int compared = comparator.compare(o1, o2); if (compared > 0) {

Page 29: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 29

return !accept; } else { return (accept); } } if (sign.equalsIgnoreCase(R) && place.equalsIgnoreCase("E")) { if (o2 != null) { String value1 = filter.get("value1").toString(); o2 = generateObject(value1, attributetype, sign); } int compared = comparator.compare(o1, o2); if (compared >= 0) { return accept; } else { return (!accept); } } Object o3 = filter.get("value2").toString(); if (sign.equalsIgnoreCase(R) && place.equalsIgnoreCase("M")) { boolean accept1 = true; boolean accept2 = true; if (o2 != null) { String value1 = filter.get("value1").toString(); o2 = generateObject(value1, attributetype, sign); } if (o3 != null) { String value1 = filter.get("value2").toString(); o3 = generateObject(value1, attributetype, sign); } int compared = comparator.compare(o1, o2); if (compared >= 0) { accept1 = accept; } else { accept1 = !accept; } int compared2 = comparator.compare(o1, o3); if (compared2 > 0) { accept2 = !accept; } else { accept2 = accept;

Page 30: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 30

} if (accept1 && accept2) { return accept; } else { return !accept; } } return accept; } catch (Exception ex ){ return accept; } } /* parse the filter * */ private HashMap detectFilterSign(String value) { HashMap ar = new HashMap(); String val1 = null; String val2 = null; String sign = null; String place = null; if (null == value) { ar.put("value1", value); ar.put("sign", null); return ar; } if (!value.startsWith(EQ) & !value.startsWith(NE) & value.indexOf(R) < 0) { ar.put("value1", value.trim()); ar.put("sign", null); return ar; } if (value.startsWith(EQ)) { if (value.trim().length() > 1) { val1 = value.substring(1); } else { val1 = "";

Page 31: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 31

val1 = null; } sign = EQ; place = "S"; ar.put("value1", val1); ar.put("sign", EQ); ar.put("place", place); //this.logString("detect3 sign: value1:"+val1); return ar; } if (value.startsWith(NE)) { if (value.trim().length() > 1) { val1 = value.substring(1); } else { val1 = ""; val1 = null; } sign = NE; place = "S"; ar.put("value1", val1); ar.put("sign", NE); ar.put("place", place); return ar; } if (value.startsWith(R)) { if (value.trim().length() > 1) { val1 = value.substring(1); } else { val1 = ""; val1 = null; } sign = R; place = "S"; ar.put("value1", val1); ar.put("sign", R); ar.put("place", place); return ar; } if (value.endsWith(R)) { if (value.trim().length() > 1) {

Page 32: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 32

val1 = value.substring(0, value.length() - 1); } else { val1 = ""; val1 = null; } sign = R; place = "E"; ar.put("value1", val1); ar.put("sign", R); ar.put("place", place); return ar; } if (value.indexOf(R) > 0) { sign = R; place = "M"; val1 = value.substring(0, value.indexOf(R)); val2 = value.substring(value.indexOf(R) + 1); ar.put("value1", val1); ar.put("value2", val2); ar.put("sign", R); ar.put("place", place); return ar; } if (ar.size() == 0) ar.put("value1", value); return ar; } /** * Returns the binding of the given table cell editor's property that is * considered "primary" or <code>null</code> if no such binding exists or no * such property can be determined. */ private static final String bindingOfPrimaryProperty(IWDTableCellEditor editor) { return editor instanceof IWDViewElement ? bindingOfPrimaryProperty((IWDViewElement) editor) : null; } /** * Returns the binding of the given view element's property that is * considered "primary" or <code>null</code> if no such binding exists or no

Page 33: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 33

* such property can be determined. */ private static final String bindingOfPrimaryProperty(IWDViewElement element) { if (element instanceof IWDAbstractDropDownByIndex) return ((IWDAbstractDropDownByIndex) element).bindingOfTexts(); if (element instanceof IWDAbstractDropDownByKey) return ((IWDAbstractDropDownByKey) element).bindingOfSelectedKey(); if (element instanceof IWDAbstractInputField) return ((IWDAbstractInputField) element).bindingOfValue(); if (element instanceof IWDCaption) return ((IWDCaption) element).bindingOfText(); if (element instanceof IWDCheckBox) return ((IWDCheckBox) element).bindingOfChecked(); if (element instanceof IWDLink) return ((IWDLink) element).bindingOfText(); if (element instanceof IWDProgressIndicator) return ((IWDProgressIndicator) element).bindingOfPercentValue(); if (element instanceof IWDRadioButton) return ((IWDRadioButton) element).bindingOfSelectedKey(); if (element instanceof IWDTextEdit) return ((IWDTextEdit) element).bindingOfValue(); if (element instanceof IWDTextView) return ((IWDTextView) element).bindingOfText(); return null; } /** * Instance of a comparator according to the ordering imposed by the * implementation of <code>Comparable</code>. */ private static final Comparator DEFAULT = new Comparator() { /** * Compares the given objects according to the ordering imposed by the first * ones <code>compareTo(Object)</code> function. Furthermore, <code>null</code> * is treated to be less than any object. * * @see java.lang.Comparable#compareTo(java.lang.Object) * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */

Page 34: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 34

public int compare(Object o1, Object o2) { if (o1 == null && o2 == null) { return 0; } if (o1 == null) { return -1; } if (o2 == null) { return -1; } if (o1 instanceof Boolean && o2 instanceof Boolean) { return o1.toString().compareTo(o2.toString()); } if (o1 instanceof Date && o2 instanceof Date) { return ((java.util.Date) o1).compareTo((java.util.Date) o2); } if (o1 instanceof String && o2 instanceof String) { Collator collate = Collator.getInstance(WDResourceHandler.getCurrentSessionLocale()); return o1.toString().toUpperCase(WDResourceHandler.getCurrentSessionLocale()).indexOf( o2.toString().toUpperCase(WDResourceHandler.getCurrentSessionLocale())); } return ((Comparable) o1).compareTo((Comparable) o2); } }; private Hashtable filterForColumn = new Hashtable(); private IWDTable table = null; private Hashtable attributeSource = null;

Page 35: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 35

private Hashtable sourceNodeHash = null; private Hashtable hashIcon = null; private IWDNode sourceNode = null; private IWDNode targetNode = null; String EQ = "="; String NE = "#"; String R = "~"; /** * Generic comparator that compares node elements by a given attribute with * the help of a given comparator. */ public final class NodeElementByAttributeComparator { public NodeElementByAttributeComparator(String attributeInfo, IWDTableColumn column, Comparator comparator) { this(attributeInfo, column, comparator, false, new ArrayList()); } /** * Internal constructor. */ private NodeElementByAttributeComparator( String attributeInfo, IWDTableColumn column, Comparator comparator, boolean compareAsText, Collection subNodes) { if (attributeInfo == null) throw new IllegalArgumentException("attributeInfo must not be null"); if (column == null) throw new IllegalArgumentException("Column must not be null"); if (comparator == null) comparator = DEFAULT; this.attributeInfo = attributeInfo; this.column = column; this.comparator = comparator; this.compareAsText = compareAsText; this.subNodes = subNodes; }

Page 36: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 36

private final Comparator comparator; private final boolean compareAsText; private boolean sortDirection; private IWDTableColumn column; private Collection subNodes; private String attributeInfo; } }

Page 37: WDJ - A Generic Java Class for Filtering Web Dynpro Tables · 2019. 11. 12. · WDJ - A Generic Java Class for Filtering Web Dynpro Tables Applies to: SAP NetWeaver 04s, Web Dynpro

WDJ - A Generic Java Class for Filtering Web Dynpro Tables

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 37

Copyright © Copyright 2006 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.

SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials.

SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages.

Any software coding and/or code lines/strings (“Code”) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.