cancel
Showing results for 
Search instead for 
Did you mean: 

To fix the size of a ui element to 32 bit character

Former Member
0 Kudos
43

Hi all ,

I have a scenario in webdynpro in which i have to set a data coming from back end which may be more than 32 character so we have to display 32 character from the last(right aligned) and if necessary using the cursor we should navigate left or right in the data.if possible the display UI element should be readonly .

i tried changing all kind of properties.still couldn't get it..

with Thank & regards

Praveen.K.T

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello Praveen,

1) create 5 context attributes: text (string), textToDisplay (string, calculated), index, enableLeft (boolean, calculated), enableRight (boolean, calculated)

2) create link to action with text "<<", bind enable property to enableLeft, assign action handler.

3) create text view, bind it to textToDisplay

4) create link to action with text ">>", bind enable property to enableRight, assign action handler.

5) implement calculation methods for textToDisplay, enableLeft, enableRight (using maxTextLength and index).

6) implement action handlers for navigation to left and right (increase or decrease index).

Best regards, Maksim Rashchynski.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi praveen,

I can give you an close answer but may not be the right one.

try following these steps.

You can not make the ui element readonly and use the cursor to navigate the message

1.you can set the context data property to readonly.

To display the data try using the input field.

Setting the input field properties

2.You can set the lenght of the input field in the table to 32 characters

3.Set the alignment property to forced right.

4.Set the text direction to rtl(which means right to left).

This will work fine but one problem is the cursor will move the other way which means when you press right direction key the cursor will move left and left direction key it will go right.

Otherwise this is very much your scenario which your are looking for.

Regards,

Arunkumar