cancel
Showing results for 
Search instead for 
Did you mean: 

RadioButton text not rendered in RBGroup

peter_21
Explorer
0 Kudos

Hi All,

I have created a demo SAPUI5 application in Web IDE. It operates well in the App. Preview. When I deploy it to the Gateway and start from the FLP the Radiobutton's texts disappear. I use sap.m.RadioButtonGroup with buttons aggregation. If I use the RadioButtons with groupName property (and without RadioButtonGroup) the texts are displayed well. I wonder whether it is the speciality of the fiori sandbox rendering or something else.

Thanks for your help in advance.

BR,

Peter

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182372
Active Contributor
0 Kudos

post the code/xml how you do bind of buttons aggregatnio and text property

peter_21
Explorer
0 Kudos

Hi Maksim,

The code from xml view:

<RadioButtonGroup id="ans1" width="100%">

      <buttons>

           <RadioButton id="ans11" text="i18n>ans11"/>

           <RadioButton id="ans12" text="{i18n>ans12}"/>

           <RadioButton id="ans13" text="{i18n>ans13}"/>

           <RadioButton id="ans14" text="{i18n>ans14}"/>

      </buttons>

</RadioButtonGroup>

I have realized that the problem is with the resource text. The text of the first button is displayed well, the others are not. I have no problem with any other text from resource, only in this kind of RBG.

BR,

Peter

former_member182372
Active Contributor
0 Kudos

text in first radio button is not properly bound - text="i18n>ans11" instead of text="{i18n>ans11}"

and you are saying first one is displayed correctly?? well, just double check your property file (and make sure it is not cashed in browser 😉 by using incognito or someting)

Former Member
0 Kudos

Check if you've enabled 'complex' bindingSyntax. Also make sure you have the properties ans12...ans14 defined in your resource bundle file.

peter_21
Explorer
0 Kudos

Hi Maksim,

I deleted the curly braces on purpose to show that the text can be rendered in this way.

If I code the view in this way:

<RadioButton id="ans11" groupName="ans1" text="{i18n>ans11}"/>

<RadioButton id="ans12" groupName="ans1" text="{i18n>ans12}"/>

<RadioButton id="ans13" groupName="ans1" text="{i18n>ans13}"/>

<RadioButton id="ans14" groupName="ans1" text="{i18n>ans14}"/>

the texts from resource are also coming and everything is fine.

BR,

Peter

former_member182372
Active Contributor
0 Kudos

i am confused, so the issue is resolved ?

peter_21
Explorer
0 Kudos

Well... I try to clarify this.

I would like to use the RadioButtonGroup with texts from the resource file. It does not operate for me.

I can use the resource text for buttons without RaidoButtonGroup and I can use the RadioButtonGroup with constant text.

peter_21
Explorer
0 Kudos

I have this script line:

data-sap-ui-xx-bindingSyntax="complex"

former_member182372
Active Contributor
0 Kudos

in SAPUI5 Diagnostics (shift+ctrl+alt+s) in Control tree, what the radio button show for text property (check BindingInfo section)?

peter_21
Explorer
0 Kudos

ans12 (invalid)

Unresolvable

true

ResourcePropertyBinding

i18n

ResourceModel

OneTime

It is the same when the text is appearing. The weird thing is that I can see the resource text at the Properties window.

former_member182372
Active Contributor
0 Kudos

hmm, magic...

just tried

<RadioButtonGroup id="ans1" width="100%">

   <buttons>

   <RadioButton id="ans12" text="{i18n>MY_APPROVALS}"/>

   <RadioButton id="ans13" text="{i18n>RECORD}"/>

   <RadioButton id="ans14" text="{i18n>DATE}"/>

   </buttons>

</RadioButtonGroup>


and it works fine for me





right click on radio button and try Inspect Element, what's in DOM?

peter_21
Explorer
0 Kudos

Did you try it from FLP?

It also works for me in Web IDE.

The DOM is:

<label id="__xmlview1--ans1-1-label" data-sap-ui="__xmlview1--ans1-1-label" style="text-align:left" class="sapMLabel sapMLabelMaxWidth sapMLabelNoText sapMRbBLabel sapUiSelectable"></label>

former_member182372
Active Contributor
0 Kudos

let me summarize:

in flp it doesn't work only RadioButton in RadioButtonGroup but all other controls display text from property file?

like

<Label text="{i18n>ans11}"/> or something

peter_21
Explorer
0 Kudos

Yes. All other controls display text from property file (and it also true for the RadioButton control without RBG). Only the RadioButton inside a RadioButtonGroup is not able to do it in the Fiori Launchpad.

WRoeckelein
Active Participant
0 Kudos

I think with newer SAPUI5/OPENUI5 versions this is data-sap-ui-bindingSyntax="complex"

saivellanki
Active Contributor
0 Kudos

Hi Peter,

Just a mild guess, is same UI5 library version used on both instances?

Since, sap.m.RadioButtonGroup is introduced from 1.25.0 version.

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.m.RadioButtonGroup

Regards,

Sai Vellanki.

peter_21
Explorer
0 Kudos

Hi Sai,

Thanks for your answer.

The Web IDE uses 1.28.11, and the Gateway uses 1.28.1 SAPUI5 version.

Radiobuttons are displayed, only the texts are missing.

BR,

Peter

agentry_src
Active Contributor
0 Kudos

Discussion successfully moved from SAP Fiori to SAPUI5 Developer Center as the more appropriate community for this topic.

Regards, Mike (Moderator)

SAP Technology RIG