微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 selectOneMenu 中选择一个值后渲染片段

如何解决在 selectOneMenu 中选择一个值后渲染片段

我正在尝试根据 h 中的选定值呈现片段:selectOneMenu。在这种情况下,如果值等于“1”,则片段将被渲染。但是,当我选择该选项时,没有任何反应。有人可以帮我吗?

<div>
                    <div>
                        <h:outputLabel>
                            <h:selectOneMenu id="form-contato-selector" value="#{contatoBean.contato.direcao}">
                                <f:selectItem itemValue="0" itemLabel="Selecione uma das opcões"/>
                                <f:selectItem itemValue="1" itemLabel="Arquitetura"/>
                                <f:selectItem itemValue="2" itemLabel="Comercial | Locações"/>
                                <f:selectItem itemValue="3" itemLabel="Controladoria"/>
                                <f:selectItem itemValue="4" itemLabel="Desenvolvimento"/>
                                <f:selectItem itemValue="5" itemLabel="Engenharia"/>
                                <f:selectItem itemValue="6" itemLabel="Jurídico"/>
                            </h:selectOneMenu>
                        </h:outputLabel>
                        
                    </div>
                    
                    <ui:fragment rendered="#{contatoBean.contato.direcao eq '1'}">
                        <ui:include src="/views/forms/contato-arquitetura.xhtml"/>
                    </ui:fragment>
</div>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。