Clicking text in tr:selectbooleanradio not generating valueChangeEvent

谁都会走 提交于 2019-12-25 16:56:12

问题


In my JSF 2.0(MyFaces 2.1.10, Trinidad 2.1.0 Version)Application, I need to use tr:selectbooleanradio in my page to achieve the functionality that my page requires.

In the below code, the default values of todaySelected and tomorrowSelected are 'false'. The issue is, once page loads, when I select 'today', the valueChangeToday is not getting called.(I believe it should call as default value of todaySelected is false and submitted value is true). When I select tomorrow, valueChangeToday is getting called and valueChangeTomorrow is not getting called. Likewise, things are happening only after the next selection, which makes my entire functionality working reversely.

I believe in both the cases, the submitted value is not going in correctly. But I couldn't understand why?!

FYI -tr:selectOneRadio is working perfectly, but I rely on booleanRadio.

The scope of the page bean is View(though I believe it's not a problem and request scope is performing similiarly). I'd appreciate any suggestions to resolve this issue or core component alternatives for this issue.

<tr:selectBooleanRadio group="groupDays"
selected="#{displayoverrideamountbean.todaySelected}"
id="todayRadio" text="Today" 
valueChangeListener="#{displayoverrideamountbean.valueChangeToday}"                                                 
autoSubmit="true">
</tr:selectBooleanRadio>

<tr:selectBooleanRadio group="groupDays"
selected="#{displayoverrideamountbean.tomorrowSelected}"
id="tomorrowRadio" text="Tomorrow" 
valueChangeListener="#{displayoverrideamountbean.valueChangeTomorrow}"                                                  
autoSubmit="true">
</tr:selectBooleanRadio>

来源:https://stackoverflow.com/questions/33691594/clicking-text-in-trselectbooleanradio-not-generating-valuechangeevent

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!