我的网页中有以下一段代码。在action
中的方法执行之后,将呈现指示过程是否成功的标签。单击按钮后隐藏标签richfaces
我想要的是该标签隐藏在按钮被点击后。我怎样才能做到这一点?
我想使用actionListener
但我不知道,如果它的工作原理是:
- 调用的ActionListener的方法
- 重新渲染MyView的(清除我的标签)
- 呼叫行动的方法
- 重新渲染myView(显示标签过程是否成功)
或者,在onclick="getElementById().hide"
?
任何想法?
干杯,
...
...
<a4j:commandButton id="btnActualizaCubo"
value="Actualizar Cubo"
render="messageDependenciaCubo actualizacionCuboLabels @this"
onclick="return confirm('Las fechas seleccionadas son correctas?');"
onbegin="this.disabled=true;
document.getElementById('formActualizacionCubo:imgProcesandoCubo').style.display='block'"
oncomplete="this.disabled=false;
document.getElementById('formActualizacionCubo:imgProcesandoCubo').style.display='none'"
action="#{administrationBean.doActualizaCubo}"/>
...
<a4j:outputPanel id="actualizacionCuboLabels" style="font-size: 14px; color: #D17100">
<h:outputText rendered="#{administrationBean.actualizacionCuboCorrectaLabelRendered}"
value="Actualización correcta !"/>
<h:outputText rendered="#{administrationBean.actualizacionCuboFalloLabelRendered}"
value="Fallo la actualización !"/>
</a4j:outputPanel>
...
谢谢Luiggi我会尝试你对标签的建议。有一个线程,我问这里的图像http://stackoverflow.com/questions/10900860/disable-button-and-show-loading-image-while-processing-jsf – BRabbit27
@ BRabbit27你使用JSF 1.2或JSF 2 ? –
JSF 2.1.6(Mojarra) – BRabbit27