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



Jan 25, 2012, 3:00 AM
13 Posts

Pass selected List Box values to another list box

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role:
  • Tags:
  • Replies: 1
 How can i pass selected list box values to another list box using a button
Jan 31, 2012, 10:39 AM
272 Posts
Re: Pass selected List Box values to another list box
Hi,
 
do you mean something like this?
 
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:listBox id="listBox1" multiple="true"
        value="#{viewScope.selectedValues}">
        <xp:selectItem itemLabel="1" itemValue="1"></xp:selectItem>
        <xp:selectItem itemLabel="2" itemValue="2"></xp:selectItem>
        <xp:selectItem itemLabel="3" itemValue="3"></xp:selectItem>
    </xp:listBox>
    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:listBox id="listBox2" value="#{viewScope.selectedValues}"
        multiple="true">
        <xp:selectItem itemLabel="1" itemValue="1"></xp:selectItem>
        <xp:selectItem itemLabel="2" itemValue="2"></xp:selectItem>
        <xp:selectItem itemLabel="3" itemValue="3"></xp:selectItem>
    </xp:listBox>
    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:button value="Label" id="button1">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
        </xp:eventHandler>
    </xp:button>
    
</xp:view>
 
If you click the button, the values selected in listBox2 will be selected in listBox1.
 
Hope this helps
Sven
 

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