ADF 11g Declarative Components
Declarative components rock! now is there a way to use them with a managed bean, for example click a button to load a table of data. After you wire this up with the managed bean, partial rendering and deploy as library it will work in a new project as a new component. However the partial submit and trigger doesn't seem to stick. It does a full page submit. Is there a solution for this???
thanks.
Hi,
I have a DC, which contains a panelCollection with a toolbar and buttons in it. The panelCollection's child is a facetRef. On a consuming page I insert into the facet a table.
How can I get the toolbar's buttons get updated, once the table's contents have changed?
Particularly, disabled properties of the buttons are exposed as attributes of the DC. On the consuming page the attributes are bound to enabled properties of a commit and a rollback binding actions. Initially the buttons are disabled. When I change a cell's value it would be nice, if the buttons would be enabled in response without refreshing the page or invoking an execute on an undelying VO/iterator.
Regards,
Y.
Similar Messages
-
I have developed a Declarative component. Imported it into another project. I am now able to drag this component onto a jspx UIX page. One of the attributes I exposed was a datacontrol for binding to a tree component of the Declarative component. However I am getting an error after invoking the page that uses the declarative component. I suspect it has something to do with scope. The 'attrs' resolved to null. An abbreviated Stack trace is below:
Apr 2, 2009 10:00:54 AM oracle.adfinternal.view.faces.taglib.region.ComponentRefTag _warn
WARNING: Error trying to include:viewId:/components/HRTree.jspx uri:/components/HRTree.jspx
javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'attrs' resolved to null
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:251)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'attrs' resolved to null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:67)
at com.sun.el.parser.AstValue.setValue(AstValue.java:133)
at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:248)
... 83 more
<Apr 2, 2009 10:00:58 AM EDT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@13442f1 - appName: 'iDMKRComponents', name: 'iDMKRComponents-iDMKRTree-context-root', context-path: '/iDMKRComponents-iDMKRTree-context-root', spec-version: '2.5', request: weblogic.servlet.internal.ServletRequestImpl@16b8458[
GET /iDMKRComponents-iDMKRTree-context-root/faces/dctree.jspx?_adf.ctrl-state=452050288_3 HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
Connection: Keep-Alive
Cookie: JSESSIONID=2vbxJJFLvnR2F6f3Lwqzy9Yr4Bzgvdp1Lyp2BMwmmhbPKJ9YPxFR!-1629898328Hi,
I have a DC, which contains a panelCollection with a toolbar and buttons in it. The panelCollection's child is a facetRef. On a consuming page I insert into the facet a table.
How can I get the toolbar's buttons get updated, once the table's contents have changed?
Particularly, disabled properties of the buttons are exposed as attributes of the DC. On the consuming page the attributes are bound to enabled properties of a commit and a rollback binding actions. Initially the buttons are disabled. When I change a cell's value it would be nice, if the buttons would be enabled in response without refreshing the page or invoking an execute on an undelying VO/iterator.
Regards,
Y. -
ADF 11g Hosted Components Demos - Dead Link
The following link does not work anymore:
http://jdevadf.oracle.com/adf-richclient-demo
Did they move it someplace else ?
Thanks,
ValonThis site is up again. Thanks for informing.
-Juan Camilo -
Hi All,
We have a number of declarative components that we are utilizing within our ADF implementation, I am trying to create one of those components in a similar fashion to how I create a Rich Input Text (for example)
RichInputText text = new RichInputText();
panelForm.getChildren().add(text);
This doesn't seem to work if I replace the "RichInputText" with "MyDecComp" class, where the declarative component doesn't render. Is there any way to achieve the same outcome with the declarative component as the normal JSF / ADF component.
Looking forward to your reply.
Regards,
Younis
Edited by: Younis on 7/10/2011 09:01Are you talking about custom components?
This will help you:
Documentation
http://download.oracle.com/docs/cd/E14571_01/web.1111/b31973/ad_custom.htmA Sample
http://andrejusb.blogspot.com/2009/10/custom-declarative-components-in-adf.html- Prasad -
Reusable toolbar with Oracle ADF declarative components(ADf code corner)
Hi All,
Using Jdeveloper 11.1.1.2.0.
Following the how to achieve "reusable toolbar with Oracle ADF declarative components" published here
[http://www.oracle.com/technology/products/jdev/tips/fnimphius/GenericMenuBar/genericMenuBar.html]
But I am not getting any method parameters under JSP Objects -> Components when binding the buttons toolbar menu buttons.Following is the code I have in my GeneralToolbarComponent.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:toolbar id="dc_t1">
<af:commandToolbarButton text="commandToolbarButton 1" id="dc_ctb1"/>
<af:commandToolbarButton text="commandToolbarButton 2" id="dc_ctb2"/>
<af:commandToolbarButton text="commandToolbarButton 3" id="dc_ctb3"/>
<af:commandToolbarButton text="commandToolbarButton 4" id="dc_ctb4"/>
</af:toolbar>
<af:xmlContent>
<component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
<display-name>GeneralToolbarComponent</display-name>
<attribute>
<attribute-name>DataSet</attribute-name>
<attribute-class>java.lang.String</attribute-class>
</attribute>
<component-extension>
<component-tag-namespace>component</component-tag-namespace>
<component-taglib-uri>/VikramLib1</component-taglib-uri>
<method-attribute>
<attribute-name>handleFirstMethod</attribute-name>
<method-signature>void
handleFirstMethod(javax.faces.event.ActionEvent)</method-signature>
</method-attribute>
<method-attribute>
<attribute-name>handleLastMethod</attribute-name>
<method-signature>void
handleLastMethod(javax.faces.event.ActionEvent)</method-signature>
</method-attribute>
<method-attribute>
<attribute-name>handleNextMethod</attribute-name>
<method-signature>void
handleNextMethod(javax.faces.event.ActionEvent)</method-signature>
</method-attribute>
<method-attribute>
<attribute-name>handlePreviousMethod</attribute-name>
<method-signature>void
handlePreviousMethod(javax.faces.event.ActionEvent)</method-signature>
</method-attribute>
</component-extension>
</component>
</af:xmlContent>
</af:componentDef>
</jsp:root>
Thanks
VikramThanks for the link. We are trying to write a template as described on this link - Help on JSF Page Template
However we are running in to issues after defining the attribute.
Can anyone help?
Thanks
Ajay -
ADF Mobile: Templates, Reusable regions, Declarative components
Hi,
Unfortunately the developer guide has no mention about how to create page templates, re-usable regions, and declarative components. Does ADF Mobile currently support them? Please shed some light.
Thanks
SriniNot right now.
But you can use the deploy as feature to develop reusable features that can be shared among applications.
http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/deploying.htm#CHDCGBIE -
Strange things have been happening with my research into declarative components.
1. declarative component cannot be used the within the same project it is defined. only in a separate project which consumes it as an adflib
2. periodically, in the componentdef property inspector for my declarative component would miss displaying all values I defined for "Facet Definitions, Method Signature, Methods". Closer inspection of the code reveals that somehow, the afc tags disappeared! so the code for something like a method attribute would look like:
<method-attribute>
<attribute-name>
commit
</attribute-name>
<method-signature>
void method(javax.faces.event.ActionEvent)
</method-signature>
</method-attribute>
...instead of:
<afc:method-attribute>
<afc:attribute-name>
commit
</afc:attribute-name>
<afc:method-signature>
void method(javax.faces.event.ActionEvent)
</afc:method-signature>
</afc:method-attribute>
...3. during design time, the ActionListener attribute of a button (in the declarative component definition) shows up under "warning node" and states "Reference comp.nameofactionlistener" not found.
Code will run but there are many warnings similar to this.
anyone else on 11.1.2.3 have similar issues working with declarative components? i'm trying to find steps to reproduce but havent stumbled upon it yet.Wes,
1) is documented at http://docs.oracle.com/cd/E35521_01/web.111230/e16181/af_reuse.htm#autoId21
2) and 3) I personally have not stumbled upon, but if you have a reproducible test case you should open an SR or make an entry in the ADFEMF issue tracker (http://java.net/jira/browse/ADFEMG side is currently down :()
Timo -
ADF 11g: turn off validation pop-up windows
Hi all,
Does anyone know how to turn off the pop-up messages with ADF 11g? I am using Jdeveloper 11.1.1.4.0.
I need to display the error messages on the page. I have added Message components to the page to display the error messages. Now it displays the errors twice. I need to turn off the pop-up message now.
Thanks,
alHi,
http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e12419/tagdoc/af_messages.html
+"If the tag is not present the messages will show up in a page level popup. However, if you want your messages to display inline at a specific location on the page, place the af:messages tag at the appropriate part of your page and set the inline attribute to 'true'."+
Frank -
Lightweight alternative to Declarative Components?
Hi,
Is there a simpler, lighter way to extract part of an ADF page into a re-usable tag that can be used instead of the Declarative Components feature?
In my application, I have a table which displays some data from a VO. Some columns are links, and there are also various buttons in and around the table that allow the user to perform a set of common actions on the table contents. I don't want to have to replicate this into all my various pages, I want to extract this into a reusable 'tag'.
This is not a component that will be useful throughout the organisation, it's just a simple component that will be used a few times in this one application. My first idea was to use the ADF declarative component feature, but this requires deployment of a seperate JAR. I've followed various tutorials now on creating a jar then including it into my project, but I haven't succeeded so far (for some reason the jar I create doesn't seem to contain the Declarative Components I have defined). Can I not simply define some components in my own application and use them within that application without the JAR deployment step?
I've also tried going the JSP tag route, but I need to pass objects such as the backing bean and the view object iterator to the tag and when I try and add a tag attribute with deferredValue="true", I get an error from the app server like:
/WEB-INF/tags/attachments.tagx: Line # 9, <jsp:directive.attribute name="backingBean" required="true" deferredValue="true" type="java.lang.Object" xmlns:jsp="http://java.sun.com/JSP/Page"/>
Error: Invalid attribute "deferredValue", for the attribute directive with name " backingBean " when the tld version is not 2.1
at oracle.jsp.parse.JspRTTag.<init>(JspRTTag.java:247)
at oracle.jsp.parse.JspRTTag.<init>(JspRTTag.java:237)
at oracle.jsp.parse.JspParseState.createTagParser(JspParseState.java:943)
at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:919)Even though my implicit.tld does have version="2.1".
My third and final idea was to create a jsff and include it in the page via f:subview and jsp:include, however I can then only pass string type parameters (jsp:param) to the fragment. This isn't adequate, since I need to pass backing bean, view object iterator, etc.
Surely I'm missing an easy way to do this. Any ideas?I've now succeeded in creating a Declarative Components library and importing those components into my project. It's a rather long winded process but if it works I guess it'll do.
I've created a component called 'attachments', but I'm now getting the following exception when attempting to use the components in my page:
java.io.FileNotFoundException: MDS-00013: no metadata found for metadata object "/components/attachments.jspx"
at oracle.mds.jsp.MDSJSPProviderHelper.fromStream(MDSJSPProviderHelper.java:120)
at oracle.adf.library.webapp.ADFJspResourceProvider.fromStream(ADFJspResourceProvider.java:333)
at oracle.jsp.parse.XMLUtil.getFromStream(XMLUtil.java:280)
at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:477)
at oracle.jsp.runtimev2.JspPageCompiler.parseAndGetTreeNode(JspPageCompiler.java:454)
at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:653)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:643)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:722)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:646)
...Another post on the forum says the solution is to create a pageDef file for the jspx, however I can't create a pageDef for a component as far as I can tell.
Is there a solution here? Can MDS and Declarative Components be used together? -
We have a requirement to split the page into 3 parts (basically 3 frames on the page). Frame on the left would contain links to the pages on the right which would be driven by a POV frame at the top. My question is do we have any specific component in ADF 11g to implement basic html frames ( like panelSpiltter) or would it be better to implement the page using basic html frames.
Also, for getting the list of afh components, do we need to add any specific library or have these components been removed in ADF 11g.They are in the Trinidad set of components - but I would only suggest using those if you can't achieve the layout you are looking for with a combination of the layout components we offer in ADF Faces RC.
-
How to access/identify components in JSF Declarative Components?
Hi,
I am beginner on ADF. Trying to build first Declarative Components.
Use Case is as follows -
I have put 2 InputTexts in Declarative Component.
Want to set some value in second InputText (txtAddressLine2) in Validator/ValueChangeListner method of first InputText(txtAddressLine2).
<?xml version='1.0' encoding='windows-1252'?>
<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=windows-1252"/>
<af:componentDef var="attrs" componentVar="component">
<af:xmlContent>
<component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
<display-name>Test</display-name>
<attribute>
<attribute-name>
AddressLine2
</attribute-name>
<attribute-class>
java.lang.String
</attribute-class>
</attribute>
<component-extension>
<component-tag-namespace>Address3</component-tag-namespace>
<component-taglib-uri>/Address3</component-taglib-uri>
</component-extension>
</component>
</af:xmlContent>
<af:inputText label="Address Line 1"
binding="#{backing_Address3.txtAddressLine1}"
id="txtAddressLine1"
validator="#{backing_Address3.txtAddressLine1_validator}"
autoSubmit="true" immediate="true" rendered="true"
valueChangeListener="#{backing_Address3.txtAddressLine1_valueChangeListener}"/>
<af:inputText label="Address Line 2" binding="#{backing_Address3.txtAddressLine2}"
id="txtAddressLine2"
validator="#{backing_Address3.txtAddressLine2_validator}"
autoSubmit="true" immediate="true"/>
</af:componentDef>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Address3-->
</jsp:root>
This is sample I am working on.
I am trying following approaches in bean of Component itself.
Approach I: This does not give any error, value is not set in txtAddressLine2
this.getTxtAddressLine2().setValue("Some Value");
Approach II: Not able to access txtAddressLine2 using findComponent() method
UIViewRoot uiViewRoot = facesContext.getViewRoot();
RichInputText inputText;
inputText = null;
if (uiViewRoot.findComponent("txtAddressLine2") != null) {
System.out.println("Found ");
inputText = (RichInputText)uiViewRoot.findComponent("txtAddressLine2");
inputText.setValue("my value");
} else {
System.out.println("Not Found "); //Always not found
Can anybody tell me correct way to access components and set their values inside Declarative Components itself?Thanks buddies....its resolved!
This is how I have done it -
Components have these 2 Input Texts :
<af:inputText label="Label 1" id="txt1" autoSubmit="true" immediate="true"
binding="#{DC2.txt1}" validator="#{DC2.txt1_validator}"/>
<af:inputText label="Label 2" binding="#{DC2.txt2}" id="txt2"
immediate="true" autoSubmit="true" partialTriggers="txt1"/>
Code in Component Bean setting value is as follows:
RichInputText txt22;
txt22 = getTxt2();
txt22.setSubmittedValue("Some Value"); -
Declarative Components field binding
Can we bind a View Object to declarative component? I want to have a declarative component and whenever that declarative component would be used, it would be used with the same view object so i feel it extra work to bind all the attributes to view object's attributes whenever declarative component has to use. I want t create the component (declarative) and get bind it with a view object somehow and use it without every time going through to bind to view object or bind individual fields to view object's attributes. Any suggestions??
Edited by: Mamoona on Jun 24, 2011 4:56 PMHi,
this is not what declarative components are for. Think of declarative components as standard JSF components, which you would not build tied to a specific model. If you need to wire a declarative component to a View Object then you expose an attribute on the declarative component that the consumer of the component the uses EL on to bind it e.g. to the ADF binding layer
Frank -
We are looking to upgrade ADF to 11.1.2.0 and looking for WebCenter compatibility.
Could you please let me know WebCenter compatible version for JDeveloper and ADF 11g Release 2 (11.1.2.0.x) ?
Thanks
JPLooking at 11.1.2.0.0 note on
http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html
and seeing, "This version of JDeveloper doesn't include the SOA and WebCenter pieces - to use these components you'll need to download Oracle JDeveloper 11.1.1.5.0."
Does that mean, 11.1.2.0.0 can't be used with WebCenter? -
ADF 11g Row Selection in a Table with radio button
Hi there,
I need to select one row with a radio button and then take some action on those rows via command buttons.
I need to use a Radio Button and not the table property rowSelection provided with the latest features of ADF 11g.
In ADF 10g you can use tableSelectOne component that missing in 11g. How you can implement that with ADF 11g?
Regards, AlexWell, ADF 11g doesn't have that capability, so you have to build it yourself. If don't want to build it yourself, you could use the Trinidad components instead of ADF 11g. If you don't want either of those options, then sorry :)
John -
Hi
Giving a look on ADF 11g model Business Components, I tried to have a generic component A and its extended component B.
A has an id primary key attribute and if i generate a database table it has the PK generated, but B has no PK generated since the extended attribute is marked with the PK property.
I used Jdeveloper 11g 11.1.1.1.0, and built two components from a BC diagram.
Questions,
is it a good practice to have a master generic component with common id version and audit attributes ?
why the pk constraint is not built on database table for extended components ?
Thanks for your answers
Edited by: jpgora on 12 août 2009 10:19The screen goes normal when I place the cursor over the top of the app and I don't get any height=100% on my page.
I noticed that some pages that have the table component on it don't get this bug.
I see the last release and the EL to get the agent detects the IE8 normally but that is some way to port my app to it??
Thanks in advance,
Renan.
Maybe you are looking for
-
I need help with my Live! cam video im
My camera has problems with showing the picture. The video is deformed, the video background shines through the view.What can I do with that? How can I turn the background off Ohh, in the Live ! cam center there are questionmarks almost on every butt
-
I have a videocamera minidv what kind of cable i had used to import the movie?
-
Aggregate table and outdated rows
hi everybody, let´s assume the following scenario: - one fact table, one aggregator, one target aggregate table with a sum column. - aggregate table loading type is set to "insert/update", update matching is done on several columns. - first load is s
-
Hello - After going through the entire burning process on iDVD5, the message "Burning Finished-errors were found during the burning process" appears. There is nothing burned on the DVD - any suggestions ? Thanks. iMac G4 Mac OS X (10.4)
-
Workflow for using proxies and AVCHD
I'm working on a 6 camera mulitcam project of a theatrical performance and I'm using Premiere CC. The footage is all spanned AVCHD from Canon Vixia's. My machine is pretty good but no way is it going to play 6 streams of AVCHD at once (I've done 4