Forum Stats

  • 3,874,066 Users
  • 2,266,672 Discussions


af:region in af:iterator

Michael Shapira
Michael Shapira Member Posts: 434
edited Jan 12, 2014 6:57AM in JDeveloper and ADF

HI. I am on Jdev R2

I have an af:iterator

and a region.

Region accepts one parameter P_BIN_ID and uses it to execute the query with params.

I put the region inside the iterator. Iterator bound to MyVOIterator1 which has binId as one of the attributes.

My expectation is when I open the page on each record for iterator I see a different result set from the region.

For this for region parameter P_BIN_ID I set #{binding.MyVOIterator1.currentrow.binId}

It is work only partially.

The first record in af:iterator displays the region correctly, but the rest of rows are displaying exactly the same data as FIRST row. Which mean they all got same "binId" as parameter.

Please advice how can I get a proper result so the region on each af:iterator row will display a data relevant to row binId and not the first row binid



  • Stiff
    Stiff Member Posts: 6
    edited Jan 8, 2014 3:26PM


    It is impossible to use af:region inside af:iterator and af:forEach as said here: ADF RichClient API - af:region

    Each region should be bound to personal taskFlow binding record. See implementation of UI Shell template - they placed there 20 blank taskflows and changing them when they need. I already tried to do dynamic panels in that way. It worked. I suggest you to try to do the same.

  • Frank Nimphius-Oracle
    Frank Nimphius-Oracle Member Posts: 29,689 Bronze Badge


    the question has two aspects:

    1. iterating over a collection to stamp regions

    You can't. Work around is to use multiple region bindings introduced in 11g R2 and 12c

    Decompiling ADF Binaries: Creating Task Flow bindings on the fly

    2. Using the same task flow in different regions but showing different data



    StiffFrank Nimphius-Oracle
  • Here are the results. I tried to create multiTaskFlows on the page. Actually the task flow I am trying to reuse is comming from ADF jar library that I imported to my applicaton

    Here is the code.


    public class DynamicTaskFlow {

        public          List<TaskFlowBindingAttributes> taskFlowBindings = new ArrayList<TaskFlowBindingAttributes>(); 

        public Map []  map = new HashMap[100]; 


        public DynamicTaskFlow() {



        public List<TaskFlowBindingAttributes> getTaskFlowList() {

                List l = new ArrayList();






                for (int i=0;i<4;i++) {

                    TaskFlowBindingAttributes tfBindAttr2 = new TaskFlowBindingAttributes(); 


                     tfBindAttr2.setTaskFlowId(new TaskFlowId("/WEB-INF/tags-flow.xml", "tags-flow")); 


                     map[i] = new HashMap();

                     map[i].put("BeanId", 1);

                     map[i].put("entryId", l.get(i));

                     map[i].put("ParentType", "NEWS");





                return taskFlowBindings;


        public void setMap(Map[] map) {

   = map;


        public Map[] getMap() {

            return map;



    But I get some error message that doesn't tells me what is the root cause of the error

    Error 500--Internal Server Error

    javax.el.PropertyNotFoundException: Target Unreachable, 'tags' returned null 

    Obviously some EL expression with "tags" didn't work.

    But in my page I don't have it at all


    <af:document title="TestMultiTaqskFlow.jspx" id="d1">

                <af:messages id="m1"/>

                <af:form id="f1">

                    <af:panelStretchLayout id="psl1">

                        <f:facet name="center">

                            <af:iterator id="i1" value="#{bindings.NamNewsVO1.children}" var="news">

                                <af:panelBox text="PanelBox1" id="pb1" showHeader="always">

                                    <f:facet name="toolbar"/>

                                    <af:panelGridLayout id="pgl1">

                                        <af:gridRow marginTop="5px" height="auto" id="gr12">

                                            <af:gridCell marginStart="5px" marginEnd="5px" width="100%" id="gc12">

                                                <af:outputText value="Some" id="ot12"/>



                                        <af:gridRow marginTop="5px" height="auto" id="gr1">

                                            <af:gridCell marginStart="5px" marginEnd="5px" width="100%" id="gc1">

                                                <af:outputText value="#{news.Comments}" id="ot1"/>



                                        <af:gridRow marginTop="5px" marginBottom="5px" height="auto" id="gr2">

                                            <af:gridCell marginStart="5px" marginEnd="5px" width="100%" id="gc2">

                                                <af:forEach var="tf" items="#{bindings.tagsTasKFlow.taskFlowBindingList}">

                                                    <af:region value="#{tf.regionModel}" id="r1"/>







                            <!-- id="af_one_column_stretched"   -->


                        <f:facet name="top">

                            <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"

                                              text="ExecuteWithParams" disabled="#{!bindings.ExecuteWithParams.enabled}"







    Probably it is somehow related with the fact that the task-flow is from external jar.

    Any ideas?

This discussion has been closed.