RichFaces a4j:commandButton。第一次单击不起作用,它在secon单击中起作用

时间:2013-06-17 11:35:23

标签: jsf button richfaces render ajax4jsf

我有一个问题,我无法解决。当我第一次点击a4j:commandButton时,没有动作。第二次及以后的时间它完美地运作。我已经读过这个问题但是我还没有清楚解决这个问题。

我是新手,我找到了这个解决方案:( h:commandButton/h:commandLink does not work on first click, works only on second click)但我不知道在哪里可以介绍脚本代码。 我发现了这个:但我认为是一个旧的jsf版本: (https://community.jboss.org/thread/165031) 我试图用https://community.jboss.org/wiki/ProgrammaticControlOfPartialProcessingInRichFaces4来表达它。但是,我没有成功

如果有人能够逐步向我解释@BalusC解决方案,那可能会非常有用

非常感谢:

我的代码是:(同一文件中的所有内容)

<ui:define name="table">    
    <h:form id= "formListCompanies">
        <a4j:outputPanel id="tablePaneRegion">
        <rich:extendedDataTable ....

<rich:column sortable="false" width="100%">
...

<a4j:commandLink id="editCmd" styleClass="no-decor" render="editGrid, editPane"  
execute="@this" oncomplete="#{rich:component('editPane')}.show()">
<a4j:param value="#{it.index}" assignTo="#{myBean.currentIndex}" />
<f:setPropertyActionListener target="#{myBean.selected}" value="#{mypojo}" />
</a4j:commandLink>
....</rich:column>

...

<rich:popupPanel id="editPane" header="#{...}"  domElementAttachment="body"    
moveable="true" modal="true" resizeable="false" autosized="true"
onshow="focus(#{rich:component('name')});">
     ....
     <!-- h:Inputtext ..-->

<h:panelGrid columns="2">                              
<a4j:commandButton value="#{'save'}" action="#{myBean.edit}" 
     render="dataTable" execute="editPaneRegion" />
<a4j:commandButton value="#{...}" 
    onclick="#{rich:component('editPane')}.hide(); return false;" />
</h:panelGrid>  

</h:form>
    </a4j:outputPanel>
</rich:popupPanel>

我已经尝试过取出h:form id = formListCompanies,然后放一个h:panelgrid和一个h:panelgroup

问题是与问题点击问题有关吗?我是以正确的方式吗?

1 个答案:

答案 0 :(得分:0)

重新呈现面板和表单(jsf规范中的表单状态丢失错误)... render =“richPanelMantenimientoTipoVisualAjaxWebPart,frmMantenimientoTipoVisual”