Regions & contextual events

Hi,
I am trying to rebuild an 10g webcenter application that used portlets and inter-portlet communication. The use case I have is:
- one task flow where we have a bpel task list. User can click a task to select it
- selecting the task should transmit the task type and id to the main page
- another task flow on the page should, depending on the task type, be shown with id as an input parameter.
Can this kind of a dependency be created, and if so, how?
Regards,
Jeroen van Veldhuizen

Hi,
is taskflow "one" a region? If yes then this would require a contextual event to propagate the selection and the payload. You could then set a vaue e.g. in a managed bean and issue a PPR on the region that should show based on the value.
An alternative to using contextual events would be to use JavaScript. JavaScript in a region can be used to call components on the parent page. The drawback of using JavaScript tough is that it tightly binds th regions to the page, which means you loose the loose coupling. So contextual events may look better (though it comes with more overhead)
Frank

Similar Messages

  • Triggering Validation in a Region Through a Contextual Event

    I am using JDeveloper 11.1.1.6.0.
    I am trying to find out how to trigger the built in validation that occurs normally when a "submit" action occurs, but have the submit action occur outside of a region, and the validation also occur in the region itself.
    I have a page that contains a dynamic region in it. I will refer to the containing page as the parent and the region as the child. The parent region and child region both have different business objects bound to them, though they are part of the same application module. The parent page contains a submit button that needs commit the user entered data in both the parent and child pages. This action must not proceed if there are any validation errors in the parent or the child. The validation should trigger on the parent page without any work from me because of how ADF handles the situation. The child page is notified of the submit action via contextual events. I currently have it where this event can trigger the "commit" action successfully, but I have no idea how to go about ensuring that it triggers a validation check as well.
    The overall flow that I think will happen in the final version is likely:
    1: submit button pressed.
    2: parent page validation is checked (if success, proceed)
    3: contextual event is fired
    4: contextual event is received by the child.
    5: the child triggers its own validation (if success, proceed, else stop)
    6: the child triggers a commit action
    7: the child sends a response contextual event (signalling that it was successful)
    8: the parent receives the response contextual event
    9: the parent performs a "commit" action.
    I do not know how to cause step 5 to occur, and I do not know if steps 7 through 9 are needed yet (I haven't tested to see if causing the commit in either the parent or the child ends up causing all modified entity objects to be committed). Any help would be greatly appreciated.
    Thank you

    Hi,
    you can access a command button on the page fragment and queue its action event. For this you access a managed bean (backingBean Scope) that contains a handler to the command button and queue the event (this then will perform validation as if the user clicked it. The command button can also be hidden on the fragment.
    Have a look here for how you can integrate the managed bean as the contextual event handler
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/regionpayloadcallbackpattern-1865094.pdf
    Frank

  • Contextual Event Automatically refreshing child regions

    Hello,
    Here's my dilemma. We have an ADF page fragment that contains three regions(which point to 3 different bounded task flows). Lets call the bounded taskflows btf1, btf2, and btf3.
    What currently happens is we use contextual events to create communication between (btf1 and btf2) and communication between (btf2 and btf3)? We do not have contextual event that would allow communication between btf1 and btf3.
    So we currently have this communication working. Hence, when I hit a button in btf1, it fires off a contextual event, such that btf2 is refreshed. But what is happening here, is that btf3 is also being refreshed. We DON'T want THIS... We only want btf3 to be refreshed from an event that is fired from btf2.
    Question. Is there a way to restrict ADF from refreshing btf3 everytime and event is fired from btf1.
    In general, it seems as though all regions are being refreshed everytime a contextual event is fired. We don't want this. How can disable this from happening? We have checked all of wiring. There is no connection between btf1 and btf3.

    Try creating the event mapping - please see "28.7.2 How to Create Contextual Events Manually" in Dev Guide http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_adv.htm#CACJBFGI

  • How to subscribe contextual event rised in a Dynamic Region

    Hi all,
    i can subscribe contextual event rised in a region.
    but when it comes to Dynamic Region, i cannot find available contextual event in the "Select Contextual Event" dialog.
    Is there a way to subscribe contextual event rised in a Dynamic Region?
    Thanks

    Hi,
    for dynamic regions you don't subscribe to a contextual event producer but only the event name (which you type in). The producer name will then be wildcarded '*'. The visual dialog will shows <Empty> by default, indicating a wild card provider.
    Frank

  • How to publish contextual event from dynamic region

    Hi Experts, plz help.
    Scenario :
    I have a page , say Page A.
    I have two bounded task flows, say HeaderTF and LinesTF.
    HeaderTF is placed as a static Region in page A and LinesTF is a dynamic region in page A.
    LinesTF has a table with Amount Column.
    HeaderTF has a text field which shows the total of amount column.
    Requirement :
    when user adds new rows or changes existing rows or deletes any rows in LinesTF, total field in HeaderTF should be updated.
    On change of amount value in lines, I am calculating and updating the total attribute of header VO as all of them are sharing same DC.
    but the value is not reflecting becos partial triggers cannot be kept for total field.
    So I am using contextual events.
    I created a contextual events for amount field, delete button and table as well (In LinesTF).
    and I created handler method in AM which calculates total and dragged it as a text field in HeaderTF.
    Now when I am trying to subscribe from pagedef of pageA, i am able to find the handler which is created in HeaderTF but could not find any contextual events in event lov.
    Question :
    1. Is my approach correct?
    2. Cant we publish contextual events from dynamic regions?
    3. Is there any alternate way of achieving this?
    I did not try refreshing HeaderTF by passing input params because I dont want the entire region to be refreshed.

    Try creating the event mapping - please see "28.7.2 How to Create Contextual Events Manually" in Dev Guide http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_adv.htm#CACJBFGI

  • Contextual Event refresh/redraw issue between 2 regions (taskflow w/ jsffs)

    Working on JDev 11.1.1.2.0
    I have one jspx
    which contains 2 regions - bounded taskflow with jsffs
    Now, I want to communicate between region1 and region2
    so, producer is : region2pageDef and consumer is: region1pageDef, and Handler is pointing to a Java Bean Data Control , listening for ActionEvent
    Contextual events works fine as expected , but when region1 listenes the contextual event , at that time entire jsff gets refreshed / redrawn, why?
    How contextual event works from the ADF side ,and what causes it to redraw the page fragment
    Thanks

    When I have 3 dynamic regions on a jspx page, where every region loads taskFlow with jsff page.
    One of the pages produces the contextual event, the other receives the contextual event and the 3rd one does nothing.
    Then 3rd region is not refreshed. It works correctly.
    But when I place eventMap in the pageDef of the jspx page, then all regions are refreshed no matter if they receive the contextual event.
    This is not the right way. Why is that? Do you have an idea?
    I am using JDev 11.1.1.3.0
    Edited by: Nikolay Minchev on Dec 22, 2010 2:44 AM

  • Dynamic TaskFlow Gets Refreshed on Catching a Contextual Event

    Hi,
    I am using Contextual events in my application. I have 2 task flows in my parent page. One TF is raising an event and the other is catching it. As my catching TF is a dynamic TF, I have specified the event map in it only.
    Everything is working as intended only that my dynamic TF gets refreshed when it catches the event! I do not want that. I want to explicitly refresh any UI component that requires to be refreshed, not the whole TF.
    So is there any specific property of task flows that make it to refresh itself when ever it catches any contextual event?
    Also I have tried 'Refresh="ifNeeded"' and 'RefreshCondition="#{false}"' in my dynamic taskflow specification in the parent page but it does not make any difference.
    Regards,
    Rahul Saxena

    Rahul,
    there is no setting for this. If however the managed bean you setup for handling the dynamic region is in backing bean scope (or request scope) then chances are that the region is refreshed because the bean restes after the request (just assuming here). Yournot giving us much to chew on (no JDeveloper version, no implementation details etc. ) So its hard to provide further ideas. As a last resort, if you have a support contract, you can contact customer support with a test case
    Frank

  • Task Flow Exit Using contextual Events ??

    I am using Jdeveloper 11.1.1.5.
    My application has a page which has two regions in it.
    First region has a bounded task flow with just one fragment in it(Just with a button)
    and Second region has a BTF which has five fragments in it(which is a kind of train process).
    On clicking the button in the first region I want to exit and reenter the bounded Taskflow in the second region.I am trying to do this using contextual events but the exit and reentry doesn’t happen as expected.
    For example - if the user is in the third fragment of the second region and clicks the button in the first region, then the task flow should exit and the control should go to the first fragment in the second region.
    In the consumer method I am returning the “action” string which will call the “TaskFlow Return call” activity but the “TaskFlow return call is not being called.
    Could some one help me resolve this issue.
    Thanks in advance.
    - Pani

    I am using Jdeveloper 11.1.1.5.
    My application has a page which has two regions in it.
    First region has a bounded task flow with just one fragment in it(Just with a button)
    and Second region has a BTF which has five fragments in it(which is a kind of train process).
    On clicking the button in the first region I want to exit and reenter the bounded Taskflow in the second region.I am trying to do this using contextual events but the exit and reentry doesn’t happen as expected.
    For example - if the user is in the third fragment of the second region and clicks the button in the first region, then the task flow should exit and the control should go to the first fragment in the second region.
    In the consumer method I am returning the “action” string which will call the “TaskFlow Return call” activity but the “TaskFlow return call is not being called.
    Could some one help me resolve this issue.
    Thanks in advance.
    - Pani

  • Communication through contextual events in ADF 11g?

    hi everyone ,
    I have a requirement that i have to establish a communication between two taskflows and communication between page and the two taskflows at a time through contextual events
    I'm able to establish a communication between two taskflow regions but when it comes to establish a communication between a page and two taskflows at a time the two taskflows are rendering but the region in page s not
    (when i click deptno in taskflow region ,the employee table is displayed according to the deptno in another taskflow and the region contains output text is not at all rendering according to the deptno)
    plz do this needful
    thanx in advance

    Hi,
    contextual events are between active PageDef files. This means that if a task flows is not displayed on a view, then it is not included in contextual event communication.
    Frank

  • Contextual Event on row selection in the table

    Hi,
    My taskflow has just a view activity which queries a view object and displays results as a table. This taskflow is inserted in the main page as a region. I have set up a selection listener on the table, to map to a method in a managed bean. I have made this method binding a producer of my contextual event. and another method binding on the main page as a consumer. I have mapped producer and the consumer on a event map on the main page.
    My problem is when a row is selected in the table, I see the method (in the selection listener) is called but the event is not fired and the consumer method is not called. I don't know, if it is because the producer method (selection listener) takes SelectionEvent as a parameter?.
    I added just to test, a button on my view activity and mapped the action listener to another method(with out parameters) on the same managed bean and made this a producer. In this situation the event got fired and the consumer method got called.
    Why is the selection listener method not firing the event?
    Thanks in advance.

    Hi,
    the two events that are supported for ADF Faces component events are ActionEvent and ValueChangeEvent. So if you have a selection event, you need to take this infromation and create an ActionEvent from it.
    http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/event/ActionEvent.html
    Frank

  • Contextual event in reverse direction ( from child TF to parent view )

    Hi ,
    It seems all example of Contextual events talk about mirroring input value from Parent page to Child TF running in a region and there are numerous examples out there.
    What I wanted to accomplish was that an lov in a child TF triggers a contextual event and the parent TF takes the selected list of values. It needs to conduct a search based on these values and than mark the rows in a (tree)table.
    What has succeeded is almost all aspects of this. I can fire the event and receive it successfully. But the problem is the the backingBean class that I create via EL is not binded to my parent pages components. The treetable component returns null.
    My handler code (the handler code from the bean which you use to create the data control to listen to the cntxtual event) is almost 1:1 to as the code from the book "Oracle Fusion Developer Guide: Building Rich Internet Applications with Oracle ADF Business Components and Oracle ADF Faces", Chapter 6, page 210.
    public void receiveEvent(
    DCBindingContainerValueChangeEvent incomingPayload){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    Application app = fctx.getApplication();
    ExpressionFactory exprFactory = app.getExpressionFactory();
    ValueExpression valExpr = exprFactory.createValueExpression(
    elctx,
    //reference the managed bean that holds the mirror value
    //property displayed in the input text field
    "#{backingBeanScope.ConsumerBackingBean}",
    Object.class);
    ConsumerBackingBean consumer = null;
    consumer = (ConsumerBackingBean)valExpr.getValue(elctx);
    //get the changed attribute value from the contextual event
    //payload
    String newValue = (String)incomingPayload.getNewValue();
    //set the new value to the backing bean property that is
    //referenced by the input text field in View 3
    consumer.setMirrorValue(newValue);
    AdfFacesContext adffacesContext = null;
    adffacesContext = AdfFacesContext.getCurrentInstance();
    //partially update the text field to display the new value
    adffacesContext.addPartialTarget(consumer.getMirrorTxt());
    The #{backingBeanScope.ConsumerBackingBean} evaluates in my case to fine. But every component I should see as binding in the bean is null.
    Since the handler is declared in the pageDef of this parent page Fragment, i assumed the last bit about it being able to get to the backing bean and hence to my components should also be possible.
    If I cant refresh my components than I dont see the use of the contextual frameworks for me.

    You should find this post useful: http://flexponential.com/2010/12/05/saving-scroll-position-between-views-in-a-mobile-flex- application/
    It demonstrates one way of saving and restoring data when pushing and popping a view.

  • Contextual event on table not triggered

    Using Jdev PS4.
    Concider following example: http://www.yonaweb.be/ContextualEvent.zip
    (I know following example can be simplified by using master-detail relation in the data control but it's to illustrate the example)
    I have two taskflows: EmployeeTF and departmentTf.
    The idea is to trigger an event when I select a new record in the department table.
    This is the tree binding:
    <tree IterBinding="DepartmentsIterator" id="Departments">
          <nodeDefinition DefName="model.views.DepartmentsView" Name="Departments0">
            <AttrNames>
              <Item Value="DepartmentId"/>
              <Item Value="DepartmentName"/>
              <Item Value="ManagerId"/>
              <Item Value="LocationId"/>
            </AttrNames>
            <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
              <event name="changeTheDept"
                     customPayLoad="${bindings.DepartmentId.inputValue}"
                     eventType="Currency Change Event"/>
            </events>
          </nodeDefinition>
        </tree> I have created a custom java class to use as a data control to find out when the event is triggered. This is my code:
        public void handleEvent(Object payload){
            System.out.println("Event handler");
            System.out.println(payload);
        }When I select a record in the table, the event does not get fired.
    So as a test I added my own custom method to see if contextual events are working properly so I added this method to my DC:
        public void triggerEvent(){
            System.out.println("triggering event");
        }and added it on a commandLink to the DepartmentTF. I also added an event on it:
    <methodAction id="triggerEvent" RequiresUpdateModel="true"
                      Action="invokeMethod" MethodName="triggerEvent"
                      IsViewObjectMethod="false" DataControl="EmpBean"
                      InstanceName="EmpBean.dataProvider">
          <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
            <event name="triggerEvent"
                   customPayLoad="#{bindings.DepartmentId.inputValue}"/>
          </events>
        </methodAction>When I trigger this event, my event handler does get called on the employee taskflow.
    So, my question is:
    1) Is this normal behavior that the change row event is not triggered?
    2) if yes, how do I trigger it or what is the purpose of this event?
    Edited by: Yannick Ongena on May 28, 2012 9:03 PM

    I have a similar circumstance: I have a page with two regions, each region contains a table. The two tables share some information so when I update one of them
    I also want the change to be reflected in the other table. I tried to use contextual events to send an event that causes one of the tables to refresh (I do not pass any payload)
    but so far I have not had any success with making this work. I am wondering if the bug you mentioned here would also prevent such a setup to work? I am using Jdev 11g R1 11.1.1.6.2.

  • Contextual event closes the af:popup from which it is generated ?!?

    Hi all
    I have task flow (isloated mode) embedded as region in af:popup.
    One from my popup's button action generates contextual event.
    But that event unexpectedly closes my popup.
    Any idea why ?
    Here is relevant pageDef settings.
    From page fragment where is event generated :
        <action id="Commit" InstanceName="EmpAppModuleDataControl"
                DataControl="EmpAppModuleDataControl" RequiresUpdateModel="true"
                Action="commitTransaction">
          <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
            <event name="empCommit"
                   customPayLoad="${bindings.VOIterator.currentRow.key}"/>
          </events>
        </action>From page fragment pageDef's where is consumer registered :
      <eventMap xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
        <event name="empCommit">
          <producer region="createeditemptf1.create_edit_emp_dataPageDef.Commit">
            <consumer handler="receiveEmpCommit">
              <parameters>
                <parameter value="${payLoad}" name="incPayLoad"/>
              </parameters>
            </consumer>
          </producer>
        </event>
      </eventMap>Notice "receiveEmpCommit consumer.
    This is a parent task flow backing bean method, registered as method action in the same pageDef, according to the Steve Muench example
    ".Method Action Invoking Managed Bean Method Without Making Bean a DataControl"
    https://blogs.oracle.com/smuenchadf/resource/examples
    And here is:
         <methodAction DataControl="EmpAppModuleDataControl"
                    id="receiveEmpCommit"               
                    InstanceName="${searchEmpBacking}"
                    MethodName="receiveEmpCommit">
          <NamedData NDName="incPayLoad" NDType="oracle.jbo.Key"/>
        </methodAction>So, what is wrong with this settings, any idea ?!?
    Edited by: Cvele_new_account on Apr 23, 2012 5:57 AM

    Thanks for response.
    Yes, it is (af:commandToolbarButton with default partialSubmit="true")
    Actually, everything works as exceptted, until "receiveEmpCommit" consumer is registered in the pageDef.
    And to be worse, that method does nothing, he is empty.
    Dimitar Dimitrov wrote:
    The button should be configured to do a partial submit (i.e. partialSubmit="true"), otherwise it will close the popup because the inline popups are not re-rendered when a full submit is made. Please check if your button is configured for a partial submit.
    Dimitar

  • Contextual event consumption

    Hello,
    I am using JDeveloper 11.1.1.7.0.
    So.. I have a page that contains a region. The region has a contextual event that is activated when the selected item from a drop down list is changed.
    I am consuming the event (in the page) in a java class (that is implemented as a data control).
    My question is, how can i change the value of a value from my page and also refresh (partialTrigger) the item? (my page has a bean class)
    Thank you.

    Hi,
    check this
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/regionpayloadcallbackpattern-1865094.pdf
    Frank

  • Contextual event - Question

    Hi ,
    I have the following scenario :
    There is a region A which raises a contextual event. There is a page (say Test.jsff) containing region A and region B both of which can be invoked as popups . Region B also contains Region A.
    Both Test.jsff and Region B subscribe to the contextual event raised by Region A. The requirement is that Test.jsff should subscribe to the contextual event when it is raised directly from Region A but ignore when the event is raised from the Region A within Region B.
    The only way I could think of achieving the above is by adding an EL expression in the handleCondition of the handler method in subscriber's page def (Test.jsff in this case). This was the information I found in dev guide for conditional subscription. Is this approach correct?
    Are there any other ways to go about it for e.g:
    i)such as event be consumed by the direct parent only ?
    ii)Do you think raising two different events one for Test.jsff and another for Region B is a good idea?
    Would really appreciate help from experts on the above queries.

    Any updates?.
    Appreciate your inputs on the above.
    Thanks!

Maybe you are looking for

  • Boot camp and windows xp installation

    hi! i'm using a macbook and i'm trying to get the windows system in my mac. so i installed the boot camp beta and i try to install the windows xp home edition service pack 2 but my problem is i'm having an error when i try to install it. the blue scr

  • What program should I use and various??

    Hi friends, I have two questions: 1) So I have finished my project...how do I fit it onto one dvd? Quicktime conversion?? 2) What program should I use to burn to dvd? I have a macbook. 3) How do I make chapters on the dvd?? Thank you so much for assi

  • Will everything be erased from my iPhone if I 'erased iPhone from find my iPhone'?

    My iPhone recently stopped wroking because the lock button didnt work anymore, but I didn't find out until I took it to get fixed. I called in to my provider to get a new one (but they weren't able to send me a new one, so I still have the same one)

  • Can i make a video and use an external mixer for the sound?

    can i make a video and use an external mixer for the sound with my ipod touch?

  • Transfer of Z field of Confirmation of Goods to ECC

    Hello Experts, We are implementing Classic scenario of Self Service Procurement. In confirmation of goods we have created a Zfield at Item level. Which is a standard field in R/3 MIGO. We want to transfer this field in R/3 MIGO. How can we do it? Ple