代码之家  ›  专栏  ›  技术社区  ›  Hassam Abdelillah

使用PrimeFaces进行Wildfly迁移后,选项卡视图中的选项卡未更新

  •  0
  • Hassam Abdelillah  · 技术社区  · 6 年前

    我用的是PrimeFaces3.5JBoss7.1.1。 我正在将我的应用程序迁移到Wildfly 9.0.2。

    以下代码用于jboss,但不再用于wildfly。

                    <p:tabView id="tabView" dynamic="true" cache="false" style="width:1120px">
                    <f:event listener="#{ucoController.loadUcoConfiguration}" type="preRenderView" />
                    <p:tab id="Activation" title="SOMF Activation">  
                        <h:panelGrid id="ActivationPG" columns="1" cellpadding="10" border="0">  
                            <h:form id="user" class="sgdsForm clear">
                                <script type="text/javascript">  
                                    function startAjaxStatus(){
                                        document.getElementById("tabView:user:image").style.display='block';
                                        document.getElementById("tabView:user:shutDown").style.display='block';
                                    }
                                </script>
                                <ol>    
                                    <li>
                                        <label for="activate" class="label">SOMF Activation</label>
                                        <p:selectBooleanCheckbox value="#{configurationBean.SOMFActivated}" />
                                    </li>
    
                                    <li>    
                                        <br/>   
                                        <h:outputText value="#{configurationBean.SOMFActivationMessage}" style="float:left; text-align:left;margin-leftt:7px;color:#0F5795;font-weight:bold;font-size:0.9em;line-height:23px;"/>
                                    </li>
                                    <li>
                                        <br/>
                                        <p:commandButton ajax="false" global="#{configurationBean.SOMFActivated}" onclick="startAjaxStatus()" value="Update" actionListener="#{ucoController.updateUco}"  id="updateActivation" icon="ui-icon-disk" update=":tabView:user,:tabView:ScreeningForm> 
                                        </p:commandButton>
                                    </li>
                                </ol>    
                                <h:panelGrid columns="2" border="0" > 
                                    <h:outputText value="Update in progress..." id="shutDown" style="color:#0F5795;font-weight:bold;font-size:0.9em;line-height:23px;display:none;"/>
                                    <p:graphicImage value="resources/img/load.gif" id="image" style="display:none;"/>
                                </h:panelGrid>
                            </h:form>
                        </h:panelGrid>  
                    </p:tab>  
                    <p:tab id="Screening" title="Screening" rendered="#{ucoController.disableConfiguration}">  
                        <h:panelGrid id="ScreeningPG" columns="1"  cellpadding="10" border="0"> 
                            <h:form id="ScreeningForm" class="sgdsForm clear" >
                                <ol>    
                                    <li>       
                                        <label for="analysis" class="label required">Think Time (ms)</label>
                                        <h:inputText id="thinkTime" value="#{configurationBean.screeningThinktime}" maxlength="5" readonly="#{configurationBean.SOMFActivated}">
                                            <f:validator validatorId="screeningTimeValidator" />
                                            <f:attribute name="autoScreening" value="#{configurationBean.automaticScreening}" /> 
                                        </h:inputText>
                                    </li>
                                    <li>
                                        <label for="activate" class="label">Automatic Screening</label>
                                        <p:selectBooleanCheckbox value="#{configurationBean.automaticScreening}" readonly="#{configurationBean.SOMFActivated}" disabled="#{configurationBean.SOMFActivated}"/>
                                    </li>
    
                                    <li>
                                        <br/>
                                        <p:commandButton disabled="#{configurationBean.SOMFActivated}" oncomplete="handleComplete(xhr, status, args)" value="Update"  actionListener="#{ucoController.updateUco}" id="updateScreening" icon="ui-icon-disk" process="@this,ScreeningForm" update=":tabView:ScreeningPG"/>
                                    </li>
    
                                </ol>
                            </h:form>
                        </h:panelGrid>
                    </p:tab>  
            </p:tabView>
    

    还有我的后盾豆:

    @ManagedBean(name = "ucoController", eager = true)
    @SessionScoped
    public class UcoController implements Serializable {
    public final ConfigurationBean loadConfiguration() {
        // load configuration
    }
    
    public final void updateUco(ActionEvent event) {
        // update configuration
    }
    }
    

    我想知道为什么 UPDATEUCO 提交表单时未激发方法。因此,我的表格似乎没有提交!模型不变。

    Mojarra版本或PrimeFaces有什么问题吗?

    我经历了这些 exhaustive answer 为了什么出现同样的问题。但所描述的观点都不适合我的情况!

    1 回复  |  直到 6 年前
        1
  •  1
  •   Apostolos Nirjal Mahat    6 年前

    请将PrimeFaces升级到4.0版,以支持Wildfly 9.0.2中支持的JSF 2.2版。