beginner
beginner

Reputation: 190

Radio Button Group seems not sensitive by a mouse click

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:

Upvotes: 0

Views: 75

Answers (2)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15739

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.

Upvotes: 2

Prashant Arkal
Prashant Arkal

Reputation: 308

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()}" />

Upvotes: 0

Related Questions