<p:tab title="Temperature Analysis" rendered="#{!userBean.user.temperatureNotAllow}"> <p:outputPanel id="temperatureAnalysisPanel" > <h:form style="margin-left: 800px"> <h:outputText value="Select Y-Axis Range"></h:outputText> <h:panelGrid columns="5" cellspacing="9"> <h:panelGrid columns="1" style="margin-left: 0px"> <h:outputText id="displayRange" value="Between #{generatorDataLogBean.minRangeForTemp} and #{generatorDataLogBean.maxRangeForTemp}" /> <p:slider for="txt6,txt7" display="displayRange" style="width: 130px; margin-top: 0px" range="true" displayTemplate="Between {min} and {max}" step="10" minValue="-50" maxValue="150" > <p:ajax event="slideEnd" process="txt6,txt7" /> </p:slider> </h:panelGrid> <h:inputHidden id="txt6" value="#{generatorDataLogBean.minRangeForTemp}" /> <h:inputHidden id="txt7" value="#{generatorDataLogBean.maxRangeForTemp}" /> <p:commandButton value="Change" style="width: 70px; height: 30px; margin-left: 15px" actionListener="#{generatorDataLogReportBean.changeGraph(generatorDataLogBean.maxRangeForTemp,generatorDataLogBean.minRangeForTemp)}" ajax="false" update=":movementTabview:temperatureAnalysisPanel" /> </h:panelGrid> </h:form> <p:chart type="line" model="#{generatorDataLogReportBean.animatedModel1}" style="width:98%;"/> <br/> </p:outputPanel> </p:tab>
在我的jsf页面中我想只更新单个选项卡但是当我按下commandButton时它更新整个页面我该如何处理呢? 我的tabView位于以下位置:
<p:layoutUnit position="center"> <p:tabView id="movementTabview" dynamic="true">
答案 0 :(得分:0)
我可以看到您没有使用<p:tab>
的任何ID尝试分配一些ID,然后像update=":movementTabview:tabId:temperatureAnalysisPanel"
一样更新