adf平稳性检测_ADF声明性组件示例
adf平穩(wěn)性檢測(cè)
在我以前的文章中,我答應(yīng)展示如何為智能值列表創(chuàng)建ADF聲明性組件。 因此,我將創(chuàng)建一個(gè)包含三個(gè)元素的組件:標(biāo)簽,輸入文本和值的組合框列表。 那很容易。 我在工作空間中創(chuàng)建了一個(gè)單獨(dú)的ADF ViewController項(xiàng)目:在此項(xiàng)目中,打開“創(chuàng)建JSF聲明性組件”向?qū)?#xff1a;
新的聲明性組件smartLovDef應(yīng)該至少具有三個(gè)屬性:標(biāo)簽的某些字符串,輸入文本的屬性綁定和組合框值列表的LOV綁定:
該向?qū)?chuàng)建元數(shù)據(jù)文件declarativecomp-metadata.xml和smartLovDef.jspx文件,我們可以在其中放置組件的內(nèi)容:
smartLovDef.jspx的源代碼如下所示:
<?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"xmlns:f="http://java.sun.com/jsf/core"xmlns:h="http://java.sun.com/jsf/html"xmlns:af="http://xmlns.oracle.com/adf/faces/rich"><jsp:directive.page contentType="text/html;charset=UTF-8"/><af:componentDef var="attrs" componentVar="component"><af:panelLabelAndMessage label="#{attrs.label}" id="plam1"><af:panelGroupLayout id="pgl1" layout="horizontal"><af:inputText value="#{attrs.attrBinding.inputValue}"required="#{attrs.attrBinding.hints.mandatory}"columns="#{attrs.attrBinding.hints.displayWidth}"id="deptid" partialTriggers="departmentNameId"autoSubmit="true" simple="true"/><af:inputComboboxListOfValues id="departmentNameId"popupTitle="Search and Select: #{attrs.lovBinding.hints.label}"value="#{attrs.lovBinding.inputValue}"model="#{attrs.lovBinding.listOfValuesModel}"columns="#{attrs.lovBinding.hints.displayWidth}"shortDesc="#{attrs.lovBinding.hints.tooltip}"partialTriggers="deptid"simple="true"></af:inputComboboxListOfValues></af:panelGroupLayout></af:panelLabelAndMessage><af:xmlContent><component xmlns="http://xmlns.oracle.com/adf/faces/rich/component"><display-name>smartLovDef</display-name><attribute><attribute-name>label</attribute-name><attribute-class>java.lang.String</attribute-class><required>true</required></attribute><attribute><attribute-name>attrBinding</attribute-name><attribute-class>java.lang.Object</attribute-class><required>true</required></attribute><attribute><attribute-name>lovBinding</attribute-name><attribute-class>java.lang.Object</attribute-class><required>true</required></attribute><component-extension><component-tag-namespace>cscomponent</component-tag-namespace><component-taglib-uri>/componentLib</component-taglib-uri></component-extension></component></af:xmlContent></af:componentDef> </jsp:root>下一步是將組件部署到ADF庫(kù)中。 我們必須為CSComponents項(xiàng)目添加新的部署配置文件:
然后將項(xiàng)目部署到庫(kù)中:
下一步是在資源面板中定義到CSComponents項(xiàng)目的部署路徑的文件系統(tǒng)連接:
之后,我們必須選擇要使用新組件的項(xiàng)目(在我的情況下為ViewConroller),然后向其中添加CSComponents.jar庫(kù):
現(xiàn)在,我們可以在頁(yè)面中使用smartLovDef組件并將其從組件面板中拖動(dòng):
在我們的jspx頁(yè)面中,源代碼將如下所示:
<cscompLib:smartLovDef label="#{bindings.DepartmentId.label}"attrBinding="#{bindings.DepartmentId}" lovBinding="#{bindings.DepartmentName}"id="sld1"/>參考: JCG合作伙伴提供的 ADF聲明性組件示例 ? ADF實(shí)踐博客上的Eugene Fedorenko。
翻譯自: https://www.javacodegeeks.com/2012/03/adf-declarative-component-example.html
adf平穩(wěn)性檢測(cè)
總結(jié)
以上是生活随笔為你收集整理的adf平稳性检测_ADF声明性组件示例的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 电脑微波炉使用方法(微波炉怎么使用教程)
- 下一篇: 庐山旅游多少钱