
By default the OVS helper dialog provides all UI elements required for search query input. However, you can modify the dialog using various strategies:
You use your own OVS component running within the OVS popup. When the user starts a help request, Web Dynpro creates an IWDOVSControl containing all required OVS information. A IWDOVSProvider implementation is called to create an IWDOVSDialog implementation. The OVS dialog implementation creates and closes the interface window of the OVS component
More information: Importing Adaptive Remote Function Call (RFC 2) Models , Importing Adaptive Web Service Models , Importing Enterprise JavaBean (EJB) Models
Modifying the Default Helper UI
More information: Providing Search Result Value Lists (OVS)
// create OVSConfigurator instance
WDOVSConfigurator configurator = new WDOVSConfigurator()
{
@Override
public boolean showCancelButton()
{
return true;
}
};
For example, use the following lines:
// create OVSProvider
IWDOVSProvider provider = WDValueServices.createOVSProvider(
wdContext.nodeOVSInput(),
wdContext.nodeOVSOutput(),
new MyOVSContextNotificationListener(),
configurator);
...
// add OVSExtension
WDValueServices.addOVSExtension(
"MyOVSExtension",
new IWDAttributeInfo[]{
wdContext.nodeMyNode().getNodeInfo().getAttribute("myAttr")},
provider,
null);
Creating Your Own Helper UI Dialog
The OVSDialog must exist as long as the OVS-Popup is active.
For example, use the following lines:
public class MyOVSProvider implements IWDOVSProvider
{
// the component owning the attribute to which OVS is attached
private final IWDComponent component;
// the component usage used to create the OVS component
private final IWDComponentUsage componentUsage;
public MyOVSProvider(
IWDComponent component,
IWDComponentUsage componentUsage)
{
this.component = component;
this.componentUsage = componentUsage;
}
public IWDOVSDialog createOVSDialog(IWDOVSControl ovsControl)
{
// create a new dialog and pass the IWDOVSControl
return new MyOVSDialog(component, componentUsage, ovsControl);
}
public String getProviderName()
{
return getClass().getName();
}
}
public class MyOVSDialog implements IWDOVSDialog
{
private final IWDComponentUsage componentUsage;
private final IExternalOVSComponentInterface interfaceController;
private final IWDWindow window;
private final IWDOVSControl ovsControl;
MyOVSDialog(
IWDComponent component,
IWDComponentUsage componentUsage,
IWDOVSControl ovsControl)
{
this.componentUsage = componentUsage;
this.ovsControl = ovsControl;
// create the component
componentUsage.createComponent();
// determine its interface controller
interfaceController =
(IExternalOVSComponentInterface)componentUsage
.getInterfaceController()
.wdCastTo(IExternalOVSComponentInterface.class);
// pass this to the controller
// (gives also access to the IWDOVSControl)
interfaceController.init(this);
// finally create the popup window
IWDWindowInfo windowInfo =
component.getComponentInfo().findInWindows("OVSWindow");
window =
component.getWindowManager().createModalWindow(windowInfo);
}
public void exit()
{
componentUsage.deleteComponent();
}
public IWDWindow getWindow()
{
return window;
}
public final IWDOVSControl getOvsControl()
{
return ovsControl;
}
}For example, use the following lines:
// add OVSExtension
WDValueServices.addOVSExtension(
"MyOVSExtension",
new IWDAttributeInfo[]{
wdContext.nodeMyNode().getNodeInfo().getAttribute("myAttr")},
new MyOVSProvider(
wdComponentAPI,
wdThis.wdGetOVSComponentUsage()),
null);
Providing a Suggestion List
If the attribute that the InputField is bound to has a ValueSet, the corresponding values are automatically displayed while the user types some characters.
To supply the suggestion list via OVS however, you must implement the IWDOVSSuggester interface.