Show TOC Start of Content Area

Background documentation Recommendations and Restrictions   Locate the document in its SAP Library structure

For most Web Dynpro entities you can choose names as required for your needs. Yet, for readability reasons, some rules should be considered. The following list shows some naming conventions for Web Dynpro coding entities recommended by SAP.

Naming Conventions for Web Dynpro Entities

WD Entity

Name

Suffix

Recommendations and Rules

Action

{act}

 

{act} should start with an uppercase letter.

Application

{a}

App

{a} describes the business process being delivered. It starts with an uppercase letter.

Some other WD entity names are generated using {a} as their base name and adding the corresponding suffix (e.g. root component name is generated by {a} and the suffix Comp).

Attribute

 

 

Attribute names should start with an uppercase letter.

All attribute names must be unique within the scope of their parent node.

 

Context Attribute

{ca}

Value Attribute

{va}

Calculated Value Attribute

{cva}

Calc

Component

{a}

or

{c}

Comp

Root component reuses {a} from application.

For all other components  {c} describes a (reusable) unit of functionality within the application.

Component Interface Definition

{cid}

I

{cid} describes the purpose of the component interface definition on an abstract level.

Component Interface View

{c}

IntfView

Automatically created with component.

Reuses {c} from component name.

If only one interface view is needed for a component interface, SAP NetWeaver Developer Studio automatically adds the suffix InterfaceView to the component name {c}.

If multiple interface views are required,  use component name with distinguishing name as suffix.

Component Interface View Definition

{cid}

InterfaceView

or
<dist. name>

If multiple interface views are required, use component interface definition name with distinguishing name as suffix.

Component Usage

{c}Comp{p}

or

{cid}{p}

Inst

The usage instance name is defined by either the previously defined child component name {c},  or the component interface definition name {cid},  both followed by the usage purpose {p} and the suffix Inst.

Component Usage Purpose

{p}

 

{p} describes the purpose for which this child component instance is being created.

Context

{ctl}

 

Always equals the name of the controller {ctl} to which it belongs

Custom Controller

{cc}

Cust

{cc} describes an encapsulated part of the component implementation.

If only one custom controller exists, use the component name {c}

Data type

{dt}

 

Data type defined either in standard Java or by the Web Dynpro data dictionary

{dtp}

 

Data type of a UI element property

Development Component (Project)

{pr}

 

{pr} defines the category of the business processes being delivered. {pr} must be lowercase.

Event

 

 

 

 

UI Element Event

on{evt}

 

Type and name of UI element event depends on UI element type. You cannot change the name.

Action Event Handler

onAction{act}

or

{mthd}

 

Client-side event raised by a UI element event. By default, the action event name is formed by the prefix onAction and the action name {act}. You cannot change this name. Assign another method instead.

Inbound Plug Event Handler

onPlug{pi}

In

You can modify the name if required

Method

{mthd}

 

{mthd} should start with a lowercase letter.

Model

{m}

Model

SAP strongly recommends that each Web Dynpro model belongs to its own Java package.

Model Object

{mo}

 

Model object referred to by a model node

Node

 

 

Node name should start with an uppercase letter. All node names created at design time must be unique within the entire context.

 

 

Child Node

{chn}

 

Context Node

{cn}

 

Value Node

{vn}

 

Model Node

{mn}

 

{mn} should have the same name as the class within the model to which it will be mapped.

Recursive Node

{rn}

 

Only if a recursive context node is added dynamically, {rn} doesn't  need not be unique within context.

Package

{pkgsap}

 

Standard SAP Java package containing all internal Web Dynpro Framework (WDF) classes. This is currently com.sap.tc.webdynpro.progmodel.*

{pkgusr}

 

User-defined Java package. {pr} should be lowercase.

Plug

 

 

Plug name should start with an uppercase letter.

 

Inbound Plug

{pi}

In

{pi} describes the reason for which the target view is being entered. 

Corresponding event handler in view controller by default is named onPlug{pi}In

Outbound Plug

{po}

Out

{po} should describe the reason for which the current view is being left, not the reason for which the target view is being entered.

Corresponding method in view controller is always named wdFirePlug{po}. Name or implementation must not be modified.

Project

{pr}

 

{pr} defines the category of the business processes being delivered. {pr} must be lowercase.

Supply Function

supply{cn}

 

By default, the SAP NetWeaver Developer Studio creates a supply function for a context node in the form supply{cn}. You may change this name if required.

View

{a}Comp

or

{v}

View

Standard view created with the component automatically gets component name {a}Comp with the suffix View.

For all further views you give a descriptive name and add the suffix View.

Window

{a}

Win

Reuses {a} from application.

Example

The creation of node {cn} within controller {ctl} causes the following classes to be generated:

·        IPublic{ctl}.I{cn}Node

·        IPublic{ctl}.I{cn}Element

The methods implemented by these classes vary depending on whether a child node {chn} exists for the parent node {cn}, and, if {chn} does exist, whether or not it is a singleton.

In the tables below, methods that have a grey background only exist if node {cn} has a child node {chn}.

Methods Generated With Class of Context Node {cn}

Generated Class

Method

IPublic{ctl}.I{cn}Node

I{cn}Element create{cn}Element()

I{cn}Element current{cn}Element()

I{cn}Element get{cn}ElementAt(int)

void bind(I{cn}Element)

I{chn}Node node{chn}()

I{chn}Node node{chn}(int)

Methods Generated With Class of Context Element {cn}

Generated Class

Method

IPublic{ctl}.I{cn}Element

String get{cn}Name()

void set{cn}Name(String)

I{chn}Element current{chn}Element()

I{chn}Element create{chn}Element()

I{chn}Element get{chn}ElementAt(int)

I{chn}Node node{chn}()

Note

This method  only exists if the child node {chn} is a non-singleton with respect to its parent node {cn}.

 

End of Content Area