cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing the browser.

pranav_nagpal2
Contributor
0 Kudos

Hi All,

I need to refresh my view when a button is clicked. There is only one view. And please tell if the method you are posting will work in IE as well as Firefox.

Thanks in advance.

Pranav

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You should always try to "refresh" your view with navigation plugs within the application/usage of view lifetime setting/invalidating your context node and try to just reload the application when possible. The overhead of destroying the session state and recreating it is usually considerably more processing than clearing the application programatically.

pranav_nagpal2
Contributor
0 Kudos

Hi,

Thanks for answering. Actually my application demands three drop down for country, city and period. Now based on country key selected i have to display city and period. Now if i invalidate the nodes for all the drop downs it is working fine for country as i m getting country list in drop down but for city and period i m getting the old values which i previously filled before refreshing. Requirement is that based on country key selected the drop down for city and period should get populated.

What i did to achive this is that i created another value set in action of refresh button and filled it with null values and binded it with the drop downs. But now i m getting a blank field which i can select in the drop down.

So to achive this functionality what i was thinking is that if there is any method which can do the same work as the refresh button of the browser is doing.

Regards,

Pranav

Former Member
0 Kudos

Hi,

Here are a couple of suggestions:

1) Have a context node called COUNTRY (0..n). Under COUNTRY create a node called CITY (1..n) and PERIOD. Have singleton = false for all nodes, and fill in all the data in the WDDOINIT method. Now, in your View, set an action for the onSelect event of the COUNTRY drop down. You do not even have to do any coding in the method. When the view returns from the action, it will present the correct list of cities and periods, because they have been bound correctly.

2) Assuming that COUNTRY (0..n), CITY (0..n) and PERIOD (0..n) are all top-level context nodes, then give CITY and PERIOD a supply function . Now, in the method for responding to the COUNTRY onSelect evevnt, call INVALIDATE on the CITY and PERIOD nodes, and let their supply functions create the data for them based on the currently-selected country.

Walter

Answers (1)

Answers (1)

Former Member
0 Kudos

so on which topic you need a "view refreshing"?

if you create a button and bind an action to the button,

(even with no code in this action-method)

a server roundtrip will happen,

and your view will show the actual/current date from your context.

Alternatively, you can make a "Self-Navigation":

Create a Inbound and an Outbound Plug in your View,

and connect this one in your Window.