ShowTable of Contents
Portlet Factory Events
When you use Smart Refresh (new in WPF 7.0) or Partial Page Refresh (or Portal's Client Side Aggregation support) in a model that is firing a Portlet Factory event, only the source portlet user interface (UI) will be refreshed as a result of the action. The event will have been received by the event handler in the target model, but there was nothing to tell it to refresh its page. There are a couple of ways to remedy this.
1) In the action UI builder (for example, the Link or Button builder) that is used to initiate the event, you can change the Post-Action Behavior to Always reload the top-most page after running action. To see this option, you will have to check the Show Advanced Option check box. This setting causes the entire portal page to refresh.
2) To avoid reloading the entire portal page, you can do the following. In your source and target models Event Declaration builders, check the Use Client-Side Delivery option. (Also keep the Fire Event on Server checked.) You may also want to specify a unique prefix in these builders as well. In the event target model, you will add a Client Event Handler builder to listen to the specified event, and have it invoke the desired page as its Action. One thing to be aware of: when you are firing a Portlet Factory event with client/server delivery, you should have the link/button/etc. target the event's "fire" method directly. If this cannot be done for some reason, and you need to have the link call some action that in turn fires the event. You will need to set the Post-Action Behavior of the link to Evaluate action results as JavaScript. You must arrange for the value returned by this action to be the value returned by the "fire" method. In an action list, the easiest way to do this is to have the fire method come last.
Here is an overview of the steps when using Factory Events with Smart Refresh:
1. In your Event Declaration builder, check the Use Client-Side Delivery option. (Also keep the Fire Event on Server checked.)
2. In the Target model, add an Event Handler and a Client Event Handler builder.
3. The Event Handler action should only process the data passed to the event. This handler must not do any page processing.
4. In the Client Event Handler, you should invoke an action that processes a page. Either directly call the page action, or call an action that does a process page.
Cooperative Portlet builder
When you use the Cooperative Portlet builder where the "type" is set to
Property Broker Action (that is, you are creating your own action UI Button or Link), you will need to set the Post-Action Behavior to
Always reload the top-most page after running action. To see this option, you will have to check the
Show Advanced Option checkbox. This setting causes the entire portal page to refresh. In this use case, if you want to avoid the entire page being refreshed, you must change the Portal page to Client Side Aggregation.