如何使用渲染

时间:2016-06-16 22:25:19

标签: ajax richfaces

我是richfaces,ajax和分析代码的新手,包含: 渲染="#{渲染}"

任何人都可以解释一般的渲染效果,特别是这段代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
 <ui:composition>
  <div style="display: table;">
   <div style="display: table-row">
    <div style="display: table-cell; padding: 5px;">
     <ui:include src="/view/main/common/scans_selector.xhtml">
      <ui:Param name="prefix" value="individual_scan" />
      <ui:Param name="year" value="#{individualScanDetailsController.scans.year}" />
      <ui:Param name="month" value="#{individualScanDetailsController.scans.month}" />
      <ui:Param name="type" value="#{individualScanDetailsController.scans.type}" />
                        <ui:Param name="show_type" value="true" />
     </ui:include>
    </div>
    <div style="display: table-cell">
     <h:commandButton id="individual_scan_selector_submit"
      value="#{msg['LoadScans']}">
      <f:ajax listener="#{individualScanDetailsController.processIndividualScanScansSelectorEvent()}"
       execute="individual_scan_scans_year individual_scan_scans_month individual_scan_scans_type"
       render="#{render}" />
     </h:commandButton>
    </div>
   </div>
  </div>
 </ui:composition>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

render属性提供对Ajax交互后需要更新的页面上的一个或多个组件的引用。

你需要在你的项目中找到&#34; render&#34;的价值。 (JSF表达语言)

您可能想要自己参考这些或谷歌 - https://stackoverflow.com/a/12404888/1193815 http://www.tutorialspoint.com/jsf/jsf_ajax.htm https://docs.jboss.org/richfaces/latest_4_0_X/Component_Reference/en-US/html/chap-Component_Reference-Common_Ajax_attributes.html#sect-Component_Reference-Common_Ajax_attributes-Rendering