FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Dec 30, 2011, 9:25 AM
57 Posts

Re: redirecting to another xpage but reqestscope is empty

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: requestScope
  • Replies: 8
FacesContext.getCurrentInstance().getExternalContext().dispatch(arg0)
can not be used in Xpages "Function is not available in the Domino environement " and they spell wrong on this excpetion........."environement",    "environment"
 
but we can do this
pageA.xsp and pageB.xsp
pageA.xsp defines requestScope param, and pageB.xsp catch it
 
put a button in pageA.xsp
 
<xp:button value="Label" id="button1">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:requestScope.paramA="I am requestScope param";
var viewRoot1:UIViewRoot =facesContext.getApplication().getViewHandler().createView(facesContext, "/pageB.xsp");
facesContext.setViewRoot(viewRoot1);
facesContext.renderResponse();
}]]></xp:this.action>
        </xp:eventHandler>
    </xp:button>

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.