You can refresh the portlet data periodically.
Before you begin
You must add the attribute
extnJSONObject in the
store-extn-include.jsp file. This JSP file is meant only for customization and
there would be no product updates to this file. The value for this attribute is the refresh interval
in seconds. The path for store-extn-include.jsp file inside the runtime is
About this task
You can choose to externalize the refresh interval or hardcode it in the store-extn-include.jsp file. One of the ways to externalize the refresh interval is to store it in a properties file, read it in the store-extn-include.jsp file, and return it to the user interface layer. If you prefer to use this method, refer the steps in the following procedure.
Define a custom property in the customer_overrides.properties file, which
takes the refresh interval value in seconds. For example,
- In the store-extn-include.jsp file, read this property and set the
<% SCUIContext uiContext = SCUIContextHelper.getUIContext(request, response); String refreshInterval = APIManager.getInstance().getProperty("yfs.isf.ui.portletAutoRefreshInterval"); JSONObject extnJSONObject = new JSONObject(); extnJSONObject.put("portletAutoRefreshInterval", refreshInterval); request.setAttribute("extnDataJson",extnJSONObject.toString()); %>