我有一个错误,我有一个页面,3 <p:selectOneMenu>
和1 <p:selectManyMenu>
他们按顺序工作,我选择第一个,填充第二个,secon填充第三个,第三个填充<p:selectManyMenu>
。当我开始选择<p:selectManyMenu>
中的值(按住 ctrl 按钮)时,第三个<p:selectOneMenu>
取消选择。执行填充<p:selectManyMenu>
。
有人见过这个吗?
我对java有很多经验,但刚开始使用JSF和PrimeFaces。
提前谢谢大家。
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:form id="formPatch">
<table border="">
<tr>
<td height="180p" valign="top">
<p:panel header="Configurar diretórios para extrair Objetos do Patch" style="width: 500px; height: 170px">
<h:panelGrid columns="2">
<p:outputLabel value="Arquivo: " styleClass="format_label"
for="nomePatch" />
<p:inputText id="nomePatch" value="#{patchMB.patchBean.fileName}" styleClass="format_input" required="true"
requiredMessage="Favor preencher o campo nome do arquivo ex: confg.txt">
</p:inputText>
<p:outputLabel value="Repositórios:" styleClass="format_label" for="dirRep" />
<p:selectOneMenu id="dirRep" value="#{patchMB.patchBean.directoryRepositorio}"
style="width: 350px">
<p:message for="dirRep" />
<f:selectItem itemLabel="Selecione" itemValue="Selecione" />
<f:selectItems value="#{patchMB.directoryRepCli}" />
<f:ajax event="change" listener="#{patchMB.carregaDirProdCli}" render="dirProdCli" />
</p:selectOneMenu>
<p:outputLabel value="Prod/Clientes: " for="dirProdCli" />
<p:selectOneMenu id="dirProdCli" value="#{patchMB.patchBean.directoryProdCli}"
style="width: 350px">
<p:message for="dirGap" />
<f:selectItem itemLabel="Selecione" itemValue="Selecione" />
<f:selectItems value="#{patchMB.dirProdCli}" />
<f:ajax event="change" listener="#{patchMB.carregaDirObjetos}" render="dirObj" />
</p:selectOneMenu>
<p:outputLabel value="Dir objetos: " for="dirObj" />
<p:selectOneMenu id="dirObj" value="#{patchMB.patchBean.directoryObjetos}"
style="width: 350px">
<p:message for="dirObj" />
<f:selectItem itemLabel="Selecione" itemValue="Selecione" />
<f:selectItems value="#{patchMB.dirObjetos}" />
<f:ajax event="change" listener="#{patchMB.carregarFiles}" render="pickListArq" />
<f:ajax event="change" listener="#{patchMB.carregarSelectMany}" render="objSelectMany" />
</p:selectOneMenu>
</h:panelGrid>
</p:panel>
</td>
<td>
<p:panel header="Escolha os arquivos para criação do patch" style="width: 500px">
<p:tab id="pickListTab" title="Transformadores">
<h:panelGrid columns="1">
<p:pickList id="pickListArq" value="#{patchMB.objetos}" var="pickListObj"
itemLabel="#{pickListObj}" itemValue="#{pickListObj}">
<f:facet name="sourceCaption">Selecione os objetos</f:facet>
<f:facet name="targetCaption">Objetos do Patch</f:facet>
</p:pickList>
</h:panelGrid>
</p:tab>
</p:panel>
</td>
</tr>
</table>
</h:form>
</ui:composition>