可以在RichFaces中禁用AJAX吗?

可以在RichFaces中禁用AJAX吗?,ajax,richfaces,seam,Ajax,Richfaces,Seam,在Seam/RichFaces页面中是否可以禁用AJAX,以便通过常规服务器客户端请求发送请求,在该请求中刷新整个页面而不是单个元素?我正在使用一个a4j:outputPanel和一个a4j:commandButton,在某些情况下需要通过切换按钮使它们不使用AJAX 下面是该页面的代码片段。谢谢 <a4j:outputPanel id="output" rendered="#{not empty overtime.overtimeItems}" ajaxRendered="tr

在Seam/RichFaces页面中是否可以禁用AJAX,以便通过常规服务器客户端请求发送请求,在该请求中刷新整个页面而不是单个元素?我正在使用一个
a4j:outputPanel
和一个
a4j:commandButton
,在某些情况下需要通过切换按钮使它们不使用AJAX

下面是该页面的代码片段。谢谢

<a4j:outputPanel id="output" rendered="#{not empty overtime.overtimeItems}" 
    ajaxRendered="true">
  <c:forEach items="#{overtime.overtimeItems}" var="oc">
    <h:outputLabel value="#{oc.dateLabel}"
      style="font-weight:#{(oc.id == 1) ? 'bold' : 'normal'}" 
      for="#{oc.overtimeDateId}" />
    <rich:calendar value="#{oc.overtimeDate}" 
      requiredMessage="Date 1 is required."
      id="#{oc.overtimeDateId}" datePattern="MM-dd-yyyy" 
      required="#{oc.id == 1 ? true : false}" firstWeekDay="0">
      <a4j:support event="onchanged" 
         reRender="#{oc.overtimeHoursId}, #{oc.overtimeHoursOutputId}" 
         ajaxSingle="true"/>
    </rich:calendar>
    ......

  </c:foreach>
</a4j:outputPanel>

<a4j:commandButton action="#{utilities.sendEmail('/pages/overtime/mail.xhtml')}" 
    type="submit" value="Submit" 
    reRender="status, valid1, valid2" eventsQueue="foo" status="status" 
    onclick="this.disabled=false" id="btnSubmit"
    oncomplete="#{facesContext.maximumSeverity == null ? 'Richfaces.hideModalPanel(\'mpErrors\');' : 'Richfaces.showModalPanel(\'mpErrors\'); this.disabled=false'}"/>

......

唯一的方法是将这些ajax组件包装在PanelGroup中,并使用rendered属性。您基本上需要提供条件呈现,并提供ajax组件的非ajax替代方案

所以你会有这样的想法:

<h:panelGroup rendered="#{someBean.ajaxEnabled}">
    <a4j:commandButton ..... />
</h:panelGroup>

<h:panelGroup rendered="#{!someBean.ajaxEnabled}">
    <h:commandButton ..... />
</h:panelGroup>

唯一的方法是将这些ajax组件包装在PanelGroup中,并使用rendered属性。您基本上需要提供条件呈现,并提供ajax组件的非ajax替代方案

所以你会有这样的想法:

<h:panelGroup rendered="#{someBean.ajaxEnabled}">
    <a4j:commandButton ..... />
</h:panelGroup>

<h:panelGroup rendered="#{!someBean.ajaxEnabled}">
    <h:commandButton ..... />
</h:panelGroup>


我创建了一个没有a4j组件的页面版本。无法找到其他方法。我创建了一个没有a4j组件的页面版本。找不到别的办法。