0% found this document useful (0 votes)
26 views2 pages

05 1 Exercise Default Value

This document provides instructions for an exercise to set a default value for a context attribute in a web application. The objectives are to navigate to a context node, get the context node element at lead selection, and set the value "AA" as the default for the attribute "CARRID". Developers are instructed to copy an existing web component, navigate to the view controller method WDDOINIT, insert code to navigate the context node FLIGHTINFO, get the lead element, and set the default value of the CARRID attribute to "AA". Finally, a web application is created from the component.

Uploaded by

Vikas Vikas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

05 1 Exercise Default Value

This document provides instructions for an exercise to set a default value for a context attribute in a web application. The objectives are to navigate to a context node, get the context node element at lead selection, and set the value "AA" as the default for the attribute "CARRID". Developers are instructed to copy an existing web component, navigate to the view controller method WDDOINIT, insert code to navigate the context node FLIGHTINFO, get the lead element, and set the default value of the CARRID attribute to "AA". Finally, a web application is created from the component.

Uploaded by

Vikas Vikas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Context Programming

Exercise

Chapter: Context at Runtime


Theme: Setting a default value for a context
attribute
At the end of this Exercise, you will be able to:
 Navigate to a context node
 Get context node element at lead selection
 Set a value for an attribute

1 Development Objectives
This exercise has the following objectives:
Setting “AA” (American Airline) as default value for the input field “Airline”.

2 Result

In this exercise, you will use the


WDDOINIT method of the view
controller to set “AA” as default value
for the input field “Airline”.

Template Solution:
Web Dynpro Component: WD_05S_DEFAULT_VALUE
Application: WD_05S_DEFAULT_VALUE

Starting Point of this exercise:


1
Context Programming
Exercise
Web Dynpro Component: ZWD_##_SIMPLE_APPLICATION

or the template solution

Web Dynpro Component: WD_03S_SIMPLE_APPLICATION

Group number: ## stands for the two-digit group number

3 Developing

3-1 Copy Web Dynpro Component


Copy your Web Dynpro Component ZWD_##_SIMPLE_APPLICATION
or the template solution WD_03S_SIMPLE_APPLICATION to name
ZWD_##_DEFAULT_VALUE.

3-2 Create Default Value


Navigate to the Methods tab of view INPUT_VIEW and double-click on
the method name WDDOINIT.
Insert source code for doing the following:
- Navigate to context node FLIGHTINFO
- Get element at lead selection for context node FLIGHTINFO
- Set “AA” as default value for attribute CARRID.

3-3 Create Web Dynpro Application


Right mouse click on the component node and select Create -> Web
Dynpro Anwendung (Web Dynpro Application) from the context menu.
Create the application having the following attributes:
Name: (accept default)
Decription: Default Value
Accept all default settings and press Save and run your application.

2
Context Programming
Exercise

You might also like