tabview中的选项卡在使用primefaces进行wildfly迁移后未更新

时间:2018-06-08 00:01:56

标签: ajax jsf primefaces wildfly

我正在使用primefaces 3.5 JBoss 7.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 个答案:

答案 0 :(得分:1)

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