我有這樣一個代碼:更新的<h:panelGroup中>從另一個的<h:panelGroup中>不工作
<h:panelGroup id="customListCal">
..
<p:commandButton value="Create List" update="pickList" actionListener="#{customCalender.openList}"
style="background:#25A6E1;color:#fff;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;"/>
</h:panelGroup>
<h:panelGroup id="pickList">
..
<p:commandButton value="Cancel" update="pickList" actionListener="#{customCalender.closeList}" style="background:#25A6E1;color:red;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;" />
<p:commandButton value="Save" update="custDataTablePanel pickList" actionListener="#{customCalender.saveTargetList}" style="background:#25A6E1;color:red;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;"/>
</h:panelGroup>
<h:panelGroup id="custDataTablePanel">
<p:panel rendered="#{customCalender.dataTableVisible}">
<p:dataTable id="custDataTable" value="#{customCalender.dataTableList}" var="listName">
<p:column id="editField" headerText="Edit">
<p:commandLink title="Edit" update="pickList" actionListener="#{customCalender.openList}" rendered="#{not empty customCalender.dataTableList}">
<h:graphicImage url="resources/images/edit.JPG"/>
</p:commandLink>
</p:column>
</p:dataTable>
</p:panel>
</h:panelGroup>
當我嘗試更新從<h:panelGroup id="custDataTablePanel>
<h:panelGroup id="pickList">
其不工作。會發生什麼,只是這個名爲Edit
的色彩不在上述dataTable中呈現。
如何從<h:panelGroup id="custDataTable">
更新<h:panelGroup id="pickList">
?
但在更新從<h:panelGroup id="customListCal"
>
<h:panelGroup id="customListCal">
..
<p:commandButton value="Create List" update="pickList" actionListener="#{customCalender.openList}"
style="background:#25A6E1;color:#fff;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;"/>
</h:panelGroup>
<h:panelGroup id="pickList">
沒有錯誤,這是怎麼造成的,我該如何解決呢?
確保了'號碼:commandButton'是一個字中,h內:form' – Daniel
@Daniel:在''標籤內的.. :( –
NDeveloper
是' picklist'和'custDataTable'在同一個表單中? – fareed