Search code examples
ajaxxpagespartial-refresh

How to display user message outside partial refresh in XPages


I have a panel that contain a link in XPages, the link do a partial refresh on the panel. if the link action is successful I want to display a message to the user outside of the panel.

how can this be accomplished?


Solution

  • Could you not use onComplete?

    <xp:eventHandler event="onclick" submit="true"refreshMode="partial"refreshId="YOURCURRENTPANEL">
    <xp:this.onComplete><![CDATA[XSP.partialRefreshGet("#{id:2NDPANEL}")]]></xp:this.onComplete>
    

    The 2nd panel could contain your message to the user, maybe with visible code based on a requestScope variable you set also during the onComplete? (Better ways to do this, but you get the idea?)