cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the Cursor in WD4A

Former Member
0 Kudos

Hi all,

Thx in Advance...

In my Login page,After Login Fails i redirect to login page with clear the input field values...

After clear the input entry i want to set my cursor in ID input field...How can i do this???

Any related link is there?????

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

data: lr_view type ref to if_wd_view_controller.

data: lr_element type ref to if_wd_context_element.

data: lr_node type ref to if_wd_context_node.

lr_node = wd_context->get_child_node( '<node_name'> ).

lr_element = lr_node->get_element( ).

lr_view = wd_this->wd_get_api( ).

lr_view->REQUEST_FOCUS( context_element = lr_element attribute ='<attribute_name>' ).

Former Member
0 Kudos

Thx for ur reply...

MY_INPUT_FIELD ?= view->get_element( ID ). In this how can i define view???Is this get it from Context.get element????

abhimanyu_lagishetti7
Active Contributor
0 Kudos

the earlier code was not working, i have modified the code.. try it now.

Former Member
0 Kudos

Hi,,

I am using the same code.But i didn't get the results..The focus should be While submitting the screen where it will be located at the same position only it will be pointed,Not to the declared attribute.How to solve this??????

Former Member
0 Kudos

check this comp wdr_test_focus

Thanks

Bala Duvvuri

Former Member
0 Kudos

Hi thx...

In our system there is no comp like wdr_test_focus.Is there any other related example?????

Former Member
0 Kudos

Hi Chandramohan,

Place the Piece of code in the Modify View method

**** method to set focus
  data: lr_element type ref to if_wd_view_element. " Reference for view Elements 

  CALL METHOD VIEW->GET_ELEMENT
    EXPORTING
      ID      = 'BTN_BACK'       " Pass the ID of the User name UI element 
    RECEIVING
      ELEMENT = lr_element.

  CALL METHOD VIEW->REQUEST_FOCUS_ON_VIEW_ELEM
    EXPORTING
      VIEW_ELEMENT = lr_element.

Regards

Chinnaiya P

Former Member
0 Kudos

Thx buddy..

Solved my pblm....

Answers (0)