Skip to Content
author's profile photo
Former Member

OVS

Hi everybody!

Does some one know how I can sort the coloumns I got on the OVS window where I can select the entries?

Thanks in advance.

Markus

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Nov 30, 2004 at 02:29 PM

    Hallo Markus,

    the generic OVS UI does not support onAction-events of the contained TableColumn-UI-Elements.

    What you can do is a pre-sorting of the retrieved search results. This can be done in the IWDOVSContextNotificationListener hook method onQuery() (e.g. sort by the first context attribute values). The problem is, that the user cannot select the column to be sorted.

    Another idea is to add some boolean context attributes to your OVS helper context node 'OVSInput'. This node must be a value node because you cannot add these attributes to a model node. Your search query is based on an executable model object but your OVS search form context node 'OVSInput' is a value node. This node contains the same attributes like the model node as well as boolean attributes for checking 'sort by <model attribute'. Consequently the generic OVS input form contains check-boxes for sorting the retreived search results by a certain attribute. In the onQuery()-method you can read these attributes for sorting the retreived search results.

    O.k. this is not state-of-the-art but only a workaround for missing OVS functionality.

    Greetings, Bertram

    Add comment
    10|10000 characters needed characters exceeded

    • Hallo Markus,

      we are aware of the described restrictions (order of table columns in generic OVS UI, context-to-structure binding at runtime adds all fields as columns); the OVS will be accordingly enhanced in the upcoming Paris release.

      A possibility for overwriting the label text of a certain OVS table column is based on dynamically modifying the simple type of the correpsonding context attribute in the OVSInput helper context node. You just change the dictionary metadata for this single context attribute:

       /* Access interface ISimpleTypeModifiable for modifying the attribute's datatype */
      
      IWDAttributeInfo attributeInfo = 
        wdContext.getNodeInfo().getAttribute("Country");
      
      ISimpleTypeModifiable countryType =   
        attributeInfo.getModifiableSimpleType();
      
      /* Set column header text */
      countryType.setColumnLabel("My Label");

      Alternatively you can define your own simple type in the local Java Dictionary of your Web Dynpro project. Then you define a new OVSInput helper context node with attributes having the defined Dictionary simple types. The generic OVS UI will then retreive the column labels and field labels from within the dictionary simple types.

      Greetings, Bertram