cancel
Showing results for 
Search instead for 
Did you mean: 

OVS

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

0 Kudos

Hi!

I think I made a mistake. The sorting is not the problem as I use a selfdefined BAPI where I can do the sorting. The problem are not the columns (my mistake) but the rows. So far I haven't found a possibility to change them. It is just sorted by the names of the rows. But thanks for the answer, I am sure it helps me out another time.

Bye Markus

0 Kudos

Hi Bertram!

I just was checking once more the Web Dynpro regarding the problem I have with the OVS. I just found another thread "Possible Bug in OVS Component" (). That is exactely the same problem I am dealing with. Is there, beside naming the Attributes of the node by AA...ZZ, to solve the problem? How can I overwrite the description for the columns?

Bye Markus

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Answers (0)