cancel
Showing results for 
Search instead for 
Did you mean: 

Input-fields are getting reset automatically.

0 Kudos

Hi Experts,

I have created on webdynpro application, in which there are some input fields for enter values. But as soon as I enter values in these input fields it is getting refreshed. I have not written any logic to refresh the same.

But I would like to maintain the data in the field untill the view exit.

Already written logic in WDMODIFYVIEW Method.

In which I am reading the node and setting the node. but it is not working.

Please help.

Regards,

Pradeep.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190321
Participant
0 Kudos

Hi Pradeep,

Check if you do note have the invalidate method in your code because that the one that normally clears the nodes :

DATA lo_nd_## TYPE REF TO if_wd_context_node.

   

lo_nd_##->invalidate( ).

0 Kudos

Hi

I implemented this logic, but whenever the  I enter the value in that input field value is disappearing.

Regards,

Pradeep

Szczerbowski
Active Participant
0 Kudos

Two things you could do:

- comment out all stuff in wddomodifyview and check your result, to check if it's not your code to blame

- paste the whole wddomodifyview code here to analyze

M.

former_member205488
Active Participant
0 Kudos

Hello Pradeep!

Could you show the implementation of WDMODIFYVIEW?

0 Kudos

    DATA lo_nd_mat_selection TYPE REF TO if_wd_context_node.

    DATA lo_el_mat_selection TYPE REF TO if_wd_context_element.

    DATA ls_mat_selection TYPE wd_this->element_mat_selection.

    lo_nd_mat_selection = wd_context->get_child_node( name = wd_this->wdctx_mat_selection ).

    lo_el_mat_selection = lo_nd_mat_selection->get_element( ).

    IF lo_el_mat_selection IS NOT INITIAL.

      lo_el_mat_selection->get_static_attributes(

      IMPORTING

        static_attributes = ls_mat_selection ).

    ENDIF.

" Set the selection parameters

  lo_nd_mat_selection = wd_context->get_child_node( name = wd_this->wdctx_mat_selection ).

  lo_el_mat_selection = lo_nd_mat_selection->get_element( ).

  IF lo_el_mat_selection IS NOT INITIAL.

    lo_el_mat_selection->set_static_attributes(

     static_attributes = ls_mat_selection ).

  ENDIF.

former_member205488
Active Participant
0 Kudos

What exactly do you want to implement in WDMODIFYVIEW method? What occurs between get_static_attributes() and set_static_attributes()? Looks like the structure ls_mat_selection is initial when you pass it to set_static_attributes().

0 Kudos

I am trying to implement the logic to maintain the data whatever is entered by the user in the input field.

Using get method I am trying to get the data which is entered by the user, and the same value is needs to be displayed in the fields.

At present, whenever user enters the value in the field it is getting disappeared as soon as  I move to next input field.

please help.

Regards,

Pradeep

former_member205488
Active Participant
0 Kudos

It looks like you are reading static attributes from context node mat_selection and writing this attributes to the same node at once. May be you want to write this attributes to another node (not mat_selection), don't you?

0 Kudos

No with the same node

Former Member
0 Kudos

Hi,

Why are you setting back the values to the input fields?.. When ever user tries to enters any input data it will remain .

Thanks

KH