Does <s:button> support reRender with <a4j:support>
SSIA
Can I use <s:button>
with <a:support>
?
I can't seem to make it work开发者_如何学运维.
<h:panelGroup id="pwgen">
<s:decorate template="/layout/definition.xhtml" rendered="#{s:hasRole('sysadmin')}">
<ui:define name="label">#{messages['manualOnetimePassword']}</ui:define>
<s:button value="#{messages['generate']}" propagation="join" action="#{userAdmin.generateManualPasswordForUser()}">
<a:support event="onsubmit" reRender="pwgen" ajaxSingle="true" />
</s:button>
<h:inputText size="30" required="false" value="#{userAdmin.existingUser.manualPassword.password}"/>
</s:decorate>
</h:panelGroup>
I have tried <a:outputPanel>
and <a:region>
and also event="oncomplete"
but it always reloads the entire page.
I found the answer.
It doesn't seem that <s:button>
supports <a:support>
.
All I did basically is changed the button to be <a:commandButton reRender="foo">
and removing the <a:support>
Because s:button and s:link dont post your form. So, there are no 'onsubmit' event. Yes, replace it with a4j:commandButton :)
精彩评论