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



Oct 22, 2012, 5:32 PM
24 Posts

Hide Show Multiple Panels with Partial Refresh on Combobox

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 1
I have a combobox that I would like to hide/show a certain panel...
 
I have one main panel that I perform the partial refresh on with 2 other panels that have a Visible computed property...  I would like one of the 2 "inner" panels to hide/show based on what value is selected in the combobox....
 
Here is the code snippet:
<xp:table>
                <xp:tr>
                    <xp:td>Search Type:</xp:td>
                    <xp:td>
                        <xp:comboBox id="searchType">
...
                            <xp:eventHandler event="onchange" submit="true"
                                refreshMode="partial" refreshId="searchHideShow">
                            </xp:eventHandler>
                        </xp:comboBox>
                    </xp:td>
                </xp:tr>
            </xp:table>
            <xp:panel id="searchHideShow">
                <xp:panel id="byName">
                    <xp:this.rendered><![CDATA[#{javascript:var searchTypes = getComponent("searchType").getSubmittedValue();
if (searchTypes == "By Name") {
    return false;
}
else {
    return true;
}}]]></xp:this.rendered>
...
                </xp:panel>
                <xp:panel id="byOther">
                    <xp:this.rendered><![CDATA[#{javascript:var searchTypes = getComponent("searchType").getSubmittedValue();
if (searchTypes == "By Name") {
    return true;
}
else {
    return false;
}}]]></xp:this.rendered>
...
                </xp:panel>
            </xp:panel>
 
Thanks!
Dan
Oct 23, 2012, 3:27 PM
586 Posts
Re: Hide Show Multiple Panels with Partial Refresh on Combobox
 It would be helpful if you posted what's happening...  do you get an error message?  What's not working?  etc...
 
That way instead of looking at your code and trying to guess, you might get a better response. 
 
I have NO idea is this is relevant - but I did a NotesIn9 show on Rendering a while back.  Maybe that would be helpful. 
 
http://xpages.tv/xtv3.nsf/episode_user.xsp?action=openDocument&documentId=92A 
 
Dave 

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