I have to uncheck a selectBooleanCheckbox lower down in the form IF it is checked.
So I added the showOnWebAjx id to the reRender shown below.
<h:selectOneMenu id="estatus" value="#{itemHome.instance.estatus}"
required="true">
<f:selectItems id="estatuses"
value="#{mconsoleContext.ecometryItemStatusCodes}" />
<a:support event="onchange"
reRender="showOnWebAjx, ecycleWeeksAjx, orderSizeFoodPoAjx, upcAjx, kitAjx, preOrderAjx, priorityProcessingAjx"
actionListener="#{itemHome.resetPreOrderAndPriorityProcessingFlag}"
ajaxSingle="true" />
</h:selectOneMenu>
I don't know how to uncheck the box but with the below code I can tell when it is C1 or H1 (2 of the values where we want to uncheck the box, the rest of the time we do nothing)
<s:decorate id="showOnWebFlagDecoration"
template="/layout/edit.xhtml">
<ui:define name="label">#{messages.showOnWebFlag}</ui:define>
<a:outputPanel id="showOnWebAjx">
<c:if test="#{'C1' eq itemHome.instance.estatus || 'H1' eq itemHome.instance.estatus}">UNCHECK showOnWebFlag!!</c:if>
<h:selectBooleanCheckbox id="showOnWebFlag"
value="#{itemHome.instance.showOnWebFlag}"/>
</a:outputPanel>
</s:decorate>
The a:outputPanel and c:if test are my additions.
What is the proper / correct way to uncheck that box?
I am not sure if I will need a backing bean or not but help is very much appreciated.