webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Refresh a portlet from another portlet

    Posted Mon July 26, 2010 08:35 PM

    Hi all,
    I am new to CAF development. I have a application which has 2 portlets configured in a page. I am doing some business logic, and based on the business logic, i want to refresh second portlet. I dont want to refresh whole page for doing so.

    Can anybody suggest me a solution for this?

    Thanks

    -Kumar Gowda


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 2.  RE: Refresh a portlet from another portlet

    Posted Mon July 26, 2010 11:30 PM

    The Designer help documentation briefly describes the procedure in the “User Interface Controls Concepts / Control ID Reference” section like this:

    [quote]

    External Portlet References

    Some controls can accept a reference to another control outside of the current view, in an external portlet on the same portal page. An external portlet reference begins with the URI of, or an alias to, the portlet, followed by a pound sign (#), followed by the absolute control ID reference (sans leading colon). For example, say the “myPanel


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 3.  RE: Refresh a portlet from another portlet

    Posted Tue July 27, 2010 10:27 AM

    Thanks for the reply Eric,
    My requirement is somewhat different.
    I have to check whether a user is entitled to do access any functions in my application. if not, i have to redirect to error page.
    I am checking for entitlements in my header portlet, and now i have to redirect the contents to some other page.

    I am not sure whether this approach is correct or not. Could you tell me how to achieve the same?


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 4.  RE: Refresh a portlet from another portlet

    Posted Mon August 02, 2010 10:14 PM

    If you are talking about redirecting during the rendering of your header portlet, then you will probably have to do a client-side redirect from javascript. A server-side redirect may not work since the page has already been partially rendered.

    Add a Script Block control to your CAF view to change the current page whose value is something like this:

    window.location = "/alias_of_error_page";

    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 5.  RE: Refresh a portlet from another portlet

    Posted Wed August 04, 2010 11:22 AM

    Hi,
    If you want to redirect to a page from server side, you can use the following.

    getFacesContext().getExternalContext().redirect();

    Provide a valid alias in the place of


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS