cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh Views inside view set

Former Member
0 Kudos

Hi,

I have create view set inside that i have two view.

When i click a button it should display the second view down.

Content in second view will be depends On the first view drop down.

But After clicking the Dropdown once and click the button it will go to next page.

After display of the next page if any one change the value in the dropdown menu, it should refresh that second page how it will be possible can one tell the procedure please. Or any code to be added in both the views.

Regards,

H.V.Swathi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Expert,,

If your requirement is very simple..

firsly you will create one value attribute name wiil be (your convenient) in component controller and go to open data modeler ..that value attribute mapped into both of view like--firstview and result view.

in firstview you have created one dropdrown by key and second view like result view just created one textview..

suppose dropdown created by simple type as ..go to Local Dictionary then you will show the key value in result view.

you have to create action like OnSelectShowResultView()...this action set into On select property of DROPDOWNBYKEY ui element.

My case --Value Attribute shoul be setValue.

Radio--is binding into dropdown selectedKye property

Radio-- should be your local dictionary simple type as dataType

public void onActionselectdrp(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionselectdrp(ServerEvent)

wdContext.currentContextElement().setSetvalue(wdContext.currentContextElement().getRadio());

//@@end

}

after clicking OK button i--it will show you current value in your result view..

if you change drop down value it will aslo show your result view immediately

thanks

Skumar

Former Member
0 Kudos

Hi swathi,

please write the following code in the onactinPlugfrom<Firstview>

wdThis.wdGetContext().wdGetAPI().reset(true);

I tried it ... it works...:)

Jithin

Former Member
0 Kudos

Hi,

Thanks for ur reply,

As i told before in my view set i have two views. Once u select a dropdown and Click a button next view will be visible on the screen. But Once the second view be visible. (Now u can see both the views in screen .) So , if i do any changes in first view it should again call second view wdInit() method. How can i do this.?

I hope i am confusing you.

Thanks for ur help.

Regards,

H.V.Swathi

Former Member
0 Kudos

Hi,

wdDoInit in ComponentController or in ViewController would be called only one time automatically by the WAS.

So if u want to call some code written in wdDoInit, then its better that you seperate them in another method and call them from wdDoInit, and in the Inplugfrom the other view as well.

Hope this will help you...

Jithin

Former Member
0 Kudos

Hi,

I think you have some Input fields in your second view and u need to clear it when a new value is selected from the drop down in your first view. If this is your requirement then,

In the second view -> in the onnPlugFrom<firstview> ->code to set the attributes to null;

U can try this for the time being till u get some input from 'experts'....:)

Jithin.