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



Apr 16, 2011, 4:37 PM
3 Posts

Partial refresh for combobox onchange event within custom control

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: onchange event partial refresh custom control
  • Replies: 1
I've got an xpage with a panel that is rendered based on 'viewScope.get("activate")'.  In the xpage I've got a custom control that has bits and pieces of other items including a combobox whose onchange event has the following:
var atv = document1.getItemValueString("activate");
if (atv == "yes") {
viewScope.put("activate",true)
}else{
    viewScope.put("activate",false)
}

If I select 'Full Update' it works just fine, meaning the Panel will hide or unhide.  I would like to do a 'Partial Update' but the Element is not available. If I specify the Element ID with the name of the Panel it will not work.  I've tried to follow some hints given on subject at youatnotes.de but still no luck.  Any assistance with this would be appreciated.
Apr 18, 2011, 4:38 PM
50 Posts
Re: Partial refresh for combobox onchange event within custom control
The problem is that when you use the "rendered" property to hide an element, that element is not merely hidden, it is actually NOT rendered. Thus if you try to render visible it with a partial refresh, there is no element to get a handle on to render. (Did that make sense??)

You can use the css "display" or "visibility" properties to hide or display the element.
 
In the Properties tab of the element that you want to hide,  go to All Properties, Styling, style and compute your values there. In your case you could use the following:
 
If ('viewScope.get("activate")) {
display:inline
} else {
display:none
}
 

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