Wednesday, January 19, 2011

ADF declarative component

A Sample ADF Declarative component that supports attributes, facets,Even Listener is here

         <?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:xmlContent>
<component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
<display-name>MyComp</display-name>
<facet>
<facet-name>additionalInfo1</facet-name>
</facet>
<facet>
<facet-name>additionalInfo2</facet-name>
</facet>
<attribute>
<attribute-name>
MyValue
</attribute-name>
<attribute-class>
java.lang.String
</attribute-class>
<required>
true
</required>
</attribute>
<component-extension>
<component-tag-namespace>oracle.myComponent.Ui.component</component-tag-namespace>
<component-taglib-uri>http://xmlns.oracle.com/myComponent/MyComp</component-taglib-uri>
<method-attribute>
<attribute-name>
actionListener
</attribute-name>
<method-signature>
void method(javax.faces.event.ActionEvent)
</method-signature>
</method-attribute>
</component-extension>
</component>
</af:xmlContent>

1 comment:

Patrick Co Eban said...

Very much useful article. Kindly keep blogging

Java Training in Chennai

Java Online Training India