cancel
Showing results for 
Search instead for 
Did you mean: 

How to refresh view and data on it by performing an action on the same view

Former Member
0 Kudos

Hi Experts,

I need to refresh the view in the web dynpro componenet by performing an action on the same view (My requirement is to rearrange the UI elements and data on the view). How to refresh a view of WDC, is there any possibility of calling WDMODIFY view explicitly? or any work arounds plz.

Thanks,

Hari.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You have a method called reset_view in if_wd_view interface. You can use that to reset the View. You do not have to call the wddomodify view on your coding. The framework does it for you before the UI is rendered.

former_member199125
Active Contributor
0 Kudos

Refresh of Data means,

for example, alv table data we can refresh by below code.

DATA: lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.

DATA lo_value TYPE REF TO cl_salv_wd_config_table.

DATA lr_table_settings TYPE REF TO if_salv_wd_table_settings.

lo_interfacecontroller = wd_this->wd_cpifc_candidate_alv( ).

lo_value = lo_interfacecontroller->get_model(

).

lr_table_settings ?= lo_value.

CALL METHOD lr_table_settings->set_refresh_on_data_change

EXPORTING

value = if_salv_wd_c_table_settings=>refresh_data_only.

And rearrangement of UI elements means, You have to write the code in wddomodifyview method, by rearranging the layouts.

Regards

Srinivas

Former Member
0 Kudos

Hi Krish / sanasrinivas

My requirement is there are four nodes and Node1 Node2 Node3 Node4 ... and each node having the 2 input fields and one button.

I am creating input filelds and button using Dynamic programming while creating I am defaulting the first input field. Example Node 1's first input field filled with N1 second input field enter by user and Node 2's first input field filled with N2 second input field enter by user and Node 3's first input field filled with N3 second input field enter by user , and Node 4's first input field filled with N4 second input field enter by user .

once I press on the seconde node delete button its deleting the second row from UI and now on the UI N1 with respctive fields and N3 with respective fields and N4 with respective fields . But my requirement is once N2 is deleted from UI... N3 should become N2 with the respective fields and N4 should become N3 with respective fields...

Is there any work around for this........

Former Member
0 Kudos

Hi Krish / sanasrinivas

My requirement is there are four nodes and Node1 Node2 Node3 Node4 ... and each node having the 2 input fields and one button.

I am creating input filelds and button using Dynamic programming while creating I am defaulting the first input field. Example Node 1's first input field filled with N1 second input field enter by user and Node 2's first input field filled with N2 second input field enter by user and Node 3's first input field filled with N3 second input field enter by user , and Node 4's first input field filled with N4 second input field enter by user .

once I press on the seconde node delete button its deleting the second row from UI and now on the UI N1 with respctive fields and N3 with respective fields and N4 with respective fields . But my requirement is once N2 is deleted from UI... N3 should become N2 with the respective fields and N4 should become N3 with respective fields...

Is there any work around for this........

former_member199125
Active Contributor
0 Kudos

I hope I understand littel bit, You want to move 3rd node values to 2nd node values?

First tell me, from where will you delete the 2nd Node ?( why i am asking you said you are creating dynamically ).

So tell me where you are tyring to delete 2node.

If you write a code for deletion in some method, then you have to write the code for moving n3 to n2. (only values )

I dont think is there any other way.

Other wise , could you please tell me what is your scenario ?

Regards

Srinivas

saravanan_narayanan
Active Contributor
0 Kudos

Hello Hari,

I got your requirement but it would be better if you can tell us about your exact UI requirement/behavior so that we can propose a opt solution for the same.

with your current design, the only option you have is to move the data from N3 to N2 and from N4 to N3 and then to delete the last set of input fields. If you delete the 2nd set of input fields, then you need to change the context binding of the 3rd and 4th set of input fields to point to N2 and N3 respectively. This is not a good solution. So better tell us about what is expected from the user perspective about the UI behavior.

BR, Saravanan

Former Member
0 Kudos

Hi Harikrishna,

Reresh means perform like 'F5' functionality?

Please check this..

Cheers,

Kris.