21
Define ?? WebDynpro MVC Design Context Data Binding Context Mapping View assembly Webdynpro application Hook Methods Context node Context attribute Elemengt Cardinality Singleton Supply function UI Element Container Element Internationalization

Webdynpro Basics

Embed Size (px)

DESCRIPTION

Webdynpro Basics

Citation preview

DefinitionDefine ??WebDynproIt's a design paradigm to develop web based enterprise resource planning application by SAPMVC DesignDesign paradigm to develp application where a clean separation exist between business logic and user interfaceContextData displayed by UI elements or used to maipulate UI element properties has to be stored in a hierarchical storage called contextData BindingEstablishing data transport bwetween UI elements and Context attributesContext MappingSharing common attributes between different controllers is called context mappingView assemblyA subset of Views visible at any one time Webdynpro applicationIt is an entry point into a webdynpro component and can be accessed via a URLHook MethodsMethods created by WD framework which are called in a predefined orderContext nodeEntity within the context used for runtime data storage which can have attributes or other nodes as childrenContext attributeEntity within the context used for runtime data storage which is not permitted to have childrenElemengtAll the child entities are aggregated intoa unit known as elementCardinalityMaximum and Minimum number of elements the node collection may hold at runtimeSingletonIt's a propertyof node which critically effects the relationship between a dependent node and its parent nodeSupply functionA mechanism for populating child nodes when necessary by WD RuntimeUI ElementA graphical entity in layout Container ElementUI elments that may have arbitary child elementsInternationalizationit means that all language dependent parts of applications have to be defined sucha way that a language specific version of the entity can be defined and the correct version - the logon langauge - is used at runtime
TermsWhat is ???????WebdynproWeb ServiceMVC-Model View ControllerWebdynpro FrameworkMeta model declaration and Custom codingUI-Free/Faceless WD componentContextData BindingContext MappingOutbound Plugs/Inbound PlugsNavigation LinkView assemblyWebdynpro applicationHook MethodsContext nodeContext attributeElemengtCardinalityLazy data instantiationRootUIElementContainerContextMenu Provider
Bit ConceptsBenefits of WebdynproMinimiz coding, maximize DesignSeparate layout and logicSupport reuse of componentsRun on multipl platforms - Portal, HHTP browser, Netweaver Busines clientWebdynpro Component partsWindowsNavigation/View CombinationViewsUI/LayoutComponent controllerFlow ControlModel-View-Controller designModel: Generates the application data without caring how it will be displayedBusiness interaction layerView: Visualizes the application data without caring how it was generatedUser interaction layerController: Binds the user and business interaction layer together. All intermediate processing is performed hereBinding layerWebdynpro ArchitectureExternal Visibility partsINterface Controllers/INterface ViewsInternal visibility partsVisual EntitiesWindows/ViewsProgarmming EntitiesController TypesTypeUse QuantityLifetimeInstantiation1-Component ControllerGlobal controller which drives functionality of entire component, No visual interfaceOne/ComponentLifetime of componentBy Webdynpro runtime2-Custom ControllerOptional controller(s) which can be used to encapsulate subfunctions of the component controllerMultiple/ComponentBy Webdynpro runtime until first method of controller is calledConfiguration controllerSpecial optional custom controller required if corresponding component implements special configuration and personalization functions. Any controller can access the config controller but the config controller can not access any other controllerOne/ComponentLifetime of componentBy webdynpro runtime as the first controller3-View ControllerController handles view specific flow logic, like checking user input and handling user actionsOne/View1-Framework Controlled: View instance deleted with component2-When Visible: View instance deleted as soon as the view no longer belongs to view assemnlyBy Webdynpro runtime until first method of controller is called4-Window ControllerUsed to handle the data passed via inbound plugs when being reused as a child controller. Methods of the controller can be called from the inbound plug methods of the window.One/WindowBy Webdynpro runtime until first method of controller is called - Start applicationConstituents of all controllersContextAttributesStandard + AdditionalPropertiesUsed controllersMethodsStandard hook methods + Addition methodsSpecific entities of Component and custom controllerEvents Specific entities of View ControllersNavigation PlugsOutbound Plugs, Inbound PlugsActionsSpecific entities of Window ControllersOutbound Plugs and Inbound PlugsContext nodeIndependent NodeNode that is a direct child of the Context Root Node exists at runtime as an empty collection or with one default elementDependent NodeNode that is exists only if their parent collections contain at least one elementContext node propertiesCardinalityMaximum and Minimum number of elements the node collection may hold at runtimeLead SelectionSingletonIf child noe has its singleton property set to FALSE, then for every element in parent node collection there will be a distinct instance of the child nodeIf child noe has its singleton property set to TRUE, then it does not matter how many elements are present in parent node , there will be only instance of the child nodeSupply FunctionMechanism for repopulating child nodes only when necessary. This is called by WD runtime automatically :a. If node's collection is initialb. if the lead selection index of the parent node is changedc. if the node's collection is invalidated programaticallyContext MappingExternal Mapping-Mapping origin node and mapped node lies in the same componentInternal Mapping-Mapping origin node lies outside of the current componentUI Element CategoryTextWDR_TEST_UI_ELEMENTSActionSelectionComplexLayoutGraphicsIntegrationLayout ManagerFlowLayoutAll child attributes of this container are displayed as a row as long as the container is wide enoughRowLayoutChildren 'LayoutData' property = RowData, Child element appears on the same line as the previous elementChildren 'LayoutData' property = RowHeadData, a line break is forcedMatrixLayoutChildren 'LayoutData' property = MatrixData, Child element appears on the same line as the previous elementChildren 'LayoutData' property = MatrixHeadData, a line break is forcedThe child elements in this container are arranged in the columns. No of column is equals to the maximum no of child elements in any rowGridLayoutVertical allignment of elements with the no of columns defined by 'colCount' propertyHook methodsMethodExplanationExistencewddoinit()First method in controller's lifetimeAll controllerswddoexit()Last method in controller's lifetimeAll controllerswddobeforenavigation()Called after the actionmethod has been processed and just before WD framework processes the events in the navigation queue.Component controllerwddopostprocessing()Last controller method that is processed before UI is sent to the clientComponent controllerwddoapplicationstatechange()Processed eachtime the application is suspended or resumedComponent controllerwddobeforeaction()the first method processed after a client event has been triggeredwddoafteraction()Processed after action handler method has been processedwddomodifyview()Last view controller method to be processedOnly method allowing access to UI element hierarchywddocontextmenu()Processed if user right-mouse clicks on UI elementwddoonopen()Processed if window is send as a popup,just before popup is openedwddoonclose()Processed if window is send as a popup,just before popup is closedInternationalizationUse OTR alias textsData element textsText element from ABAP class Message AreaPositionDefault: On top of pageAnywhere using MessageArea UI elementDisplay or HandlingShow message are on demandAlways display message areaMethod to report Messages3 kindsTextMethods allow to report messages of arbitary text literalsT100Methods allow to report messages that are based on texts defined in the tbale T100ExceptionsCatchable runtime errors and related texts can be shown as messages Input Help mode of Cotext attrDeactivatedNo input help, Independent of referred data typeAutomaticInput help is determined by WD runtimeDictionary Search helpDeveloper can choose a search help defined in abap dictionaryObject Value selectorPredefined, Configurable WD component implementing a search help can be used to define search help dialogUser-Defined progarmmingUser-defined WD component implementing a search help dialog is used to define the search helpValue selectorsDefinition: A value selector is a value help that allows user to choose one value or multiple values from a predefined setIndex BindingAll values to be displayed in the value selector are to be stored in the context as attribute values of the collection elementsKey BindingThe value set is assigned dynamically by changing the attribute's metadata at runtimeSemantic HelpToolTipExplanation TextF1 helpComponent ReuseConsumer componentUsed componentDirect Context MappingExternal context mappingDialog Boxex(PopUp)External dialog BoxDialog box is opened in a separate browser windowcrete_external_window()Modal dialog BoxDialog box is opened in current browser windowModal dialog BoxConfirmation Dialog BoxDisplay simple text with standardized set of buttons to define the next stepcreate_popup_to_confirm()Dialog box displaying window of same componentDisplay any window of same component as a popupcreate_window()Dialog box displaying interface view of a component usageDisplay any interface view of any component usage as a popupcreate_window_for_cmp_usage()Adaption TechniquesConfuguration(Customizing and Personalization)EnhancementDynamic programming/Dynamic Runtime modificationDynamic context manipulationDynamic UI manipulationDynamic assignment of actions to UI elements
Sheet3A window can contain any number of views and A view can be embedded in any number of windowshttp://scn.sap.com/docs/DOC-8863http://scn.sap.com/people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements