简体   繁体   English

是否 <s:button> 支持reRender <a4j:support>

[英]Does <s:button> support reRender with <a4j:support>

SSIA SSIA

Can I use <s:button> with <a:support> ? 我可以将<s:button><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. 我尝试了<a:outputPanel><a:region>以及event="oncomplete"但它始终会重新加载整个页面。

I found the answer. 我找到了答案。

It doesn't seem that <s:button> supports <a:support> . 似乎<s:button>支持<a:support>

All I did basically is changed the button to be <a:commandButton reRender="foo"> and removing the <a:support> 我所做的基本上只是将按钮更改为<a:commandButton reRender="foo">并删除了<a:support>

Because s:button and s:link dont post your form. 因为s:button和s:link不会发布您的表单。 So, there are no 'onsubmit' event. 因此,没有“ onsubmit”事件。 Yes, replace it with a4j:commandButton :) 是的,将其替换为a4j:commandButton :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM