Entering content frame

Procedure documentation Defining an Image Control Locate the document in its SAP Library structure

Use

You use this procedure to define the properties and event handlers for an image control. An image control is used to add images or pictures in a tile. An image file must be one of the HTML <img> element supported files.

·        Graphic Interchange Format (GIF)

·        JPEG File Interchange Format (JPG)

·        Windows Bitmap Format (BMP)

An image control:

·        Cannot be used in a grid list

·        Can be bound (associated with a data source property) or left unbound

·        Can be used to create a digital signature area for tablet computers

·        Can be associated with a hyperlink

Prerequisites

You have:

·        Identified the two data source properties that you want to associate with the image control

·        Identified the business anchor that references the data source to which the properties belong

·        Switched to the required change list

Procedure

..

       1.      In the Solution Explorer, locate the tile for which you want to design the image control, click the tile with the secondary mouse button, and choose View Designer.

The Tile Designer window appears.

       2.      In the Toolbox, drag the image control and drop it on the tile.

       3.      If you do not want to bind the image control, continue with step 4. If you want to bind the image control, use the following steps.

                            a.      In the Anchors view of the Document Outline window, expand the Unbound Anchor node.

                            b.      Drag the image and drop it on the anchor associated with the data source containing the properties that supply the control with the image file name and file extension.

       4.      In the Tile Designer, select the control.

The Properties panel displays the values for the image control’s properties.

       5.      In the Properties panel, enter the appropriate values for the control properties.

For more information on each of the properties, see Properties of an Image Control.

       6.      If you do not want to create a hyperlink, continue with step 7. If you want to associate a hyperlink, click the control with the secondary mouse button and choose View Hyperlinks.

For more information, see Model a Hyperlink.

       7.      If you do not need to create an event handler, continue with step 8. If you want to create an event handler, perform the following steps:

                            a.      In the Tile Designer, click the control with the secondary mouse button and choose Add Handler.

The New Event Handler dialog box appears with default values in the fields.

                            b.      In the Event field, select the event you want to use.

The following table provides information about the events.

Event Name

Description

onBoundAttributeChanged

The value of the ImageFileBinary or the ImageFileExtension changes.

onHyperlinkClicked

The user chooses the hyperlink. This event occurs before the hyperlink is executed.

onValueChanged2

The value of the control changes.

Caution

The onValueChanged event is not supported in this release. Use onValueChanged2 event.

                            c.      Select Edit this handler code after creation and choose OK.

                            d.      In the TODO section, enter the code you require for the event handler.

                            e.      Save the code.

       8.      Save your entries.

Result

You have defined a image control by specifying the properties and event handlers. Once you have created all the necessary controls, you can generate the mobile client application.

 

 

Leaving content frame