This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 30, 2011, 9:23 PM
47 Posts

Re: <xp:include>, custom controls and properties

  • Category: Other
  • Platform: All
  • Release: 8.5.2
  • Role: Developer,Administrator
  • Tags:
  • Replies: 7
 Since I am trying to include multiple instances of a certain custom control, the lack of ability to pass any parameters means that each control wouldn't know what scoped variable was intended for it.
Apr 13, 2011, 3:18 PM
8 Posts
Re: <xp:include>, custom controls and properties
Any further joy with xp:include?
I can't get it to dynamically load a page via the setPageName method. 
Although the property appears to be set correctly, the page does not refresh (even with a Partial Refresh).
Only when I click F5 does it update. 
Any ideas? 
Apr 14, 2011, 12:30 PM
8 Posts
Re: <xp:include>, custom controls and properties
OK, after a bit of experimenting (with a closer look at hints in previous posts), I've been able to get the xp:include working dynamically.
I used the technique of passing parameters along with the xPage address.
 
As an example, bringing up the "menu" page with an included page of "test1" can be done with "/menu.xsp?Page=test1.xsp".
If I want a different page embedded, I simply load the page "/menu.xsp?Page=test2.xsp".
 
The xp:include "pageName" attribute is calculated from the "Page" parameter passed to the webpage via a 'context.getUrlParameter("Page")' call.
 
Simple when you know how.... 
 
I've tied this to a menu tree on the left hand side of a xPage to allow navigation of various views/forms by clicking items in the tree.
The overall frame of the xPage only needs doing once with the tree navigation, headers, footers, etc. and then each view/form is embedded when the item is clicked. This keeps the real working pages quite small and leaves the surrounding frame separate and consistent across all pages.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal