TableFilter.java

Hi,
I need to find the TableFilter.java version referenced in the SAP Article "How to Implement a Web Dynpro for Java Table with Sorting and Filtering Capabilities" (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0cf0997-2e08-2d10-b08e-964a2c04c47a?quicklink=index&overridelayout=true) written by the Web Dynpro Java Team and created on 29 June 2010.
I want to use that specific procedure because I have Netweaver 7.11 and it seemed to me to be the easier method to get things done.
Thank you,
Pietro

It's inside one project of the Web Dynpro for Java Demo Kit (http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproforJavaDemo+Kit)...

Similar Messages

  • Require TableFilter.java for NWDS 04s

    Hi,
    Please provide me code for TableFilter.java for NWDS 04s.
    I tried with the following pdf tutorial
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5996f">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5996f</a>
    But then i encounter the following error while running the application:
       java.lang.NullPointerException
        at com.sap.tc.webdynpro.tests.utils.TableFilter.setFiltersForColumns(TableFilter.java:116)
        at com.sap.tc.webdynpro.tests.utils.TableFilter.init(TableFilter.java:73)
        at com.sap.tc.webdynpro.tests.utils.TableFilter.<init>(TableFilter.java:50)
        at com.adobe.prjpeopickerapp.PrjpeopickerView.wdDoModifyView(PrjpeopickerView.java:216)
        at com.adobe.prjpeopickerapp.wdp.InternalPrjpeopickerView.wdDoModifyView(InternalPrjpeopickerView.java:298)
        ... 30 more
    Please advice.
    Thanks & Regards,
    Jyoti

    Hi Jyoti,
    This Works i have tried in 2004s SP10
    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;
          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);
          table.setOnFilter(filterAction);
          filterAction.setEnabled(true);
          this.sourceNode = sourceNode;
       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();
                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) {
                IWDTableColumnGroup columnGroup = (IWDTableColumnGroup) abstractColumn;
                setFiltersForColumns(dataSourcePrefix, columnGroup.iterateColumns(), sourceNode);
       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){
                      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();
             WDCopyService.copyCorresponding(el, targetElement);
             ar.add(targetElement);
          targetNode.bind(ar);
       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);
             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);
                sourceNode.addElement(els);
             } else {
                els = (IWDNodeElement) hashs.get(rowid);
                WDCopyService.copyCorresponding(elt, els);
       /*find if an column 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) {
             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);
          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);
             } 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)
    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);
             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;
                } 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) {
                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;
             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 = "";
                val1 = null;
             sign = EQ;
             place = "S";
             ar.put("value1", val1);
             ar.put("sign", EQ);
             ar.put("place", place);
             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) {
                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;
       private static final String bindingOfPrimaryProperty(IWDTableCellEditor editor) {
          return editor instanceof IWDViewElement ? bindingOfPrimaryProperty((IWDViewElement) editor) : null;
       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;
       private static final Comparator DEFAULT = new Comparator() {
          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;
       private Hashtable sourceNodeHash = null;
       private Hashtable hashIcon = null;
       private IWDNode sourceNode = null;
       private IWDNode targetNode = null;
       String EQ = "=";
       String NE = "#";
       String R = "~";
       public final class NodeElementByAttributeComparator {
          public NodeElementByAttributeComparator(String attributeInfo, IWDTableColumn column, Comparator comparator) {
             this(attributeInfo, column, comparator, false, new ArrayList());
          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;
          private final Comparator comparator;
          private final boolean compareAsText;
          private IWDTableColumn column;
          private Collection subNodes;
          private String attributeInfo;
    Regards
    Abhimanyu L

  • Where can i find TableHelper.java and tablefilter.java

    Hi All,
           I want to implement this table filter functionality to one of my tables in webdynpro java. i have tried all ways of searching tutorials and blogs. i am totally confused because i can't find TableHelper.java and tablefilter.java files and i dont know how to proceed further.
    please someone help me where to find these TableHelper.java and tablefilter.java files.
    Early responses would be much appreciated.
    Thanks
    Uday

    Hello,
    I'm unable to find and download these .java files too.
    The download links for the Web Dynpro for Java Demo Kit don't work!
    Could maybe somebody attach these files to this thread (thanks to the functionality of this new forum), please?
    Thank you!
    The files I'm interested in are:
    TableSorter.java
    TableHelper.java
    TableFilter.java
    SimpleTableSorter.java
    as mentioned in the following tutorial: How to Implement a Web Dynpro for Java Table with Sorting and Filtering Capabilities
    Regards,
    David

  • How to work on Filter Functionality

    Hi Friends,
    Could you provide TableFilter.java class file. where can i download this .class file.
    i have go through this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5439. [original link is broken] [original link is broken] [original link is broken] i am getting error
    Regards
    Kumar

    Hi Kumar,
    In addition to above provided information i just want to help you bit easier approch. Plese have a look in this pointer for [Web Dynpro java demo kit|http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproforJavaDemo+Kit]. In this tutorial there is a very effective and good table filter and table sorter example which is along with the latest available document and class file. As i can see the above provided links are little old and not updated.
    We have implemented that approach in our ongoing project and found it very useful and helpful. Also if you want any help while implementing this let us know.
    Regards
    Jeetendra

  • Could anyone provide sample of WebDynpro Java TableFilter for Dynamic Table

    Hi
    I have a dynamic table I have given a context node as a data source and it executes a Web Service and populates itself based on the resultset of query this node contains no of columns and rows
    The table changes dynamically everytime the user selects different table type
    When I created a TableFilter I used IWDTableColumn from the current view and looped though the context elements and binded the values of attributes of each context element to this column inside a loop. TableSort works, But I  am not able to get the Filter working for the Dynamic Table , when I click on Filter Button the Filter does not filterand  just sorts.
    Not sure what is wrong but if someone can give some inputs,leads I will highly appreciate if some one has  a  sample of WebDynpro Java TableFilter for Dynamic Table
    Thanks in advance,
    Ragu.

    Hi Ragu,
    Please check the link for table filtering.
    http://wiki.sdn.sap.com/wiki/display/WDJava/GenericTableFilter+Code
    since your dynamic table uses webservice I assume it has fixed context attributes, just put the filter into wdDoModify method everytime you execute/trigger the webservice.
    Regards,

  • TableFilter in Webdynpro Java.

    Hi Experts,
    I am trying to implement Table Filter i did every thing mentioned in this
    /people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter  still am not getting the filter values
    all the table columns remains same it is not doing any filtering , please help me in solving this logical issue
    Thanks a lot in advance.
    Regards,
    Kelli.

    Hi,
    For example you have one table in your view and you want to apply the filter for that table.
    And the node binded to that table is TestNode with two attributes Att1 and Att2 with cardinality 0..n & selection 0..1.
    You need to create two more nodes with the same attributes in the context:
    1. FilterTestNode Having same attributes Att1 & Att2 and with cardinality: 1..1 & selection 0..1
    2. SourceTestNode Having same attributes Att1 & Att2 and with cardinality 0..n & selection 0...1.
    Note: Everytime when you are populating the data into TestNode you should populate the same data into SourceTestNode also.
    Create one context attribute "TableFilter" directly under Root context as below:
    Change the type of the "TableFilter" attribute to java class TableFilter.
    Go to the properties of the  table columns: Bind the Attr1 of FilterTestNode to FilterValue property of the Column1 and Bind the Attr2 of FilterTestNode to FilterValue property of the Column2.
    In the actions tab create one action as "Filter" and write the below code in that action:
    wdContext.currentContextElement().getTableFilter().filter(wdContext.nodeSourceTestNode(),wdContext.nodeTestNode());
    In wdDoModifyView() method write the below code:
    if (firstTime) {
    //Here in the below line of code, "Table" is the ID of the UI element table.
    IWDTable tableFilter = (IWDTable) view.getElement("Table");
    wdContext.currentContextElement().setTableFilter( new TableFilter(tableFilter, wdThis.wdGetFilterAction(), wdContext.nodeSourceTestNode(), null));
    Regards,
    Charan

  • TableFilter and TableSorter Java Classes

    Does anybody has link to TableFilter and TableSorter java classes for CE 7.11 Tables?
    Thanks

    Hi Michael Vstling,
    Did you try the java classes library (SDOAPI) that can be downloaded from OTN?
    It may provide you with a better alternative when manipulating geometries in the Java space. There is an adapter in SDOAPI which can convert a JDBC STRUCT object into Java Geometry object defined in SDOAPI, and vice versa.
    There are at least two ways in mixing PL/SQL and Java. The first one, as you mentioned, is to define your custom function in terms of PL/SQL and call it from within your Java program. With SDOAPI, you have the second option, which is to define your own functions in Java using SDOAPI and deploy them as Java stored procedures in db. You can then call them from within your PL/SQL code. In either way performance depends on a lot of things and generally it requires a "try and improve" approach.
    About JPublisher and sdo_ordinate_array it may not be a spatial related problem. Did you try search the Java-related forums first?
    LJ

  • Providing sorting filters for a table in webdynpro java application

    ho to provide sorting  , filters , for a table in webdynpro java application .

    Hi Pradeep,
    Please go through the following article on implementation of filtering and sorting:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f024364b-3086-2b10-b2be-c0ed7d33fe65
    The article contains a link to a sample application using the TableSorter and TableFilter Class.
    The same classes can be used by any other web dynpro application. Download the sample application and copy the classes. In case of a specific requirement, modify the TableSorter and TableFilter classes.
    Regards,
    Kartikaye

  • IllegalArgumentException in TableFilter

    Hello Experts,
    I implemented a TableFilter based on the TableFilter class.
    However, when I type some characters into the filter field in the web dynpro table, I get the following exception:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.handleUIElementEvent(HtmlClient.java:983)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.updateEventQueue(HtmlClient.java:382)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.prepareTasks(AbstractClient.java:93)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:316)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
         at com.sap.tc.webdynpro.portal.pb.impl.localwd.LocalApplicationProxy.sendDataAndProcessAction(LocalApplicationProxy.java:77)
         at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1300)
         at com.sap.portal.pb.PageBuilder.SendDataAndProcessAction(PageBuilder.java:327)
         at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:869)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:219)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.handleUIElementEvent(HtmlClient.java:975)
         ... 41 more
    Caused by: java.lang.IllegalArgumentException:
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.createLocalPath(DataContainer.java:1350)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.updateAttribute(DataContainer.java:454)
         at com.sap.tc.webdynpro.clientserver.uielements.adaptbase.AbstractAdapter.updateAttribute(AbstractAdapter.java:653)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter$FilterField.onINPUTFIELDCHANGE(TableAdapter.java:4271)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter$FilterField.onINPUTFIELDKEYPRESS(TableAdapter.java:4509)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter.onINPUTFIELDKEYPRESS(TableAdapter.java:10645)
         ... 47 more
    Please help, I cannot deduce anything from the exception chain.
    Regards,
    Marshall.

    Hi Marshall,
    Please check if you have used the TableFilter class proper as mentioned. The filtervalues of the column are set.
    Put some messages in the method invoked onFilter see where the issue is occuring.
    Regards,
    kartikaye

  • Error while running a Java Program

    Can anyone help me,
    I am getting the following error while running a Java program, Below is the exception thrown, please help.
    java.nio.BufferOverflowException
    at java.nio.Buffer.nextPutIndex(Buffer.java:425)
    at java.nio.DirectByteBuffer.putChar(DirectByteBuffer.java:463)
    at org.jetel.data.StringDataField.serialize(StringDataField.java:295)
    at org.jetel.data.DataRecord.serialize(DataRecord.java:283)
    at org.jetel.graph.DirectEdge.writeRecord(DirectEdge.java:216)
    at org.jetel.graph.Edge.writeRecord(Edge.java:288)
    at com.tcs.re.component.RESummer1.run(RESummer1.java:505)
    java.nio.BufferOverflowException
    at java.nio.Buffer.nextPutIndex(Buffer.java:425)
    at java.nio.DirectByteBuffer.putChar(DirectByteBuffer.java:463)
    at org.jetel.data.StringDataField.serialize(StringDataField.java:295)
    at org.jetel.data.DataRecord.serialize(DataRecord.java:283)
    at org.jetel.graph.DirectEdge.writeRecord(DirectEdge.java:216)
    at org.jetel.graph.Edge.writeRecord(Edge.java:288)
    at com.tcs.re.component.RECollectCont.run(RECollectCont.java:304)

    Ok, let's see. Write the following class:
    public class Grunt {
      public static void main(String[] args) {
        System.out.println("Hello Mars");
    }Save it as "C:\Grunt.java", compile by typing:
    javac c:\Grunt.javaRun by typing:
    java -classpath "C:\" GruntDoes it say "Hello Mars"? If yes, go back to your program and compare for differences (maybe you used the "package" statement?).
    Regards

  • Erro de SYSFAIL e Queda do Ambiente JAVA (PI)

    Bom Dia
    Estou num projeto de NFe e atualmente esta acontecendo o seguinte cenário de Erros:
        Na SMQ2 , quando apresenta um aumento nas filas de Mensagens , aparece SYSFAIL em determinadas Filas , todas as outras travam , aumenta o numero de Filas.
       Com essa mensagem de SYSFAIL nas filas , o serve0 (Parte JAVA do PI) cai e após isso estou tendo que efetuar manualmente um STOP/START em todos os canais de comunnicação para que os R/3 voltem a emitir NFe.
        Isso esta ocorrendo com mais frequência após inserir uma nova empresa para emissão de NFe.
        Alguem poderia me ajudar a entender por que ocorre o SYSFAIL as mensagens travam e derruba o ambiente JAVA ?
    Sérgio.

    1º) Erro: Commit Fault: com.sap.aii.af.rfc.afcommunication.RfcAFWException:SenderA
    2º) Foi alterado o numero de Filas O numero de Filas foi alterado , mas não consigo ver esse parametros na RZ10 , tem  3 entradas : X32_DVEBMGS32_NFISAP ; DEFAULT ; START_DVEBMGS32_NFISAP nessa transação ...onde eu vejo isso
    3º) Esse parametro não tem nessa transação (/usr/sap//DVEBMGS00/j2ee/cluster/server0/log/). em qual desses diretórios abaixo eu encontro esse parametro ?
    Existe esses:
    DIR_ATRA      /usr/sap/X32/DVEBMGS32/data
    DIR_BINARY      /usr/sap/X32/DVEBMGS32/exe
    DIR_CCMS      /usr/sap/ccms
    DIR_CT_LOGGIN    /usr/sap/X32/SYS/global
    DIR_CT_RUN              /usr/sap/X32/SYS/exe/run
    DIR_DATA              /usr/sap/X32/DVEBMGS32/data
    DIR_DBMS              /usr/sap/X32/SYS/SAPDB
    DIR_EXECUTABLE /usr/sap/X32/DVEBMGS32/exe
    DIR_EXE_ROOT     /usr/sap/X32/SYS/exe
    DIR_GEN              /usr/sap/X32/SYS/gen/dbg
    DIR_GEN_ROOT    /usr/sap/X32/SYS/gen
    DIR_GLOBAL        /usr/sap/X32/SYS/global
    DIR_GRAPH_EXE  /usr/sap/X32/DVEBMGS32/exe
    DIR_GRAPH_LIB   /usr/sap/X32/DVEBMGS32/exe
    DIR_HOME             /usr/sap/X32/DVEBMGS32/work
    DIR_INSTALL        /usr/sap/X32/SYS
    DIR_INSTANCE     /usr/sap/X32/DVEBMGS32
    DIR_LIBRARY      /usr/sap/X32/DVEBMGS32/exe
    DIR_LOGGING     /usr/sap/X32/DVEBMGS32/log
    DIR_MEMORY_INSPECTOR   /usr/sap/X32/DVEBMGS32/data
    DIR_ORAHOME       /oracle/X32/102_64
    DIR_PAGING                            /usr/sap/X32/DVEBMGS32/data
    DIR_PUT                            /usr/sap/X32/put
    DIR_PERF                            /usr/sap/tmp
    DIR_PROFILE      /usr/sap/X32/SYS/profile
    DIR_PROTOKOLLS     /usr/sap/X32/DVEBMGS32/log
    DIR_REORG                          /usr/sap/X32/DVEBMGS32/data
    DIR_ROLL                          /usr/sap/X32/DVEBMGS32/data
    DIR_RSYN                            /usr/sap/X32/DVEBMGS32/exe
    DIR_SAPHOSTAGENT     /usr/sap/hostctrl
    DIR_SAPUSERS     ./
    DIR_SETUPS                           /usr/sap/X32/SYS/profile
    DIR_SORTTMP     /usr/sap/X32/DVEBMGS32/data
    DIR_SOURCE     /usr/sap/X32/SYS/src
    DIR_TEMP                           /tmp
    DIR_TRANS                           /usr/sap/trans
    DIR_TRFILES                          /usr/sap/trans
    DIR_TRSUB                          /usr/sap/trans

  • Starting deployment prerequisites: error in BI-Java installation sapinst

    Hi all,
    We are in process updating Bw 3.5 to BI 7.0 we hace sucessfully completed the Upgrade but while installing Bi java thru Sapinst in third step like java instance installtion  i was stck with the below error.
               We have downloaded the Cryptographic file and placed in jdk folder still the same problem is  coming.
    Please suggest...
    Thanks,
    Subhash.G
    Starting deployment prerequisites:
    Oct 13, 2007 2:42:18 AM  Error: Creation of DataSource for database "BWQ" failed.
    Original error message is:
    com.sap.sql.log.OpenSQLException: Error while accessing secure store: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm..
    Stack trace of original Exception or Error is:
    com.sap.sql.log.OpenSQLException: Error while accessing secure store: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm..

    Problem solved  followed the notes 1063396.

  • If Statement in java.awt paint

    import java.applet.Applet;  //bring in the applet class
    import java.awt.*;             //bring in the graphics class
    import java.awt.event.*;      //bring in the event class
    import java.text.DecimalFormat;    //bring in the decimal format class
    import java.lang.Float;       //bring in the float class
    public class Bmi extends Applet implements ActionListener {   //begin program and start ActionListener
      Label weight, height;    //define Label variable
      TextField weighttext, heighttext;    //define TextField variables
      Button calculate;     //define button variables
      float index, wt, ht, max, min;    //define float variables
      DecimalFormat fmt2 = new DecimalFormat("#.00"); //set decimal format for reals
    public void init() {    //begin init()
      weight = new Label("Please enter your weight in Kg. (2 decimal places): ");   //define content of Label weight
      weighttext = new TextField(6);            //define size of TextField
      height = new Label("Please enter your height in Metres (2 decimal places): ");   //define content of Label height
      heighttext = new TextField(5);    //define size of TextField
      calculate = new Button("Calculate!!");       //define content of Button
      add(weight);      //add Label weight to the GUI
      add(weighttext);   //add TextField weighttext to the GUI
      add(height);      //add Label height to the GUI
      add(heighttext);     //add TextField heighttext to the GUI
      add(calculate);        //add button calculate to the GUI
      calculate.addActionListener(this);    //wait for button to be returned
      wt = 0;     //reset wt to 0
      index = 0;  //reset index to 0
      ht = 0;      //reset ht to 0
      max = 0;      //reset max to 0
      min = 0;    //reset min to 0
      public void actionPerformed( ActionEvent e ) {   //run upon return of button
      wt = Float.parseFloat(weighttext.getText());  //convert weighttext from String to Float
      ht = Float.parseFloat(heighttext.getText());    //covert heighttext from String to Float
      repaint();     //refresh paint area
      public float indexer()  //begin indexer method
        float ind;    //delare local variable ind
        ind = wt/(ht*ht);      //perform calculation
        return ind;    //make indexer() the value of variable ind
      }  // end of indexer method
      public float maxWeight()  //begin maxWeight method
        float maxwt;    //declare local variable maxwt
        final float UPPER = 25.0f;   //declare variable UPPER as a float with a decimal value of 25.0
        maxwt = UPPER*ht*ht;      //perform calculation
        return maxwt;          //make maxWeight() the value of variable maxwt
      }  // end of maxWeight method
      public float minWeight()   //begin minWeight method
        float minwt;    //declare local variable minwt
        final float LOWER= 20.0f;   //declare variable LOWER as a float with a decimal value of 20.0
        minwt = LOWER*ht*ht;    //perform calculation
        return minwt;      //make minWeight() the value of variable minwt
      }  // end of minWeight method
    public void paint(Graphics g)    //begin paint method, define g as Graphics
        index=indexer();   //covert method indexer() to variable index
        max=maxWeight();      //convert method maxWeight() to variable max
        min=minWeight();     //convert method minWeight() to variable min
        g.setFont(new Font("Verdana", Font.ITALIC, 15));    //define font, weight and size
        g.setColor(new Color(90,90,90));     //set new colour
        g.drawRect(5,100,300,75);      //define size of rectangle
        g.setColor(new Color(255,107,9));   //set new colour
        g.drawString("BMI is " + fmt2.format(index) + " for " + fmt2.format(wt) + "kg",20,120);   //create string in paint, define its on screen position
        g.drawString("Maximum bodyweight is " + fmt2.format(max) + "kg", 20,140);   //create string in paint, define its on screen position
        g.drawString("Minimum bodyweight is " + fmt2.format(min) + "kg", 20,160);     //create string in paint, define its on screen position
      }  // end of paint method
    }    // end of Bmi classI have written the above code to calculate someones BMI (Body Mass Index). Basically as you can see it recieves a weight and height from the user and calculates the rest. But whilst that good I would like to know how I can make it tell the user something to the effect of "Your overweight" or "Your underweight". The if statement runs like this:
    if (wt > max)This forum doesn't quite handle <> properly. The greater and less than symbols. So above you will see > this is the html character code for a greater than symbol so please read it as such.
    And then if wt is greater than max then it will say "Your overweight".
    But I can't figure out how to include it in the above program. Becuase it won't run in paint, atleast it won't the way I have done it previously. So can you think of any other ways?
    Help much appreciated,
    Simon

    Thanks very much that works well.
    Simon
    My code now looks like this: import java.applet.Applet;  //bring in the applet class
    import java.awt.*;             //bring in the graphics class
    import java.awt.event.*;      //bring in the event class
    import java.text.DecimalFormat;    //bring in the decimal format class
    import java.lang.Float;       //bring in the float class
    public class Bmi extends Applet implements ActionListener {   //begin program and start ActionListener
      Label weight, height;    //define Label variable
      TextField weighttext, heighttext;    //define TextField variables
      Button calculate;     //define button variables
      float index, wt, ht, max, min;    //define float variables
      DecimalFormat fmt2 = new DecimalFormat("#.00"); //set decimal format for reals
    public void init() {    //begin init()
      weight = new Label("Please enter your weight in Kg. (2 decimal places): ");   //define content of Label weight
      weighttext = new TextField(6);            //define size of TextField
      height = new Label("Please enter your height in Metres (2 decimal places): ");   //define content of Label height
      heighttext = new TextField(5);    //define size of TextField
      calculate = new Button("Calculate!!");       //define content of Button
      add(weight);      //add Label weight to the GUI
      add(weighttext);   //add TextField weighttext to the GUI
      add(height);      //add Label height to the GUI
      add(heighttext);     //add TextField heighttext to the GUI
      add(calculate);        //add button calculate to the GUI
      calculate.addActionListener(this);    //wait for button to be returned
      wt = 0;     //reset wt to 0
      index = 0;  //reset index to 0
      ht = 0;      //reset ht to 0
      max = 0;      //reset max to 0
      min = 0;    //reset min to 0
      public void actionPerformed( ActionEvent e ) {   //run upon return of button
      wt = Float.parseFloat(weighttext.getText());  //convert weighttext from String to Float
      ht = Float.parseFloat(heighttext.getText());    //covert heighttext from String to Float
      repaint();     //refresh paint area
      public float indexer()  //begin indexer method
        float ind;    //delare local variable ind
        ind = wt/(ht*ht);      //perform calculation
        return ind;    //make indexer() the value of variable ind
      }  // end of indexer method
      public float maxWeight()  //begin maxWeight method
        float maxwt;    //declare local variable maxwt
        final float UPPER = 25.0f;   //declare variable UPPER as a float with a decimal value of 25.0
        maxwt = UPPER*ht*ht;      //perform calculation
        return maxwt;          //make maxWeight() the value of variable maxwt
      }  // end of maxWeight method
      public float minWeight()   //begin minWeight method
        float minwt;    //declare local variable minwt
        final float LOWER= 20.0f;   //declare variable LOWER as a float with a decimal value of 20.0
        minwt = LOWER*ht*ht;    //perform calculation
        return minwt;      //make minWeight() the value of variable minwt
      }  // end of minWeight method
    public void you(Graphics g)
      String statement;
      if(wt > max) statement="You are very fat";
      else if(wt < min) statement="You are very thin";
      else statement="You are in the recommended weight range for your height";
      g.drawString(statement, 20,210);
    public void paint(Graphics g)    //begin paint method, define g as Graphics
        you(g);
        index=indexer();   //covert method indexer() to variable index
        max=maxWeight();      //convert method maxWeight() to variable max
        min=minWeight();     //convert method minWeight() to variable min
        g.setFont(new Font("Verdana", Font.ITALIC, 15));    //define font, weight and size
        g.setColor(new Color(90,90,90));     //set new colour
        g.drawRect(5,100,300,75);      //define size of rectangle
        g.setColor(new Color(255,107,9));   //set new colour
        g.drawString("BMI is " + fmt2.format(index) + " for " + fmt2.format(wt) + "kg",20,120);   //create string in paint, define its on screen position
        g.drawString("Maximum bodyweight is " + fmt2.format(max) + "kg", 20,140);   //create string in paint, define its on screen position
        g.drawString("Minimum bodyweight is " + fmt2.format(min) + "kg", 20,160);     //create string in paint, define its on screen position
      }  // end of paint method
    }    // end of BmiThanks again,
    Simon

  • SSO java sample application problem

    Hi all,
    I am trying to run the SSO java sample application, but am experiencing a problem:
    When I request the papp.jsp page I end up in an infinte loop, caught between papp.jsp and ssosignon.jsp.
    An earlier thread in this forum discussed the same problem, guessing that the cookie handling was the problem. This thread recommended a particlar servlet , ShowCookie, for inspecting the cookies for the current session.
    I have installed this cookie on the server, but don't see anything but one cookie, JSESSIONID.
    At present I am running the jsp sample app on a Tomcat server, while Oracle 9iAS with sso and portal is running on another machine on the LAN.
    The configuration of the SSO sample application is as follows:
    Cut from SSOEnablerJspBean.java:
    // Listener token for this partner application name
    private static String m_listenerToken = "wmli007251:8080";
    // Partner application session cookie name
    private static String m_cookieName = "SSO_PAPP_JSP_ID";
    // Partner application session domain
    private static String m_cookieDomain = "wmli007251:8080/";
    // Partner application session path scope
    private static String m_cookiePath = "/";
    // Host name of the database
    private static String m_dbHostName = "wmsi001370";
    // Port for database
    private static String m_dbPort = "1521";
    // Sehema name
    private static String m_dbSchemaName = "testpartnerapp";
    // Schema password
    private static String m_dbSchemaPasswd = "testpartnerapp";
    // Database SID name
    private static String m_dbSID = "IASDB.WMDATA.DK";
    // Requested URL (User requested page)
    private static String m_requestUrl = "http://wmli007251:8080/testsso/papp.jsp";
    // Cancel URL(Home page for this application which don't require authentication)
    private static String m_cancelUrl = "http://wmli007251:8080/testsso/fejl.html";
    Values specified in the Oracle Portal partner app administration page:
         ID: 1326
         Token: O87JOE971326
         Encryption key: 67854625C8B9BE96
         Logon-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_login
         single signoff-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_logout
         Name: testsso
         Start-URL: http://wmli007251:8080/testsso/
         Succes-URL: http://wmli007251:8080/testsso/ssosignon.jsp
         Log off-URL: http://wmli007251:8080/testsso/papplogoff.jsp
    Finally I have specified the cookie version to be v1.0 when running the regapp.sql script. Other parameters for this script are copied from the values specified above.
    Unfortunately the discussion in the earlier thread did not go any further but to recognize the cookieproblem, so I am now looking for help to move further on from here.
    Any ideas will be greatly appreciated!
    /Mads

    Pierre - When you work on the sample application, you should test the pages in a separate browser instance. Don't use the Run Page links from the Builder. The sample app has a different authentication scheme from that used in the development environment so it'll work better for you to use a separate development browser from the application testing browser. In the testing browser, to request the page you just modified, login to the application, then change the page ID in the URL. Then put some navigation controls into the application so you can run your page more easily by clicking links from other pages.
    Scott

  • SSO between a Java EE application (Running on CE) and r/3 backend

    Hi All,
    Over the past few days I have been trying to implement a SSO mechanism between NW CE Java Apps and R/3 backend without any success. I have been trying to use SAP logon tickets for implementing SSO.
    Below is what I need:
    I have a Java EE application which draws data from R/3 backend and does some processing before showing data to the users. As of now the only way the Java App on CE authenticates to r/3 backend is by passing the userid and pwds explicitly. See sample authentication code below:
    BindingProvider bp = (BindingProvider) myService;
    Map<String,Object> context = bp.getRequestContext();
    context.put(BindingProvider.USERNAME_PROPERTY, userID);
    context.put(BindingProvider.PASSWORD_PROPERTY, userPwd);
    Now this is not the way we want to implement it. What we need is when the user authenticates to CE ( using CE's UME) CE issues a SAP logon ticket to the user. This ticket should be used to subsequently login to other system without having to pass the credentials. We have configured the CE and Backend to use SAP logon tickets as per SAP help.
    What I am not able to figure out is: How to authenticate to SAP r/3 service from the java APP using SAP logon tickets. I couldnt find any sample Java  code on SAP help to do this. (For example the above sample code authenticates the user by explicitly passing userid and pwd, I need something similar to pass a token to the backend)
    Any help/pointers on this would be great.
    Thanks,
    Dhananjay

    Hi,
    Have you imported the java certificate into R/3 backend system ? if so.
    Then just go to backend system and check on sm50 for each applicaion instance of any error eg.
    SM50-> Display files (ICON) as DB symbol with spect.(cntrlshiftF8)
    You will get logon ticket details.
    with thanks,
        Rajat

Maybe you are looking for

  • Safari continues to crash everytime I try to open it

    This is the error I get everytime I open Safari on my MacBook. Can anyone help me out? Thanks! Process: Safari [10317] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 5.0.4 (6533.20.27) Build Info: WebBrowse

  • Revenir à Adobe Media Encoder 2013 ?

    Bonjour, j'ai constaté avec dépit que Adobe Media Encoder 2014 ne permet plus l'exportation aux formats FLV & F4V. Pourquoi ? c'est tout simplement absurde, les régies de diffusion de campagnes de publicité demandent encore massivement ces formats da

  • Jumbled text and spacing issues when creating a pdf

    When I create pdfs from FrameMaker 9 or Word 2007 files, Acrobat 9 Pro often transposes characters or modifies the spacing between characters. Can anyone help?

  • Help with CSM 3.2.2 - Changes created after Device Discovery

    Hi Hope someone can help, I have just installed CSM 3.2.2 and added many multiple firewalls to the database, I have not created any overall policies yet. Once these additions were made I could see over 500 changes that CSM wanted to make in the Activ

  • Playlists disappeared on ipad2

    The only playlist on my ipad2 is the purchased playlist but on my Mac computer, with ipad2 syncing over WiFi, I see all the playlists and music on my desktop but they are not showing up on my ipad.  The summary also shows I have more songs on my ipad