Skip to Content
avatar image
Former Member

Radiobutton: Change the 'checked' radiobutton -> Both are 'checked'!

Hi @all,

can somebody help me?

My Problem is the following:

On my BSP I have a group of two radiobutton (Yes and No).

In the layout the 'checked' button is depending of one field.

This field is filled in the Eventhandler 'OnInputProcessing'.

Two of my test-codings:

Layout-Coding

1. test:

<%

if zomopportline-zmynrisk eq ‘YES’.

%>

<htmlb:radioButtonGroup id = "zmynrisk"

columnCount = "2"

width = "90" >

<htmlb:radioButton id = "riskno"

text = "Risk No">

</htmlb:radioButton>

<htmlb:radioButton id = "riskyes"

text = "Risk Yes"

checked = "TRUE" >

</htmlb:radioButton>

</htmlb:radioButtonGroup>

<%

else.

%>

<htmlb:radioButtonGroup id = "zmynrisk"

columnCount = "2"

width = "90" >

<htmlb:radioButton id = "riskno"

text = "Risk No"

checked = "TRUE" >

</htmlb:radioButton>

<htmlb:radioButton id = "riskyes"

text = "Risk Yes" >

</htmlb:radioButton>

</htmlb:radioButtonGroup>

<%

endif.

%>

2. test:

<%

if zomopportline-zmynrisk eq ‘YES’.

%>

<htmlb:radioButtonGroup id = "zmynrisk"

columnCount = "2"

width = "90" >

<htmlb:radioButton id = "riskno"

text = "Risk No"

checked = "" >

</htmlb:radioButton>

<htmlb:radioButton id = "riskyes"

text = "Risk Yes"

checked = “TRUE” >

</htmlb:radioButton>

</htmlb:radioButtonGroup>

<%

else.

%>

<htmlb:radioButtonGroup id = "zmynrisk"

columnCount = "2"

width = "90" >

<htmlb:radioButton id = "riskno"

text = "Risk No"

checked = "TRUE" >

</htmlb:radioButton>

<htmlb:radioButton id = "riskyes"

text = "Risk Yes"

checked = “ ”>

</htmlb:radioButton>

</htmlb:radioButtonGroup>

<%

endif.

%>

By the first processing of the BSP, the marked radiobutton is 'NO'. That is correct.

After the processing of the Eventhandler 'OnInputProcessing' the same BSP is called again. Now the marked radiobutton is 'NO' and 'YES'.

Correct is just 'YES'.

Does anybody know about this problem.

Thanks for any advice or path for more information.

Kind Regards

Petra

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 12, 2004 at 09:15 AM
    <htmlb:radioButtonGroup id = "zmynrisk"
                   columnCount = "2"
                         width = "90" >
    
        <htmlb:radioButton id = "riskno"
                         text = "Risk No"
                      checked = "TRUE" >
        </htmlb:radioButton>
    
        <htmlb:radioButton id = "riskyes"
                         text = "Risk Yes"
                      checked = “ ”>
        </htmlb:radioButton>
    
    </htmlb:radioButtonGroup>
    

    Just for starters you should be saying checked = "FALSE" > you can't leave it as blank or you get a compile error.

    However I would suggest you check out the BSP Application "SBSPEXT_HTMLB" under SE80 and look at the example page "RadioButtonGroup.bsp" it's a great example and I think after a little bit of looking you'll see the way to solve your problem.

    Add comment
    10|10000 characters needed characters exceeded