Declarative Component inside of an Iterator

I am building a custom declarative component, and that's how I am using it from the main page:
<af:iterator var="row" value="#{viewScope.manageMinorCrBB.linesForAddGroup}" id="it1">
<af:panelGroupLayout id="id13" layout="horizontal" halign="left">
<af:commandButton id="cmdAddLine" text="Add" actionListener="#{viewScope.manageMinorCrBB.addLines}" />
<af:commandButton id="cmdRmvLine" text="remove" actionListener="#{viewScope.manageMinorCrBB.removeLines}" />
<!-- THIS TAG DOESN'T WORK !!!!! -->
<af:declarativeComponent id="dynfld1"
viewId="/project/dynamicFieldComponent.jspx"
rows="4" maxColumns="3"
optionalFields="#{row.optionalFields}"
model="#{row.model}"
selectedOptionalField="#{row.selectedOptionalField}"
postButtonTitle="Save"
postListener="viewScope.manageMinorCrBB.saveAndRefreshAction"
required="false" />
</af:panelGroupLayout>
</af:iterator> <!-- Component Tab to show OutOfScoped and Scopped DCCs
Information will be shown based in Drools Logic -->
<!-- THIS TAG WORKS !!!!! -->
<af:declarativeComponent id="dynfld2"
viewId="/project/dynamicFieldComponent.jspx"
rows="8" maxColumns="2"
optionalFields="#{viewScope.manageMinorCrBB.lineFind.optionalFields}"
model="#{viewScope.manageMinorCrBB.lineFind.model}"
selectedOptionalField="#{viewScope.lineFind.selectedOptionalField}"
postButtonTitle="Search"
postListener="viewScope.manageMinorCrBB.searchAction"
required="true"
/>
and that's a fragment of my DCC:
If I call the components individually is working but If I put my component inside of an iterator I can't get the component's attributes by using this method:
RichDynamicDeclarativeComponent _this = (RichDynamicDeclarativeComponent )
getValueObject("#{component}",RichDynamicDeclarativeComponent .class);
What am I doing wrong?, should I use the same "#{component}" expression???
Thank you, I would really appreciate your help!
Maik

Hi,
try af:forEach. the af:iterator stamps it children and does not create component instances
Frank

Similar Messages

  • ADF:LOV declarative component not working inside table component.

    Hi,
    I have created a custome LOV control,I am using this custom LOV control inside the table component,I am passing the below values as the parameter
    KeyValue="#{row.bindings.Value.inputValue}"
    LovModel="#{row.bindings.Value.listOfValuesModel}"
    Value- is the list of value attribute.
    When i click on the LOV search icon, the popup displays the Query model(it displays the list name at the top in the search page.so it is able to recognise the LOVmodel) but it is not able to retrive the list values.I am getting Query page with no values
    in the jspx page it is giving warning as "reference not found for row.bindings.Value.listOfValuesModel"
    Please can anyone help me on this?
    Thanks,
    Harish

    Hi Frank,
    below is my actual requirement and the solution i tried till now.
    I have a table and it has two columns let’s say “Columns” and “Values”. The first column i.e. “Columns” will be a dropdown and it will have predefined values, the other column “Values” will be a “List of value” control or similar kind of control in which the user can search and select multiple values from the popup list, and that list should dynamically bounded to the first column selected value.
    For Ex: if I select a value “Product” from the dropdown of the first column “Columns” , the control in the other column “Values” should bound to “product” list and I should be able to search and select multiple values from the pop up. And the popup should return the multiple selected values as a comma separated string to the textbox.
    In my requirement I have to use only VO’s to create the list and the control in the “Values” column should switch between these VO’s depending on the value selected in the first column.
    The solution we tried till now.
    I used a LOV switcher to achieve the above requirement. But we have a limitation in this approach as we could not do the multi select. Then we created a declarative LOV component in which we can select multiple values as a comma separated string from the popup.
    I retained the LOV switch model , instead of binding LOV switch model to the basic “Input List of Value” control in the JSPX page ,I used the LOV declarative component. Below is the code snippet which calls the declarative LOV component from JSPX page.
    <af:panelFormLayout id="pfl2">
    <af:selectOneChoice value="#{bindings.Columns.inputValue}"
    label="#{bindings.Columns.label}"
    required="#{bindings.Columns.hints.mandatory}"
    shortDesc="#{bindings.Columns.hints.tooltip}"
    id="soc3" autoSubmit="true">
    <f:selectItems value="#{bindings.Columns.items}" id="si5"/>
    </af:selectOneChoice>
    <mc:OraMultiSelect
    KeyValue="#{bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"
    id="oms2"/>
    </af:panelFormLayout>
    Where Value attribute is having LOVModel.
    The above code perfectly fine as I used it inside the “Form layout” and with the parameters passed as KeyValue="#{bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"
    The problem I am facing:
    The actual problem comes when I use this control inside the table which I required in my implementation.
    I called the declarative LOV control as shown below inside the table as I used to call the basic “Input List of value” control which works fine inside the table.
    . <af:column sortProperty="Value" sortable="false"
    headerText="#{bindings.OpPlanning1.hints.Value.label}"
    id="c1" width="133">
    <mc:OraMultiSelect KeyValue="#{row.bindings.Value.inputValue}"
    LovModel="#{row.bindings.Value.listOfValuesModel}"
    id="oms1"/>
    </af:column>
    Above code doesn’t works fine when I select value from the “Column” dropdown it displays the corresponding list model in the pop up but not able to retrieve the value of the list in the popup .
    If I pass the parameters as
    . <af:column sortProperty="Value" sortable="false"
    headerText="#{bindings.OpPlanning1.hints.Value.label}"
    id="c1" width="133">
    <mc:OraMultiSelect KeyValue="#{bindings.Value.inputValue}" --instead of ="#{row.bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"--}" --instead of ="#{row.bindings.Value.inputValue}"
    id="oms1"/>
    </af:column>
    It works fine for the first row.The subsequent rows refers the value selected in the first row dropdown.
    Thanks For the help,
    Harish
    Edited by: 886523 on Nov 3, 2011 8:04 AM

  • Unable to read view Id of Declarative Component from "var" of af:iterator

    Hi,
    I am facing a weird issue where when i assign "var" of af:iterator to the view Id of declarative component, it is saying "<DynamicIncludeTag> <getViewId> Encountered null from the viewId expression: #{row}"
    And Page is showing blank.
    My JSPX code is as follows :
    <af:iterator value="#{pageFlowScope.stageBean.pathList}" var="row">
    <af:outputText value="#{row}" id="ot1"/>
    <af:declarativeComponent viewId="#{row}"/>
    </af:iterator>
    And code snippet for getter in Java bean is as follows:
    public List<String> getPathList()
    List<String> pathList = new ArrayList<String>();
    pathList.add("/Test.jspx");
    return pathList;
    The weird thing here is output text is printing the path /Test.jspx but declarative component is not recognizing it. Its showing blank page and in logs, error says "Encountered null from the viewId expression: #{row}"
    If i remove #{row} from viewId and manually give like viewId = "/Test.jspx" , its displaying the page correctly.
    Can anyone please help me solve this issue?
    Regards,
    Rakesh.

    http://stackoverflow.com/questions/12183735/adf-unable-to-read-view-id-of-declarative-component-from-var-of-afiterator

  • Dynamic declarative component won't work properly within table row

    Hi guys,
    I built a dynamic declarative component which basically consists of an af:inputText surrounded by a af:panelLabelAndMessage tag.
    The component works fine until I put it inside a table column, then none of the attribute values get set.
    The problem seems to be related to the table row binding #{row.binding.Name.inputValue} , if I use a regular binding #{binding.Name.inputValue} it works ok.
    The declarative components attribute is defined as
    <attribute>
        <attribute-name>kbez</attribute-name>
        <attribute-class>java.lang.Object</attribute-class>
    </attribute>and is used as the inputText's value attribute
    <af:componentDef var="attrs" componentVar="component">
        <af:panelLabelAndMessage label="#{attrs.label}" id="dc_plam1"
                                 for="dc_it1" labelStyle="white-space:nowrap;"
                                 showRequired="#{attrs.showRequired}"
                                 rendered="#{attrs.rendered}">
            <af:inputText id="dc_it1" value="#{attrs.kbez}"
                          autoSubmit="true" immediate="false" ...>The component inside a table column is set like this
    <af:declarativeComponent viewId="/WEB-INF/ikb.adf.kreda.basis/mitarbeitersuche/ddc/mitarbeiterLOV.jsff"
                             id="ddc1" label="Mitarbeiter"
                             kbez="#{row.bindings.Kbez.inputValue}"/>My JDeveloper version is 11.1.1.5.
    Am I doing it wrong or is this a bug?
    Any help is appreciated.
    Thank you,
    Achim
    Edited by: Achim Rosenfeld on Mar 8, 2013 8:41 AM

    Hi,
    +#{row.binding.Name.inputValue} , if I use a regular binding #{binding.Name.inputValue} it works ok.+
    Don't think that #{binding.Name.inputValue} works okay in a table because it doesn't stamp the component per row. Actually I don't know if we support dynamic declarative components in a stamped environment (table). I know though that we don't for taglib declarative components in this context.
    Reason why it doesn't work: Tables are stamped at runtime, which means that for better performance, only the generated HTML is reused for each row with different data - not the component. Your component requires itself to be re-created for each row so it can re-read the attribute again. This is not the case in a stameped environment
    Solution: For your particular use case I don't think that a dynamic declarative component is needed as you can add the construct (af:inputText surrounded by a af:panelLabelAndMessage) directly into an af:column tag. The declarative component makes more sense for reuse of layout areas (e.g. custom tabs) that are iterated within an af:forEach (in which case instances of the decalarative components would be created).
    Bottom line: tables stamp their components and as such the attribute property exposed on a DDC doesn't seem to be called for each row, which is by design. This can be considered a bug if there is a use case demanding for a DDC in a table. If this is a requirement for you (and you can't directly add the components to the af:column tag) feel free to file this as a service request with customer support (required a support contract) so development can have a look if the requirement is feasible to implement.
    Frank

  • Getting selected values from selectManyChoice component inside valueChangeListener

    Hwo do I get the selected values from the selectManyChoice component inside the valueChangeListener.
    The API docs for valueChangeEvent.getNewValue() show the return type as java.lang.object. This is good for single value what does it return in case of multiple values.
    My drop down has string values so I am expecting a set of string values.

    JDev - 11.1.2.3
    public void onRegionSelect(ValueChangeEvent event) {
    event.getComponent().processUpdates(FacesContext.getCurrentInstance());
    if (!PhaseId.INVOKE_APPLICATION.equals(event.getPhaseId())) {
    event.setPhaseId(PhaseId.INVOKE_APPLICATION);
    event.queue();
    } else {
    List<Object> values = Arrays.asList(event.getNewValue());
    System.out.println("Value changed ==>> "+values.size());
    DCBindingContainer dc =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iter = dc.findIteratorBinding("RegVO1Iterator");
    ViewObject vo = iter.getViewObject();
    StringBuffer regions = new StringBuffer();
    for(Object index : values){
    String iIndex = (String)index;
    Row row  = vo.getRowAtRangeIndex(Integer.parseInt(iIndex));
    regions.append((String)row.getAttribute("Region")+",");
    String reg = regions.toString();
    if(reg.endsWith(","))
    reg = reg.substring(0,reg.lastIndexOf(","));
    System.out.println(reg);

  • Creating Declarative Component problem.

    Dear all
    I use Jdeveloper 11.1.1.4.0.
    I am planing to create an ADF declarative Component.The component will be a panel collection layout which contains menu (Action>Export to excel) and command button (Add new record).
    The scenario will be like this:
    1- The developer will drag my new component (myCustomPanel) to his page and will drag the data control inside this comonent to create ADF Read only table.
    2- at runtime the table should appear surrounded by (myCustomPanel) and the user can use the "Action" menu to export the content to Excel, and can click on "Add new Record"to navigate to another page to add record.
    The solution I made is:
    in my "myCustomPanel" I created two attributes , the first one is "tableID" and the second is "targetPage" represents the outcome of the navigation to the "Add new record" page.
    The developer must provide these two attributes when using "myCustomPanel".
    The problem is:
    at runtime when the user click on "Add new record" button an error is raised .
    The error in this line:
    <af:commandToolbarButton text="Add" id="dc_ctb1" action="#{attr.targetPage}"/>
    the action property of the command button expects a managed bean. But i proved it with page attribute.
    I want to dynamicly provides the naviation outcome to the button using attribute name. Is this possible?
    regards

    Thank you so much for you replying.
    Your solution is helpful
    I tried to do the following :
    1- in my "customcomponent" project I removed the attribute "taregtPage"
    2- I added a method attribute
    name: targetPage
    method-signature: java.lang.String method()
    <af:componentDef var="attrs" componentVar="component">
        <af:panelCollection id="collection">
          <f:facet name="menus">
            <af:menu text="Action" id="dc_m1">
              <af:commandMenuItem text="Export To excel" id="dc_cmi1"/>
            </af:menu>
          </f:facet>
          <f:facet name="toolbar">
            <af:toolbar id="dc_t1">
              <af:commandToolbarButton text="Add" id="dc_add"
                                       action="#{attrs.targetPage}"/>
            </af:toolbar>
          </f:facet>
          <f:facet name="statusbar"/>
          <af:facetRef facetName="tableContent"/>
        </af:panelCollection>
        <af:xmlContent>
          <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
            <display-name>dhamanTable</display-name>
            <facet>
              <facet-name>tableContent</facet-name>
            </facet>
            <attribute>
              <attribute-name>tableID</attribute-name>
              <attribute-class>java.lang.String</attribute-class>
              <required>true</required>
            </attribute>
            <component-extension>
              <component-tag-namespace>dhaman.custom</component-tag-namespace>
              <component-taglib-uri>/componentLib</component-taglib-uri>
              <method-attribute>
                <attribute-name>targetPage</attribute-name>
                <method-attribute>
                  <attribute-name>targetPage</attribute-name>
                  <method-signature>java.lang.String method()</method-signature>
                </method-attribute>
                <required>false</required>
              </method-attribute>
            </component-extension>
          </component>now My question is how to use it?
    I do not understand this
    action="#{component.handleTargetPage}" Do you mean that i will create amanaged bean "component" and add a methos "handleTargetPage"??
    Edited by: ta**** on Mar 9, 2011 1:58 PM
    Edited by: ta**** on Mar 9, 2011 2:00 PM
    Edited by: ta**** on Mar 9, 2011 2:01 PM

  • Create custom declarative component like container

    Hi all,
    I'm using Jdev 12c.
    I wanna create a custom declarative component like this:
    container.jsf :
    <af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}"
                             inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};">
            <af:panelGroupLayout id="#{attrs.Name}" layout="scroll"
                                 inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;">
            </af:panelGroupLayout>
        </af:panelGroupLayout>
    <af:xmlContent>
            <afc:component>
                <afc:description/>
    </af:xmlContent>
    I use this custom component to group some child components like this:
    <abc:container ...>
         <af:inputText ... />
         <af:inputText ... />
    </abc:container>
    But the things is in Java code, I cannot get RichInputText components :
    this is my function:
        private void getFacetAndChild(UIComponent parent) {
            Iterator childrens = parent.getFacetsAndChildren();
            while (childrens.hasNext()) {
                UIComponent child = (UIComponent)childrens.next();
                System.out.println("Log child >> " + child);
                getFacetAndChild(child);
    this function only print the second RichPanelGroupLayout.
    Any ideas to help me to get all RichInputText ?
    Thanks and Best Regards!

    Hi All,
    I found the solution. Just add one facet to Custom Container
    <af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}" 
                             inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};"> 
            <af:panelGroupLayout id="#{attrs.Name}" layout="scroll" 
                                 inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;"> 
                           <af:facetRef facetName="child"/>
            </af:panelGroupLayout> 
        </af:panelGroupLayout> 
    <af:xmlContent> 
            <afc:component> 
                <afc:description/> 
    </af:xmlContent> 
    And the used page:
    <abc:container ...>
         <f:facet name="child">
              <af:inputText ... />
              <af:inputText ... />
         </f:facet>
    </abc:container>
    Maybe this solution will help others to create a custom container
    Thanks and Best Regards!

  • Dynamic Declarative Component managed bean returned null

    Hi,
    In a project from an application a DDC component is defined. This component uses a managed/backing bean with view scope.
    Using this component inside this project is working fine. This component should be used in other view controller projects, and here where the problems are.
    This project(let's call it Common) is deployed as ADF Library jar, and used in the other V-C projects.
    The big problem is that the managed bean defined for the logic of this component is not 'reacheable'.
    (Another problem is that the attribute value is not seen as its EL expression but as string, for this i found a workaround.)
    In project Common the adfc-config.xml file:
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <managed-bean id="__4">
        <managed-bean-name id="__2">ExtendedShuttle</managed-bean-name>
        <managed-bean-class id="__1">com.xyz.portal.taskflow.common.extendedshuttle.ExtendedShuttle</managed-bean-class>
        <managed-bean-scope id="__3">view</managed-bean-scope>
      </managed-bean>
    </adfc-config>A part from component declaration:
          <af:table var="row" rowBandingInterval="0" id="ta"
                                  rowSelection="multiple" columnStretching="last"
                                  disableColumnReordering="true" fetchSize="-1"
                                  binding="#{viewScope.ExtendedShuttle.allItemsTable}"
                                  value="#{viewScope.ExtendedShuttle.allModel}"
                                  partialTriggers="::dc_cb5 ::dc_cb3"
                                  filterVisible="true"/>The root exception is :
    javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
    This exception is throw on com.sun.faces.application.ApplicationImpl.createComponent when *#{viewScope.ExtendedShuttle.allItemsTable}* is evaluated.
    Caused By: javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:262)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:510)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:661)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:70)
         at oracle.adfinternal.view.faces.taglib.UIXTableTag.doStartTag(UIXTableTag.java:41)
         at oracle.adfinternal.view.faces.unified.taglib.data.UnifiedTableTag.doStartTag(UnifiedTableTag.java:50)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
    Caused By: javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:262)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:510)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:661)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:70)
         at oracle.adfinternal.view.faces.taglib.UIXTableTag.doStartTag(UIXTableTag.java:41)
         at oracle.adfinternal.view.faces.unified.taglib.data.UnifiedTableTag.doStartTag(UnifiedTableTag.java:50)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
    Caused by: javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
         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:259)
    Can you help figure it out, why is not working or why the managed bean is not visible in other projects but only in the one where the component is defined?
    Thank you for your time,
    Bogdan
    ps: how can i format the source code, on this fourm?

    Hi Frank,
    Thank you for the answer.
    I must say i'm quite new with ADF technology and maybe my questions are silly.
    Here is a Quote from "Oracle Fusion Developer Guide - Building Rich Internet Application with Oracle ADF" by Frank Nimphius and Lynn Munsinger Chapter 15 page 498:
    "You build dynamic declarative components *instead* of tag library based declarative components, if component resuse is required *only within the application* that has the component defined."
    Maybe i misunderstand the meaning of application from this sentence, but i need this component in several ViewController projects from only one application (ADF application).
    Tag lib declarative component I would not like to have, since the (automtically) build process is not my responsability and it will take some time till is pinpointed, but still is a last resort.
    Anyway two things are strange:
    1. Why the component is still available in other projects(and the beans not)?
    2. Why when a binding variable (for example: of type FaceCtrlHierBinding) has the correct type in the declarative project and in the order projects is of type String and its value is the variable name?
    Example:
    <af:declarativeComponent ...
    AllItems="#{bindings.Action}"
    In project where the component is declared its value is an instance of FacesCtrlHierBinding and in the rest of the projects is of type String with value "Action".
    Once again thank you a lot,
    Bogdan

  • Tag Library for Declarative Component

    Hi
    Using JDev 11gR1. I'm new to tag libraries and have the following question...
    How do I deploy a JAR file with a declaritive component as a JSP tag Library? I have created a new project, created a new tag library in the project (.tld file) and created a reusable toolbar in the project. How do I include the tags and attributes of the declarative component in the .tld file? Do I just edit the file or have I missed some steps which would have done this.
    When creating the new declarative component I did us the "Add Tag Library..." button to specify the tag library in the project.
    All declaritive component examples / tutorials / blogs / ADF dev guide, I find just tell you to deploy the jar file as a tag library and include it in the project to use it, but I can't find anything telling you how to deploy it as a tag library. Any help or references to examples will be great.
    Thanks
    Mario

    Shay, thanks for the reply.
    I started off following Grant's article which you referred me to, but ran into the problem I'm having now. Just tried it again and still no luck.
    I created a declarative component in a new project, setup the deployment profile to deploy to an ADF Library JAR and deployed it. Then I add the directory for the JAR to my Resource palette and add the JAR to the project which will be using it.
    But that's as far as I get, still nothing shows in my Component Palette.
    That's when I started on the wild goose chase of the TLD file. I looked at Andrejus' blog posting, [http://andrejusb.blogspot.com/2009/10/custom-declarative-components-in-adf.html| [http://andrejusb.blogspot.com/2009/10/custom-declarative-components-in-adf.html|http://andrejusb.blogspot.com/2009/10/custom-declarative-components-in-adf.html]] and the source and realised he has a tld file inside his generated JAR. Which lead to my question as to when this get's generated / defined?
    Any ideas what I could try to get my Components to display in the Component Palette?
    Thanks,
    Mario
    Edited by: Mario Ribeiro on Oct 28, 2009 10:10 AM

  • Declarative component - data getting vanished

    Hi, Greetings.
    In our application we have a declarative component to display some common information and is used across the screens.
    The declarative component is binded with a view object to display data.
    All our screens are of bounded taskflow kind and each taskflow's property are set to use new transaction always and not to share data controls.
    Using breadcrum, we have implemented a workflow to navigate to next few screens.
    In this scenario, while navigating forward from one screen to another screen, everything works as exprected. So far, so good.
    But, while navigating back to any previous screen, the declarative component data is missing initially. The declarative component's data gets displayed once we perform some full page submission using some action buttons or in case any validation message gets popped up.
    I checked the program flow and the data to the declarative component's view object is getting executed and data is available at model layer.
    I also tried refreshing the component through my bean after performing an initial activity method call.
    Nothing works out.
    How can I make the declarative component display the records during initial launch of the screen.
    Any help in this regards is greatly appreciated.
    Thanks and regards,
    Guru K

    Hi, Greetings.
    The problem is with refreshing the iterator. On providing refreshCondition property for the iterator in the corresponding pagedef file as well as for the UI component, the issue got resolved.
    Thanks and regards,
    Guru K

  • Using data controls in a Declarative Component

    Hi,
    I'm trying to create a Declarative Component that uploads a file and update a database table, I've created an entity and a updatable view object of the table. When I put the Declarative Component in another project it renders correctly but the af:table that shows the database records show me "Access Denied". When I try to list the datasources available programatically it does not show the DS I've created in the declarative component project. How do I access this datasource?

    Hi,
    you expose an attribute on the declarative component that then you pass in the binding reference to access the View Object. If you expose an attribute of type DCIteratorBinding, then this can take an iterator reference (EL) as the input. In a managed bean in the declarative component you then resolve the #{comp} EL string (its a variable defined on your declarative component to point to itself) to access the attribute and get a hold to the iterator binding you passed in.
    See sample 24 for a simplified version of what I decsribe: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
    Frank

  • 11.1.2: Declarative-component problem!

    Hi!
    We're just evaluating 11.1.2. I converted some declarative components to 11.1.2/Facelets style, but I am running into problems.
    As a test, I created some new components from scratch, confirming the issue.
    I create a declarative component and choose "Facelets" and choose "Use custom component class".
    JDeveloper then creates an entry in the jsf:
            <afc:component>
                <afc:display-name>testComponent</afc:display-name>
                <afc:component-class>component.TestComponent</afc:component-class>
                <afc:facet>
    ....After deployment, I just get an error. Facelets is reporting that there is no tag for "component-class", and examining component.taglib.xml in adf-richclient-impl-11.jar shows: Facelets is right! There is none!
    Now, I cannot just remove the component-class entry. If I do that, then deployment works, but then JDeveloper creates during compilation a wrong "TestComponentComponent" class (which should extend TestComponent but doesn't!).
    It just extends RichDeclarativeComponent, just like my original TestComponent class. All code in TestComponent is not available at runtime.
    RichDeclarativeComponent
       |
       |
    TestComponent    <---- This class is now for the birdsand
    RichDeclarativeComponent
       |
       |
    TestComponentComponent      <----- That class is used by the handlerIf I leave the component-class entry in, then - as expected - I get the correct hierarchy:
    RichDeclarativeComponent
       |
       |
    TestComponent
       |
       |
    TestComponentComponentbut the component doesn't run.
    So, now what? This cannot be the way it's supposed to work, can it. Manually edit the "component-class" stuff out of the jsf in the jar after deployment!?
    Edit: Created SR 3-3856944401: Facelets-based declarative component with custom component class not working
    Sascha
    Edited by: Sascha Herrmann on Jun 17, 2011 6:41 PM

    This is bug 12717940.
    Sascha

  • Error while saving changes of declarative component to MDS

    Hi,
    Using ADF Faces 11gR1PS1.
    I am trying to create a declarative component where user can close a panel box (not just minimize) by setting rendered property to false. It works fine.
    Next I tried to save the attribute change to MDS so that user settings are preserved across sessions. However I got the following error:
    <FilteredPersistenceChangeManager><_getQualifiedTagName> WebAppDesignContext is not available at application scope. Please ensure that your application is built as a 'Fusion Web Application (ADF)', and that taglib.jar and facesconfigmodel.jar are in class path.
    <FilteredPersistenceChangeManager><_isChangeAllowedThroughPersistentChangeManager> Could not obtain tag name for the component being changed. Component ref: RichPanelBox[UIXFacesBeanImpl, id=dc_pb2]
    <FilteredPersistenceChangeManager><_addDocumentChangeImpl> The DocumentChange is not configured to be allowed for the component: RichPanelBox[UIXFacesBeanImpl, id=dc_pb2]Following is the page code:
              <af:panelBox text="#{attrs.p2Header}" id="dc_pb2"
                           rendered="#{attrs.p2Header ne null and dashboardXBean.portletRendered.dc_pb2}"
                           showDisclosure="false">
                <af:componentDragSource discriminant="portlet"/>
                <f:facet name="toolbar">
                  <af:commandImageLink id="p_cil2"
                                       icon="/images/removeselected_dwn.png"
                                       hoverIcon="/images/removeselected_ovr.png"
                                       depressedIcon="/images/removeselected_ena.png"
                                       actionListener="#{dashboardXBean.handleHideEvent}"
                                       rendered="#{attrs.sideNavRendered}">
                    <f:attribute name="portletId" value="dc_pb2"/>
                  </af:commandImageLink>
                </f:facet>
                <af:facetRef facetName="p2"/>
              </af:panelBox>Following is the code in the managed bean to persist changes:
        private void saveShowHideChange(String portletId, boolean isRendered) {
            FacesContext fc = FacesContext.getCurrentInstance();
            ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
            //ChangeManager pcm = AdfFacesContext.getCurrentInstance().getPersistentChangeManager();
            UIComponent puc = boundedDashboard.findComponent(portletId);
            ComponentChange pcc = new AttributeComponentChange("rendered", Boolean.toString(isRendered));
            cm.addComponentChange(fc, puc, pcc);
        }I am not really sure if the above code needs to be in the component managed bean or in the bean of the page that uses this declarative component.
    Any pointers are appreciated.
    Thanks,
    Husain

    Thanks for the reply Frank.
    For declarative components do we have separate renderer?
    The [Developers Guide|http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/ad_persist.htm#BABBGCJA] didnt seem very helpful on this topic.
    Can you point me to some reference material if available.
    Thanks,
    Husain

  • JDeveloper 11.1.2.3, ADF Faces: need declarative component idea for table

    Some background:
    I'm trying to create a reusable toolbar for standard af:table behavior, see screen shot
    http://wesfang.files.wordpress.com/2013/05/dc.jpg
    I got the idea from the from using documentation Frank has published in the past
    1. http://www.oracle.com/technetwork/developer-tools/adf/learnmore/001-access-declarative-comp-attr-169113.pdf
    2. Adding a new row programatically
    The consuming subsystem's page passes in a "MyPageBean" which is a subclass of a "ArchBean" where all actionlistener operations are defined. The idea here is to minimize developer customization when using this component.
    ... <f:facet name="toolbar">             <af:toolbar id="t2">                 <mskcc:basicTransactionToolbar id="btt1" pageBean="#{MyPageBean}" tableId="t1"/>             </af:toolbar> </f:facet> ...
    The table within the consuming page is by default dropped off as a "editable" table. The developer needs to further modify the "disable" attribute to true for all the input fields and command components within the table. I would like to remove this developer step and instead have it in an architectural component. All ideas are welcome.

    Ok, finally got it working (sort of)
    Using the following method as you suggested:
    public void encodeChildren(FacesContext fc){
            try {          
                super.encodeChildren(fc);
                RichTable table =
                    (RichTable)ADFFacesUtil.findComponentInRoot((String)this.getAttributes().get("tableId"));
                lockUnlockTable(table); //method for toggling disable attribute for all command and input components
            } catch (IOException e) {
                e.printStackTrace();
    }Now the strange problem I encountered is that the encode methods are not called if the declarative component is defined within a panelCollection's f:facet-toolbar like below:
    <f:facet name="toolbar">
                        <mskcc:basicTransactionToolbar id="btt1" tableId="t1" pageBean="#{TestBean}"/>
    </f:facet>Also the above code has to be manually created because the design time editor does not allow me to drop off the dc within the toolbar facet (even though the dc is a toolbar!)
    Instead, If I move the dc outside the panelcollection, then the encode methods are invoked and the desired enable/disable behavior is correctly displayed.

  • JDeveloper 11.1.2.3, ADF Faces: declarative component does not support af:clientListener?

    I am trying to create a declarative component with the following code:
    <?xml version='1.0' encoding='UTF-8'?>
    <af:componentDef xmlns:af="http://xmlns.oracle.com/adf/faces/rich" var="attrs" componentVar="comp" definition="private"
                     xmlns:afc="http://xmlns.oracle.com/adf/faces/rich/component">
        <af:xmlContent>
            <afc:component>
                <afc:display-name>DoubleClickTableDialogClientServerListener</afc:display-name>
                <afc:component-extension>
                    <afc:component-tag-namespace>org.mskcc.crdb.common.declarativecomponent</afc:component-tag-namespace>
                    <afc:component-taglib-uri>http://www.mskcc.org</afc:component-taglib-uri>
                </afc:component-extension>
            </afc:component>
                <af:clientAttribute name="serverListenerType" value="TableDoubleClickEvent"/>
                <af:clientListener method="handleTableDoubleClick" type="dblClick"/>
                <af:serverListener type="TableDoubleClickEvent"
                                   method="#{EditAddDialogTemplateBean.handleTableDoubleClick}"/>
        </af:xmlContent>
    </af:componentDef>
    At runtime I recieve the following error:
    javax.faces.view.facelets.FaceletException: ADF_FACES-60023:Component: DoubleClickTableDialogClientServerListenerComponent[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@7170a7, id=dctdcsl1] does not support client listeners.
      at oracle.adfinternal.view.faces.facelets.rich.BaseClientListenerHandler.apply(BaseClientListenerHandler.java:53)
    This component was intended to be dropped off within an af:table component. I would like to hear suggestions on workarounds, one other way I thought about was to create a code template for the three tags, however, the con to this approach is each developer would need to configure this template within jdeveloper. Ideas are appreciated.
    Also a side question, how can I embed code properly with the new forum? [code] tag does not seem to work now.

    Wes, can't help with the real question, but can tell you how to format code
    Change to the advanced editor (top right over the editor field), then you get more options. The one you are looking for is behind the blue '>>'. Here you select the language you want to insert and you get nice code formatting and color.
    Timo

Maybe you are looking for

  • How to setup HTTPS in a dev environment

    I am working off of a RedHat OS running Jboss 5.1 and ATG 10.0.3 on a VM. I have a web service which I need to integrate with and it requires an https connection. So my thought here was to go down the road of doing a self signed cert. Now, I followed

  • Bind Variable : required - no message, not required - error

    hi Please consider the example application created using JDeveloper 11.1.1.6.0 at http://www.consideringred.com/files/oracle/2012/RequiredOrNotBVarApp-v0.01.zip It has these View Objects defined - EmployeesReqNoValueBVarVO which has a required Bind V

  • Best practices for 2 x DNS servers with 2 x sites

    I am curious if someone can help me with best practices for my DNS servers.  Let me give my network layout first. I have 1 site with 2 x Windows 2012 Servers (1 GUI - 10.0.0.7, the other CORE - 10.0.0.8) the 2nd site connected via VPN has 2 x Windows

  • Concurrent manager hands

    Dear all, Recently I'm facing weird situation. Suddenly the concurrent manager hangs. It doesn't show "Inactive Manager" It just doesn't progress. It stays on "Pending Normal" Neither a restart of the CM, nor restart of the whole application (and the

  • Junk displayed on screen

    new to firefox 19.0... have windows xp and ie8 and have no problem reading news paper via link sent in e-mail... Started using e-mail on fire fox... I do get some ads with jibberish.. I dont care... but cant read the newspaper when I use the link via