开发者

Does <s:button> support reRender with <a4j:support>

开发者 https://www.devze.com 2023-01-30 05:47 出处:网络
SSIA Can I use <s:button> with <a:support>? I can\'t seem to make it work开发者_如何学运维.

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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消