Binding to Declarative Components

I've created a small sample project highlight a problem I'm having. I have a declarative component [dummDCdef.jspx] with a managed bean (backing bean scope) [DummyDCdef.java]. After deploying the component to and importing the .jar in another project (call it demo), I am attempting to bind to the declarative component. In the demo project I have a managed bean (pageFlow scope) [demoBean.java] that handles the declarative component binding logic. The declarative component consists of an outputText, with a default value set, and inputText, and a button. Upon button action the outputText value is copied to the inputText. The demo project contains a page with the declarative component, an outputText and a button. Upon button action I am attempting to take the value from the inputText in the declarative component, and copy it to the outputText in the demo page. The "big picture" goal is to be able to get values FROM a declarative component and store them on a managed bean in a containing project.
The problem is, when attempting to bind to the component in the containing project, the instance of the declarative component is not accessible in the backing bean, i.e. something like componentBinding.getValue() does not work, where as in a regular component like inputText, inputTextBinding.getValue() works as one would imagine.
Search on "Epic Fail" to see where I'm failing.
JDevloper Studio Edition Version 11.1.1.6.0
JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1
DECLARATIVE COMPONENT PROJECT:
dummyDCdef.jspx (component definition):
<?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:decorativeBox id="dc_db1">
      <f:facet name="center">
        <af:panelGroupLayout id="dc_pgl1">
          <af:outputText value="Copy This Text" id="dc_ot1"
                         binding="#{backingBeanScope.DCdefBean.outputTextBinding}"/>
          <af:inputText label="Label 1" id="dc_it1"
                        binding="#{backingBeanScope.DCdefBean.inputTextBinding}"/>
          <af:commandButton text="Copy Text" id="dc_cb1"
                            action="#{backingBeanScope.DCdefBean.buttonAction}"/>
        </af:panelGroupLayout>
      </f:facet>
    </af:decorativeBox>
    <af:xmlContent>
      <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
        <display-name>dummyDCdef</display-name>
        <component-class>component.DummyDCdef</component-class>
        <attribute>
          <attribute-name>Label</attribute-name>
          <attribute-class>java.lang.String</attribute-class>
        </attribute>
        <component-extension>
          <component-tag-namespace>component</component-tag-namespace>
          <component-taglib-uri>/dummyDC</component-taglib-uri>
        </component-extension>
      </component>
    </af:xmlContent>
  </af:componentDef>
</jsp:root>DummDCdef.java (backingBean scoped):
package component;
import oracle.adf.view.rich.component.rich.fragment.RichDeclarativeComponent;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adf.view.rich.component.rich.output.RichOutputText;
public class DummyDCdef extends RichDeclarativeComponent {
    private RichInputText inputTextBinding;
    private RichOutputText outputTextBinding;
    public DummyDCdef() {
    public void setInputTextBinding(RichInputText inputTextBinding) {
        this.inputTextBinding = inputTextBinding;
    public RichInputText getInputTextBinding() { 
        return inputTextBinding;
    public void setOutputTextBinding(RichOutputText outputTextBinding) {
        this.outputTextBinding = outputTextBinding;
    public RichOutputText getOutputTextBinding() {
        return outputTextBinding;
    public String buttonAction() {
        inputTextBinding.setValue(outputTextBinding.getValue().toString());
        return null;
Demo Project:
demo.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"         
          xmlns:sdc="/dummyDC">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1">
      <af:form id="f1">
        <sdc:dummyDCdef id="ddc1" binding="#{pageFlowScope.demo.dcBinding}"/>
        <af:outputText value="Default Text" id="ot1"/>
        <af:commandButton text="commandButton 1" id="cb1"
                          action="#{pageFlowScope.demo.copyFromDC}"/>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>demoBean.java (pageFlow scope):
package ddcd;
import component.DummyDCdef;
public class demoBean {
    private DummyDCdef dcBinding;
    public demoBean() {
        super();
    public void setDcBinding(DummyDCdef dcBinding) {
        this.dcBinding = dcBinding;
    public DummyDCdef getDcBinding() {
        return dcBinding;
    public String copyFromDC() {       
        try {
            System.out.println(dcBinding.getInputTextBinding().getValue().toString());
        } catch (NullPointerException e) {
            //e.PrintStackTrace();
            System.out.println("Epic Fail (1)");
        return null;
}Edited by: 977647 on Dec 21, 2012 11:07 AM
Edited by: 977647 on Jan 2, 2013 10:28 AM

Sascha Herrmann wrote:
The instance of that class is already part of the JSF component tree. JSF creates it for you when it builds the tree. No need to have an additional bean. You can work with it like you would with RichOutputText or RichInputText.
In your component you have:
<af:componentDef var="attrs" componentVar="component">
That means that with EL "#{attrs}" you can access (from within your component!) in EL any attribute that you might specify in the decl. component. "#{component}" gives you access (from within your component!) in EL to the instance of the component class. Being an instance of DummyDCdef in your case.That was the key. In the component project I removed the backingbean binding for DummyDCdef. I also changed <af:componentDef var="attrs" componentVar="component"> to <af:componentDef var="attrs" componentVar="*dummyComponent*"> for clarity. The confusing part about the bindings in dummyDCdef.jspx is that when you click "binding -> edit" for the outputText for example, the selection for the binding makes it seem as if a managed bean is required - it explicitly asks you to choose a managed bean from a drop down. Instead of binding in this manner however, if you just write in the EL binding="#{ *dummyComponent*.outputTextBinding}" the binding will be made correctly, even though the red squiggly lines show up suggesting there is a problem.
If you're new to this like me, at this point you should be asking "that's cool, but WHERE do you define the class for the component logic-that is-where is the class "dummyComponent" refers to?" In the declarative component definition .jspx page inside of the <af:xmlContent> tags there is a <component-class>. So for the code in my original post, the only differences would be to remove the managed bean in backingbeanscope from adfc-config and make a few tweaks in dummyDCdef.jspx.
dummyDCdef.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="dummyComponent">
    <af:decorativeBox id="dc_db1">
      <f:facet name="center">
        <af:panelGroupLayout id="dc_pgl1">
          <af:outputText value="Copy This Text" id="dc_ot1"         
                         binding="#{dummyComponent.outputTextBinding}"/>
          <af:inputText label="Label 1" id="dc_it1"
                        binding="#{dummyComponent.inputTextBinding}"/>
          <af:commandButton text="Copy Text" id="dc_cb1"
                            action="#{dummyComponent.buttonAction}"/>
        </af:panelGroupLayout>
      </f:facet>
    </af:decorativeBox>
    <af:xmlContent>
      <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
        <display-name>dummyDCdef</display-name>
        <component-class>component.DummyDCdef</component-class>
        <attribute>
          <attribute-name>Label</attribute-name>
          <attribute-class>java.lang.String</attribute-class>
        </attribute>
        <component-extension>
          <component-tag-namespace>component</component-tag-namespace>
          <component-taglib-uri>/dummyDC</component-taglib-uri>
        </component-extension>
      </component>
    </af:xmlContent>
  </af:componentDef>
</jsp:root>NOTE: <component-class>component.DummyDCdef</component-class>
"component" here is in no way a key path/reserved term. I changed <af:componentDef var="attrs" componentVar="*dummyComponent*"> specifically to avoid confusion here. component.DummyDCdef is literally the class path where I execute component logic.
Edited by: 977647 on Jan 11, 2013 11:19 AM

Similar Messages

  • 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 PM

    Hi,
    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

  • 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");

  • 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
    Vikram

    Thanks 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

  • How to set the disable,visible property in declarative components.

    We have used one declarative component. It consists of 5 buttons (add,delete,save,delete,print). In all of our pages, this declarative component is used. We could bind methods and was able to use each pages seperately (by linking the methods in the backing bean)
    But for implementing the DISABLE,VISIBLE properties, we have added the attributes for this and refered this to the corresponding disable and visible property of the button. In the page all these properties where reflected. But at the runtime these buttons are not coming.
    Can anyone advise how can we set the disable,visible property in declarative components.

    Hi vikram ,
    i hvnt initialized the properties ,
    in my declarative component i have one button say Save button and i want to config 2 properties Disable and Visible
    i added two attributes ( java.lang.Boolean ) say disablr_btn ,*visible_btn* and mapped wth the Save button Properties Disabled and Visible using expressions
    Now the button is invisible while running the page.
    if i remove the mapping from properties Disable and visible , the button is visible
    should i init the properties in faces config , i dnt knw hw to init the properties
    pls advice

  • 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.

  • JDeveloper 11.1.2.3, ADF Faces: aberrant behavior declarative components

    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

  • 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?

  • 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
    Srini

    Not 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

  • Programmatically adding declarative components (ADF 11g 11.1.1.5.0)

    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:01

    Are 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

  • When should use Declarative components?

    What's the Declarative components and when should use them?

    Frank,
    According to the sentiment I get on this Forum sometimes, I thought ADF was supposed to automatically infuse into your brain while the JDeveloper installer ran - who needs documentation?
    In all seriousness, however, The Fusion Developer's Guide is sitting right here on my desktop, and is open more often than not. I think it suffers from the "free is worthless" syndrome - it's got a lot of good information in it, and if it was a published physical book, I'd bet that people would pay for it.
    John

  • 11g Declarative Components

    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!-1629898328                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    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.

  • Setting attributes of declarative components in an application

    As far as I understand, the attributes of declarative component (DC) can be set in such way:
    UIXDeclarativeComponent  component = ... /* obtain component instance, no matter how */
    component.getAttributes().put("<attribute name>", <attribute value>);Am I right? If so, then why the following does not work (assuming my DC has 7 af:inputTexts whose values are set to the corresponding attribute):
    In a DC
    <af:componentDef var="attrs" componentVar="component">
    <af:inputText value="#{attrs.surnameValue}"
                        label="#{resource['Payer.Surname']}" id="p_surname"
                        autoSubmit="true" binding="#{CSJPayerSupport.surname}"/>
    ...and so on 7 timesIn my View Controller code (parent is UIXDeclarativeComponent)
    System.out.println("dump parent attrs");
    for (String s:parent.getAttributes().keySet()) {
        if (parent.getAttributes().get(s) != null)
            System.out.println("S="+s+" value ="+parent.getAttributes().get(s).toString());
        else
            System.out.println("S="+s+" value is not set");
    System.out.println("===============");
    parent.getAttributes().put("surnameValue", bprow.getFllastname());
    parent.getAttributes().put("nameValue", bprow.getFlname());
    parent.getAttributes().put("middlenameValue", bprow.getFlpatronymicname());           
    parent.getAttributes().put("addressValue", bprow.getAddress());
    parent.getAttributes().put("birthdayValue", bprow.getBirthday());
    parent.getAttributes().put("passportnoValue", bprow.getFlpassportno());
    parent.getAttributes().put("passportdateValue", bprow.getFlpassportissuedate());           
    parent.getAttributes().put("passportplaceValue", bprow.getFlpassportissueplace());           
    for (String s:parent.getAttributes().keySet()) {
        if (parent.getAttributes().get(s) != null)
            System.out.println("S="+s+" value ="+parent.getAttributes().get(s).toString());
        else
            System.out.println("S="+s+" value is not set");
    }I see in the output, that attributes are truly set, but those values do not appear in corresponding af:inputTexts! What am I doing wrong?
    Edited by: Brenagwynn on 5/2/2010 17:58

    Hi,
    are the values provided when the declarative component loads ? If not, try and partially refresh the declarative component so when the data is set, the UI is repainted.
    Frank

  • Bind Variable popup when no bind variable declared

    I am writing a fairly complex SQL (FYI, I want to keep this all in one step and not split out with multiple sub-selects) and I am getting the bind variable popup and an error message ("The requested URL /apex/wwv_flow.show was not found on this server ") and I am not sure why and could definitely use some help. From what I see there is no issue with the SQL syntax written and when I try to break it down, everything goes well until the point where I write a case statement with an OR and checking for 'BLOCK'.
    The issue comes when using the bolded line.
    I am using "10g Release 2 (10.2)" and querying from the SQL commands area inside it.
    The goal is to identify the area of the court broken down by the x and y dimension, home and away team has different logic to be used and if it is a block there is different logic.
    Your help would be greatly appreciated, and I am leaning towards it is a bug in the SQL Commands section of the tool:
    The full query is below:
    case when E.YEAR IS NOT NULL then
    *(case when x_dimension < 12.5 then 'A' when x_dimension <= 25 then 'B' when x_dimension < 37.5 then 'C' else 'D' end ||*
    case when ((a.action_team=c.awayname3 and A.ACTION_TYPE = 'BLOCK') or (a.action_team=c.homename3 and A.ACTION_TYPE <> 'BLOCK')) then (case when y_dimension < 9.5 then '4' when y_dimension <= 19 then '3' when y_dimension < 28.5 then '2' when y_dimension <= 38 then '1' else '0' end) else (case when y_dimension > 84.5 then '4' when y_dimension >= 75 then '3' when y_dimension < 65.5 then '2' when y_dimension <= 56 then '1' else '0' end) end) else 'NA' end as COURT_LOC
    It would not allow to enter the full SQL but please know that there is no issue with any declaration of the columns.
    Edited by: user10615520 on Feb 29, 2012 10:29 AM
    It seems that it is an issue with the in house SQL client of XE as I downloaded SQL Developer and ran same query there and the result was no issues. Is anyone aware of a bug for something like this?
    Edited by: user10615520 on Feb 29, 2012 10:43 AM

    So I am running Oracle Database Express version 10g. When you login through the default web interface, there is a SQL command line option. When I utilize the SQL below, can't insert whole SQL statement for some reason it won't let me, in that SQL command line I get a pop up window asking about values for bind variables... But as you can see from the code below there is no declaration of a bind variable. I also get the error message from the original post.
    When I use the same query in Oracle SQL Developer, not express (mistake in previous note), the query runs without any issues.
    My question is if anyone is aware of the oracle database express sql command line module having a bug where this is occurring. When I remove the line below from the query it runs fine in the Oracle Database Express command line module.
    Thank you for your help, I hope this is clear.
    case when E.YEAR IS NOT NULL then
    (case when x_dimension < 12.5 then 'A' when x_dimension <= 25 then 'B' when x_dimension < 37.5 then 'C' else 'D' end ||
    case when ((a.action_team=c.awayname3 and A.ACTION_TYPE = 'BLOCK') or (a.action_team=c.homename3 and A.ACTION_TYPE <> 'BLOCK'))
    then
    (case when y_dimension < 9.5 then '4' when y_dimension <= 19 then '3' when y_dimension < 28.5 then '2' when y_dimension <= 38 then '1' else '0' end)
    else
    (case when y_dimension > 84.5 then '4' when y_dimension >= 75 then '3' when y_dimension < 65.5 then '2' when y_dimension <= 56 then '1' else '0' end)
    end) else 'NA' end as COURT_LOC

  • Declarative components and DCIteratorBinding

    Hi,
    Can I add manually accessorIterator into the pagedefnition xml? When I add and if it is not binding to an UI component it fails. I want to use a declarative component that takes DCIteratorBinding as an attribute on page, but this makes it necessary to have an unused UI component on my page.
    Thanks,
    Manoj

    Hi Manoj:
    It worked for me to manually add bindings. A couple of days ago I manually added an existing Iterator into my page definition, just in order to call its 'createInsert' operation because the next page is supposed to work on the newly created record. It works clean and nice without any problem.
    Thanks,
    Alex

Maybe you are looking for

  • How do I activate the "Signature" options of a PDF document created 11/8/13

    How do I activate the "Signature" options on a PDF document?

  • Incremental backups on DVD+/-RW

    I have just got my first DVD writer (woo hoo!) and want to be able to use it to make incremental backups of completed work for each client I have (ie. 'Client 1' has a DVD of completed work, which I can add to when i do more work. 'Client 2' would ha

  • Radius server issue

    Hello all, I have configured a radius server on my sbs2008 server.  I am able to test it from the ASA successfully, however when I try to login with the Anyconnect client I get a login failed.  When I check the logs I see that the VPN is trying to au

  • Dynamic link not working for PPCS4 after installing CS4

    Background. I had CS3 Master Collection. I then needed some features in PPCS4 so I purchased that as a standalone upgrade. Recently I decided to upgrade the entire suite to CS4 Creative Suite 4.  Everything installed fine. However when I try to go fr

  • Can't Sync Games because i have no Games Column in itunes

    i downloaded the games from a free site but I Can't Sync Games because i have no Games Column in itunes. is there anyway of getting a games column, or is there a alternative way to sync them without needing a games column in itunes? Message was edite