0

I have a radio button group, if the user selects an option, the relevant combo box will appear. The user is able to type word or just click the triangle box to search the value.

<xp:table id="InfoTable" style="margin-left:100.0px">
    <xp:tr>
        <xp:td>
            <xp:radioGroup id="radioGroup1" layout="pageDirection">
                <xp:selectItem itemLabel="Number"></xp:selectItem>
                <xp:selectItem itemLabel="Alphabet"></xp:selectItem>
                <xp:eventHandler event="onclick" submit="true"
                    refreshMode="partial" refreshId="InfoTable">
                </xp:eventHandler>
            </xp:radioGroup>
        </xp:td>
        <xp:td>
            <xp:comboBox id="comboBox1_destRank"
                dojoType="dijit.form.ComboBox" value="# {sessionScope.NumberValue}"
                style="width:100.0px">
                <xp:this.rendered><![CDATA[#{javascript:var x = getComponent("radioGroup1").getValue();

if(x == "Number")
    { return true; }
if(x == "Alphabet")
    { return false; }}]]></xp:this.rendered>
                <xp:selectItem itemLabel="1"></xp:selectItem>
                <xp:selectItem itemLabel="2"></xp:selectItem>
                <xp:selectItem itemLabel="3"></xp:selectItem>
                <xp:selectItem itemLabel="4"></xp:selectItem>
                <xp:selectItem itemLabel="5"></xp:selectItem>
            </xp:comboBox>
            <xp:br></xp:br>
            <xp:comboBox id="comboBox2_destPost"
                dojoType="dijit.form.ComboBox"
                value="#{sessionScope.AlphabetValue}" style="width:100.0px">
                <xp:this.rendered><![CDATA[#{javascript:var x = getComponent("radioGroup1").getValue();

if(x == "Alphabet")
    { return true; }
if(x == "Number")
    { return false; }}]]></xp:this.rendered>
                <xp:selectItem itemLabel="a"></xp:selectItem>
                <xp:selectItem itemLabel="b"></xp:selectItem>
                <xp:selectItem itemLabel="c"></xp:selectItem>
                <xp:selectItem itemLabel="d"></xp:selectItem>
                <xp:selectItem itemLabel="e"></xp:selectItem>
            </xp:comboBox>
        </xp:td>
    </xp:tr>

</xp:table>

I test the code and it works properly. Once I click the radio button, the relevant combo box can display.

However, when my colleagues test it, they tell me they usually have to click the radio button three or four times to show the combo box. I feel strange so I go to see how they click the button, and it is true that one colleague needs to click three times to show the combo box no matter what option he chooses and the other colleague click six times to show.

Later, we use the same computer and same pace to click the mouse to test again, I can display the combo box by click the radio button one time, but my colleagues still needs two and three times to show the combo box.

I examine the code and I don't know which part cause the strange result.

Would someone give advice please. Thank you.

References:

Community
  • 1
  • 1
beginner
  • 192
  • 1
  • 1
  • 13

2 Answers2

2

Where are they clicking? And which version of Domino are you using? I believe clicking the label did not trigger selecting the value in previous versions. It works fine for me with 9.0.1 FP3 in Internet Explorer and Firefox. It may be this issue referred to by Berndt Hort, but the IBM link doesn't work any more and the issue seems to have been fixed in later versions of Domino.

Paul Stephen Withers
  • 15,699
  • 1
  • 15
  • 33
  • In our previous tests,we click the radio button, not the label. – beginner Feb 16 '16 at 00:57
  • We visit the [Berndt Hort](http://www.assono.de/blog/d6plinks/XPagesOnClickRadioButtonBug) website and apply the code to the onclick event and test again. We move the mouse point to the radio button and same pace to click the mouse. Finally all of us only need to click one time to display the combo box. Thank you for your help. – beginner Feb 16 '16 at 01:00
0

What is the browser that your colleague is using?

onclick event for radio group does not work properly in other browsers. It works fine in IE. So we did small tweak in the eventHandler code. Please note the reder property of event as follows:

<xp:eventHandler
    event="onchange"
    submit="true"
    refreshMode="partial"
    refreshId="pnlMainTTSHF"
    disableValidators="true"
    id="eventHandler1"
    rendered="#{javascript:!context.getUserAgent().isIE()}" />
<xp:eventHandler
    event="onclick"
    submit="true"
    refreshMode="partial"
    refreshId="pnlMainTTSHF"
    disableValidators="true"
    id="eventHandler2"
    rendered="#{javascript:context.getUserAgent().isIE()}" />
Prashant Arkal
  • 308
  • 2
  • 13
  • thank you for your answer. Both of us are using IE 11 and I am thinking this point: the code is written before IE 11, it is written in IE 8. I am not sure it is the reason cause the strange result since the the IE version is different. – beginner Feb 15 '16 at 09:17