on 05-24-2004 11:21 AM
Hi all,
i played around a little bit with the OVS value help service described in the WebDynpro homepage article by Bertram Ganz. I'm using a selfdefined structure Person defined in my "Local Dictionary". There are two custom controllers PersonCC and PersonCCOvs and a view controller PersonView. The context structure of PersonCC is comparable to the structure in the article (Input with some attributes(1:1) and a child node Output with some attr.(0..n)). The view context is mapped to the context of PersonCC. The context of PersonCCOVS is something like a subset of PersonCC's context (there are only the attributes in Output, which are necessary to identify a person in the table displayed in the OVS dialog). Doing this i ran into the following problem:
I would expect, that only the attributes of Input and Output in PersonCCOvs are used for the generation of the input form and the output table of the OVS dialog.
This is true, if i set the types of Input and Output attributes to the simple types defined in the Person structure.
This is not true, if i bind the Input and Output nodes to the structure and select the attributes needed for OVS. Then always all structure elements are used, regardless which attributes are available in Input/Output.
I guess, this is a bug in the system component which handles OVS?
Furthermore, i'd like to make two proposals to enhance this great feature:
1. The "UI generator" of the OVS component seems to use an alphabetically sorted context attributes list for the sequence of the form input elements and table columns. This is not always the best from a more logical point of view.
It would be nice to have a possibility to influence this without naming the context attributes from AAFirst to ZZLast, maybe by adding two optional IWDAttributeInfo arrays to the addOVSExtension method, which define the desired sequence:
WDValueServices.addOVSExtension(
"Person",
startupAttr,
wdContext.nodeInputOVS(),
<b>inputAttrSequence</b>,
wdContext.nodeOutputOVS(),
<b>outputAttrSequence</b>,
new PersonCCContextNotificationListener());
2. There should be a possibility to provide "custom components" which build and handle the OVS dialog contents by themselves. The necessary component interface including init-,callback- and so on methods and including the interface view displayed in the dialog could be predefined by SAP. The WD developer would have to implement this interface to ensure "well formed" components.
Regards
Stefan
Hi Stefan.
I'm also busy trying to understand the way the OVS works.
Can you give me a hint about the public methods getOVSListener(), getOVSinputNode() and getOVSOutputNode(). They are not described in the document.
regards
Bertil Rebergen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bertil,
well the methods are quite simple (all declared in OVSCust):
public IWDNode getOVSInputNode() {
return wdContext.nodeBapi_Flight_Getlist_Input();
}
public IWDNode getOVSOutputNode() {
return wdContext.nodeOutput();
}
public IWDOVSContextNotificationListener getOVSListener() {
return ovsListener;
}
Since i wrote the signatures from scratch, i'm not quite sure about the nodeOutput() in the 2. method. But the code completion should help you, if it's wrong.
Hope that helps.
Regards
Stefan
Hi Bertil,
no, i don't think so. The action triggered by the button is not reachable from the "called back" component.
Hope that helps.
Best regards
Stefan
PS: Maybe filling the output nodes before the value help is opened works and the list is displayed before pressing the button.
Message was edited by: Stefan Klensch
Hi Stefan,
The use of the OVS is getting more and more exiting!
In the OVS example we put the OVS Controller and the view together in the same Web Dynpro application. Do you know if it is possible to extract this OVS controller outside the Web Dynpro application in a sense that reuse of this OVS controller for other views is possible.
Bertil
Hi Bertil,
you can create a component, which contains the OVS custom controller you want to use and expose the methods and context nodes of the OVS custom controller in the interface controller of the component. After that you can use this component in other components of the same project.
Hope that helps.
Regards
Stefan
Hi Bertil,
getOVSOutputNode() returns wdContext.nodeFlight_List(). After having declared the model binding a context structure <i>model node 'Bapi_Flight_Getlist_Input' - inner node 'Output' - inner node 'Flight_List'</i> is created. The OVS Service needs a reference to the node containing the collection of model node elements of type 'Flight_List' or model objects of type 'Bapisfldat'. The node 'Output' has the cardinality 0..1. It is associated to the singleton node 'Flight_List' containing the search result data.
Regards, Bertram
Here the correct code:
public IWDNode getOVSInputNode() {
return wdContext.nodeBapi_Flight_Getlist_Input();
}
public IWDNode getOVSOutputNode() {
return wdContext.nodeFlight_List();
}
public IWDOVSContextNotificationListener
getOVSListener() {
return ovsListener;
}
Hi Stefan,
Bertram is on vacation for a couple of weeks, so we need to discuss this as soon as he is back!
Best regards,
Karin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
11 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.