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

Similar Messages

  • 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

  • Automatically refreshed workspace and changes into LIVE

    Hi,
    I've noticed that changes made directly into LIVE
    are immediately visible to automatically refreshed
    child workspaces. However the answer to the FAQ
    question "When sharing changes made in a child
    workspace with another child workspace, should I
    use periodic (manual) or continually (automatic)
    refresh?", states that this type of change must
    be refreshed manually.
    What is the expected behaviour afterall?
    Regards,
    Karina Borges

    Karina,
    For continually refreshed workspaces, changes made in the LIVE workspace will be immediately visible.
    For non-continually refreshed (NCR) workspaces, the changes are not immediately visible - to see the changes, NCR workspaces have to be manually refreshed.
    We will update the FAQ to make this point clearer.
    regards,
    - Ramesh.

  • 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

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

  • 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

  • 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

  • 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

  • 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

  • Refresh two regions at a time

    Hi,
    Iam new to ADF Framework. Using JDeveloper 11.1.1.5.0. Following is the high level description of our requirement.
    I've JSF page with four regions localted at left,Center, Bottom & Right. Left region having three buttons. Based on button click, center region will be populated with corresponding tree. User can select the required elements from the each tree & then click on 'Submit' button (which is in Center region).
    As of now Iam able to achieve till this part with the help of " Programmatic Partial page refresh (PPR) with dynamic regions »http://asktown.co.uk/?p=223"
    Now the pending part is, If user clicks on 'Submit' Button then need to send the selected item references to bottom region & right region at a time to do some thing. i.e Bottom region will display the selected items and right region will perform calculation part.
    There are two things pending as I know
    1. Getting the selected nodes from three trees(Each botton will display separate tree in center region)
    2. Refreshing two regions (bottom & right) at a time with Submit click.
    Ihope, If i could achieve these two things,Iam almost done with my task.
    Can you provide hint to proceed on these two things. It would be helpful, if some one provide pointer to achive this task.
    Thanks in advance,
    MSR.

    Hi,
    if you use shared data controls then this is not so difficult to achieve. Here's what you would do
    1. http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_masterdetail.htm#sthref2108 --> "Using the TargetIterator Property" explains how to synchronize iterators with the selection in the tree. Say the tree has locations, departments and employees. Then when you click the employees node, a employees iterator is synchronized
    2. For each iterator used or referenced by the tree create an attributeValue binding for the value you want to pass on to the other regions
    3. the region input parameters of the two regions to synchronize point to a managed bean in view scope. The refresh condition is set to if needed on the task flow binding so that when the input parameter value changes, the region restarts the contained task flow
    4. See http://www.oracle.com/technetwork/developer-tools/adf/learnmore/50-synchromize-form-treeselection-169192.pdf (--> page 6, "Building the Custom Selection Listener"). Change this code so that whenever a user selected a tree node you
    i) retain the default functionality
    ii) determine the selected node and read the attribute value binding for this node. Say the node is employees and the attributeValueBinding you created is for EmployeeId. Then the code looks like
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    AttributeBinding attr = (AttributeBinding) bindings.get("EmployeeId);
    Object selectedNodeValue = attr.getInputValue();
    5) Set the selectedNodeValue to the managed bean property referenced from the region input parameters
    6) Call AdfFacesContext.getCurrentInstance().addPartialTarget(region reference) for each region
    7) The last thing to consider is that the tree is in a region itself. So here is some complexity that you handle following the idea mentioned in this blog (http://one-size-doesnt-fit-all.blogspot.de/2010/09/master-child-btf-chaperone-contextual.html)
    Since the two dependent regions are refreshed by the parent view, you need to define a managed bean in view scope for the parent view and then pass the bean as an input parameter reference to the region having the tree component. You use this handle then to pass the selected EmployeeId and the partial refresh notification to the view bean. The bean then sets the managed bean property read by the task flows in the dependent regions
    Frank
    Ps.: This is a very complex use case for a start with ADF
    Frank

  • AddPartialTarget doesn't refresh the region

    Hi,
    i have a region where a taskflow is consumed. After doing some update through the ui page , the values in main page remains but the values in the region disappears.
    when i press F5 the data in region comes in page. However through code when i do addPartialTarget(), then the values still don't come.
    Can anyone please suggest in this?

    Hi,
    Are you using contextual event to update the data?
    If so, need to add partial trigger in handeling function.
    In any way you can try to add the partial trigger to some of the containers the component you need to refresh.
    That what helped for me.
    Nina

  • How to refresh a  region using Active Data Service

    Hi,
    I need to refresh the region using ADS.
    I am creating jsff which contains dynamic tables rendering. This jsff is bound to a task flow (having input parameter and refresh property set to "ifNeeded). The bounded task flow is dropped on a jspx as a region.
    Now in order to refresh the region, I need to pass the updated param value, which would cause the region refresh.
    I am able to do so on a button click from jspx page. But I have to make it auto refresh using ADS as per app requirement.
    The issue is "AdfFacesContext.getCurrentInstance return null..if I am using it in startActive Data or changeData Update (where I am using ActiveDataUpdateEvent)".
    Please guide me how can I achieve this.
    I am using Jdev 11.1.1.4.
    Thanks.
    Edited by: 977455 on Jan 3, 2013 7:35 PM

    Hi,
    try a variation of this blog entry: http://matthiaswessendorf.wordpress.com/2010/01/22/flexible-active-data-service/
    Instead of showing a popup, you do the following
    1. set clientComponent=true for the hidden field
    2. configured the PartialTrigger property of the region to point to the hidden component
    If this doesn't work then try this
    1. use <af:clientListener type="propertyChange" method="activeDataCallback" /> as used in the sample
    2. define an af:serverListener that points to a managed bean that has access to the region (RichRegion) instance
    3. The af:serverListener needs to be defined as a child of the outputText
    4. change "activeDataCallback" to queue the server listener event (CustomEvent)
    5. Use the managed bean to refresh the region
    Frank

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

  • 11g: Contextual Events - How do I fire them on currency change?

    Hi!
    After posting a question here: 11g: Bounded task flows, need help and advice!
    I read the article at http://technology.amis.nl/blog/3365/adf-11g-how-events-in-one-region-cause-other-regions-to-refresh because I need to refresh region B when the user selects in region A.
    Now, the comments in that article suggest that Contextual Events are the built-in mechanism for that use case. So I tried that first. The online help suggests that this is what I need.
    I read the online help and created an event and defined a producer and consumer in the event map in the parent page's page def. Now the help shows how to fire the event when a methodAction binding is executed. But I need to fire the event when the user selects a row in region A's table.
    1. How do I do that? Where do I put the event? The help says it's possible, but does not show how. Add a selection listener to the backing bean and call the event-enabled methodAction binding from there? Or is there a better way?
    2. I get the impression, that - when I use the event to call the consumer's binding ExecuteWithParams method - just the query of the consumer's VO is executed. That's great. But how do I reset the flow to the initial action? Just refreshing the VO is not enough. I need to reset the flow to the initial action (showing a view).
    I read http://www.oracle.com/technology/products/jdev/tips/fnimphius/taskflow_in_popup/taskflow_in_popup.html and now I am completely confused. Use input parameters or use events? If I use events, how do I reset (refresh) the task flows?
    Thanks,
    Sascha
    Edited by: Sascha Herrmann on Oct 19, 2008 3:33 PM

    Sascha,
    are region A and B share the same transaction ? If yes and the content in region B is a dependency of the VO used in A then you don't need contextual events at all. So if i assume that region A contains a list of departments and region B the employee table (where DepartmentsVO is the parent of EmployeeVO) then you can do as follows
    - navigate to the region definition of region B in the pageDef file
    - use the right mouse context menu to add parameters, and then a parameter (e.g. changeIndicator)
    - wire the changeIndicator parameter to the DepartmentsVOIter current row key str (its a method exposed directly on the iterator)
    - set the region binding refresh to ifNeeded
    - set a partial trigger on the regionB to point to the departmentTable so the region is refreshed whenever the table row currency changes
    The parameter that you added just does nothing except that it indicates to the region binding that the region must refresh. You point it to the row row key of the department iterator because it provides the changed value.
    If VO in regionB is not dependent on the DepartmentVO, then you need to create a parameter on the bounded taskflow, which takes the value of changeIndicator to write it to pageFlowScope.currRowKey. Then create a set currentRowWithKey method as a default activity and wire it up to pageFlowScope.currRowKey
    Frank

Maybe you are looking for

  • How can I save a file (text).....,

    ......then edit some text and save file with a new file name. Thus having both versions saved? I think the question is straight forward to anyone using lion. If not:- I write a simple text file This is a simple text file save and name as text_file_1

  • Frozen in Erase Content mode

    I've hit erase all content and settings and my Ipod has a screen with the apple logo and a bar underneath. At first the process seemed to have been moving along, but now it seems to be stuck with about 75% of the bar colored in. It has been about 4 h

  • Question on "Most Visited" toolbar

    In the firefox browser, I mistakenly deleted the "Most Visited" in the toolbar. How can I get it back?

  • BPEL function to query the Element Name and get the count of elements

    Hi Guys, I have problem with the following, can you please help me out with this. Say i have an xml pay load: <ns1:sampleEBO>                <ns1:PhysicalLocation>                <ns1:propertis>                     <ns1:filedType>12</ns1:filedType>  

  • Very slow importing CDs

    I have just got a new coputor with Windows 7 os importing CDs takes forever, sead is only 2.5x please help imorpt with XP was very fast