com.sap.tc.webdynpro.progmodel.api
Interface IWDViewController
- All Superinterfaces:
- IWDController
- All Known Subinterfaces:
- IWDView
- public interface IWDViewController
- extends IWDController
Generic API of all view controllers.
This type can be called by applications using Web Dynpro, but DO NOT EXTEND OR IMPLEMENT IT!
- Version:
- $Id: //tc/WebDynproRuntime/630_VAL_REL/src/_webdynpro_progmodel/java/com/sap/tc/webdynpro/progmodel/api/IWDViewController.java#1 $
|
Method Summary |
void |
firePlug(IWDOutboundPlugInfo plug,
java.util.Map parameters)
Fires the given outbound plug with the given parameters. |
IWDAbstractViewInfo |
getViewInfo()
Returns the runtime repository information for this view. |
void |
requestFocus(IWDAction action)
Requests to change the keyboard input focus to the UI element whose
primary purpose is to raise an event bound to the given action. |
void |
requestFocus(IWDNodeElement nodeElement,
IWDAttributeInfo attribute)
Requests to change the keyboard input focus to the UI element whose
primary use is to edit a property bound to the given attribute. |
| Methods inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDController |
getAction, getComponent, getContext, getControllerInfo, getMessage, getMessage, getName, getPackageName, getQualifiedName, getText, getText |
getViewInfo
public IWDAbstractViewInfo getViewInfo()
- Returns the runtime repository information for this view.
firePlug
public void firePlug(IWDOutboundPlugInfo plug,
java.util.Map parameters)
- Fires the given outbound plug with the given parameters.
Firing a plug of type "Standard" performs the navigation defined for the
link starting at that plug.
Firing a plug of type "Exit" defined in an interface view of the top-level
component causes the application to terminate.
requestFocus
public void requestFocus(IWDAction action)
- Requests to change the keyboard input focus to the UI element whose
primary purpose is to raise an event bound to the given action.
If there is more than one such UI element, then it is undefined which UI
element is chosen. It is also undefined which focus request wins if there
are several ones. The request may silently fail, but is guaranteed not to
throw an exception.
UI elements (e.g. table) that trigger events (e.g. "onLeadSelect"), but are
not primarily used to do so, are probably considered with lower priority
or not at all. As a rule of thumb, if disabling the action disables the
whole UI element, then that UI element is primarily used to trigger the
event bound to that action.
Example: If you have a button whose "onAction" event is bound against the
action XYZ and no other UI element event is bound against XYZ, then a
wdThis.wdGetAPI().requestFocus(wdThis.wdGetXYZAction()) will
focus on that button.
Note how this allows to keep controller code independent of the UI, even
of IDs used for UI elements. If the button in the example above is later
replaced by a LinkToAction or some fancy new icon button that
lives inside a tray's header, the code to request focus remains unaffected.
requestFocus
public void requestFocus(IWDNodeElement nodeElement,
IWDAttributeInfo attribute)
- Requests to change the keyboard input focus to the UI element whose
primary use is to edit a property bound to the given attribute.
If there is more than one such UI element, then it is undefined which UI
element is chosen. It is also undefined which focus request wins if there
are several ones. The request may silently fail, but is guaranteed not to
throw an exception.
UI elements that are read-only or disabled are not considered at all.
To identify a given attribute uniquely at runtime, you must specify the
node element to which that attribute belongs.
This will e.g. identify a specific cell in a given table row.
Example: If you have an input field whose "value" property is bound against
the attribute abc of node XYZ of this view called MyView and no other UI
element property is bound against XYZ.abc, then the following code will
focus on that input field.
IWDAttributeInfo attribute
= wdContext.nodeXYZ().getNodeInfo().getAttribute(
IPrivateMyView.IXYZElement.ABC);
wdThis.wdGetAPI().requestFocus(wdContext.currentXYZElement(), attribute);
Note how this allows to keep controller code independent of the UI, even
of IDs used for UI elements. If the input field in the example above is later
replaced by a DropDownByKey or some fancy new editor with
"guess what I want" value help, the code to request focus remains unaffected.
Copyright © 2004 SAP AG. Automatically generated Thu Mar 3 2005, 22:15