在 Web 应用程序中,有一个表单供用户注册一些值,其中之一是prefixo。当prefixo选择值, selectCheckboxMenu是(AJAX)填充Executivos值。这工作正常,如果用户单击“保存”按钮,它会正确地保存在数据库中。<p:outputLabel value="#{adeBundle.CreateDemandasLabel_prefixo}" for="prefixo" /><h:panelGroup> <p:selectOneMenu id="prefixo" value="#{demandasController.selected.prefixo}" converter="prefixosConverter" filter="true" filterMatchMode="contains" required="true" requiredMessage="#{adeBundle.CreateDemandasRequiredMessage_prefixo}" > <f:selectItem itemLabel="#{adeBundle.SelectOneMessage}" itemValue="#{null}" /> <f:selectItems value="#{prefixosController.items}" var="prefixoItem" itemValue="#{prefixoItem}" itemLabel="#{prefixoItem.prefixo} - #{prefixoItem.nomePrefixo}" /> <p:ajax event="valueChange" update="uorPosCollection" listener="#{demandasController.changePrefixo}"/> </p:selectOneMenu> <p:tooltip for="prefixo" value="#{demandasController.getComponentMessages('prefixo', adeBundle.CreateDemandasHelpText_prefixo)}"/></h:panelGroup><p:outputLabel value="#{adeBundle.CreateDemandasLabel_uorPosCollection}" for="uorPosCollection" /><p:selectCheckboxMenu id="uorPosCollection" value="#{demandasController.selected.uorPosCollection}" label="Executivo(s)" multiple="true" converter="uorPosConverter" filter="true" filterMatchMode="contains" panelStyle="width:420px" dynamic="true" title="Selecione um ou mais..." > <f:selectItems value="#{demandasController.availableExecutivos}" var="uorPosCollectionItem" itemValue="#{uorPosCollectionItem}" itemLabel="#{uorPosCollectionItem.matricula} - #{uorPosCollectionItem.nome} (#{uorPosCollectionItem.prefixo.prefixo})" >问题是:每用户选择 Prefixo 时,inputSwitch都会重复:有谁知道为什么会这样,我该如何解决?
添加回答
举报
0/150
提交
取消