Refresh fragments

I have quite a bit of trouble refreshing fragments that are used as regions on pages.
i have 2 use cases:
1. 2 or more fragments that are on the same jsff page, one of them holds an overview of the data in the database and the rest is used to change it. How do i refresh the overview region when the data change?
2. a fragment is used by being imported as a jar to another workspace and then dropped as a region on a jsff. How do i from another fragment or page in this new workspace refresh it.
Hopefully there is a solution i can use for both cases.
Any ideas?
TIA

Hi,
your question falls into the category of region interaction. Here are your choices
Option 1. The task flows use a shared Datacontrol setting. In this case a PPR of a dependent region shows the data change
Opion 2. Task flows cannot use PPR directly (e.g. the fragments are in sibling regions) : In this case you can work with bean dependency injection: Create a managed bean in viewScope in the parent task flow definition. Pass a reference to the managed bean to the task flows as input parameters (both task flows will need to have a input parameter defined that takes a reference to this bean and safes it in a task fow page flow scope bean). This way both regions can call out o the parent taskflow, which now has control to refresh (PPR) a dependent region.
read: http://one-size-doesnt-fit-all.blogspot.co.uk/2010/09/master-child-btf-chaperone-contextual.html
Option 3. Contextual events: See http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_adv.htm#CACJBFGI
Frank

Similar Messages

  • How to refresh regions of same fragment used twice as region

    Hello,
    I have a fragment A which uses fragment B as a region twice. The state of the fragment B is kept on a viewScope bean. So each instance of the fragment B region has its own instance of the viewScope bean.
    I have a button in fragment B which does a WebService call. The requirement is to refresh both instances of the region of fragment B, as well as the content of the fragment A after that buttons action is finished.
    Refresh should happen as if the user entered the page first time.
    Any ideas how to solve this problem?
    Thanks a lot.
    Jdeveloper 11.1.1.5

    Hi Frank,
    The article that you want me to look for seems to be region-to-parent communication. It partially solves my problem.
    I need region-to-region as well as region-to-parent communication.
    Note: fragment B is used two times as a region within parent view (i.e fragment A).
    The state of fragment B content is kept on viewScope bean.
    I need to access the bean of the parent page, as well as the viewScope bean of the "other" instance of the region B.
    Can you confirm that the article you are pointing me can do that ?
    Otherwise I will try Contextual Events option.
    Thank you.

  • ADF JSF fragment refresh issue

    I have a .jspx page consisting of two .jsff fragments. Each .jsff fragment contains a table. When I modify a row in table1 some changes also need
    to be reflected in table2 in the other .jsff fragment. Using partialTrigger won't work here since it seems that I cannot include a reference to a .jsff fragment
    from another .jsff fragment, so I tried to solve this via ADF calls in the backing bean of one of the .jsff fragments. I have traversed the ADF tree and identified the
    component in the other .jsff fragment that I want to refresh but a call to AdfUtil.addPartialTarget(...) or to AdfFacesContext.getCurrentContext().addPartialTarget(...)
    does not trigger a refresh. I am wondering what I am missing? I would appreciate any help with this.
    Thank you,
    Bogdan

    Inter-region communication is normally done with Contextual Events. A quick google search gave me this: http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html
    It's been a few years since I did it, but I have had success using contextual events with regions. I think that you might have to have the container that contains the two regions act as a proxy for the event, but it's kinda foggy.

  • Best way to refresh page after returning from task flow?

    Hello -
    (Using jdev 11g release 1)
    What is the best way to refresh data in a page after navigating to and returning from a task flow with an isolated data control scope where that data is changed and commited to the database?
    I have 2 bounded task flows: list-records-tf and edit-record-tf
    Both use page fragments
    list-records-tf has a list.jsff fragment and a task flow call to edit-record-tf
    The list.jsff page has a table of records that a user can click on and a button which, when pressed, will pass control to the edit-record-tf call. (There are also set property listeners on the button to set values in the request that are used as parameters to edit-record-tf.)
    The edit-record-tf always begins a new transaction and does not share data controls with the calling task flow. It consists of an application module call to set up the model according to the parameters passed in (edit record X or create new record Y or...etc.), a page fragment with a form to allow users to edit the record, and 2 different task flow returns for saving/cancelling the transaction.
    Back to the question - when I change a record in the edit page, the changes do not show up on the list page until I requery the data set. What is the best way to get the list page to refresh itself automatically upon return from the edit-record-tf?
    (If I ran the edit task flow in a popup dialog I could just use the return listener on the command component that launched the popup. But I don't want to run this in a dialog.)
    Thank you for reading my question.

    What if you have the bean which has refresh method as TF param? Call that method after you save the data. or use contextual event.

  • Refresh LOV after inserting data in correspondent table

    Hi all,
    I am using Jdeveloper 11.1.1.2 and ADFBC.
    I have a page with a table (tableA) with some fields. One of them has a LOV associated to another table(tableB). I have a button (button1) that shows a popup(popup1) and opens a new task flow with a fragment to insert data in the tableB.
    After inserting/modifying rows in tableB and after pressing commit (property: end-transaction) or rollback buttons (property: end-transaction and restore save point), LOV does not refresh.
    I have tried to set the property partial triggers of the LOV to button1 or popup1 and it does not work.
    How can I solve it?
    Thank you.
    Andrea

    How about VO for table B ? Did you refresh that ? I didn't use the same VO for table & LOV.
    so in "List data Source" -- VO -- I am using "SQL statement" and statement includes fields from Table B and Table A.
    VO for LDS using "Rows populated by a SQL query with read-only access". I didn't use "Updateable Access through Entity Objects".
    Sample of VO of LDS:
    select A.model_number modelNumber, a.part_number partNumber, b.MODEM_TYPE ModemType
    from table A a,Table B b
    where a.PART_NUMBER_ID = b.PART_NUMBER_ID
    and a.part_number_id =:partID
    Edited by: albertpi on Mar 16, 2010 7:26 AM

  • Application not working after refreshing a page with F5

    Hi,
    Developed an application with jazn-data for security reason. In my application, i've taskflow with page fragments. In this fragment, i;ve LOv field with client listener to popup LOV using 'F8' key. After refreshing this page using 'F5' key or browser's refresh button, my application gets hanged. Even sign out button also not accessible. In browser's console i got "LaunchPopupUsingF8 is not defined" error. LaunchPopupUsingF8 is my javascript function for LOV popup.
    Kindly guide me whats wrong in this...
    Edited by: Usha on Sep 26, 2011 5:10 AM

    Hi,
    I would use JavaScript to disable the F5 button as it leaves the application in an undefined state after refreshing the content from the browser cache
    see page 36 onwards (search for F5) for an idea
    in http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    Frank

  • JDeveloper Error while editing jspx with fragments and regions

    Hi,
    I have a jspx page which has multiple regions included with fragments. Everytime i edit JDev is throwing me error. The following is stacktrace
    Thanks in Advance
    Sri
    oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods:Dec 29, 2011 9:44:19 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods getShortDescription
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key REGION__ID
    Started CommandProcessor transaction: Set ID attribute on thread AWT-EventQueue-0 at batch level 1
    Invoking command: Change Attribute
    Started CommandProcessor transaction: Rename ConferenceCompliance.getR5 on thread AWT-EventQueue-0 at batch level 2
    Invoking command: Rename Method
    Started CommandProcessor transaction: Auto Save Actions on thread AWT-EventQueue-0 at batch level 3
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 2
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 1
    Started CommandProcessor transaction: Rename ConferenceCompliance.setR5 on thread AWT-EventQueue-0 at batch level 2
    Invoking command: Rename Method
    Started CommandProcessor transaction: Auto Save Actions on thread AWT-EventQueue-0 at batch level 3
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 2
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 1
    Started CommandProcessor transaction: Rename ConferenceCompliance.r5 on thread AWT-EventQueue-0 at batch level 2
    Invoking command: Rename Field
    Started CommandProcessor transaction: Auto Save Actions on thread AWT-EventQueue-0 at batch level 3
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 2
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 1
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 0
    Performing action Find...[ from oracle.ide.ceditor.CodeEditor ]
    Invoking command: Paste[ from oracle.ide.ceditor.CodeEditor ]
    Invoking command: Paste[ from oracle.ide.ceditor.CodeEditor ]
    Performing action Save[ from oracle.ide.ceditor.CodeEditor ]
    Invoking command: [ from oracle.ide.ceditor.CodeEditor ]
    Started CommandProcessor transaction: Auto Save Actions on thread AWT-EventQueue-0 at batch level 1
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 0
    Performing action Save All[ from oracle.ide.ceditor.CodeEditor ]
    Invoking command: [ from oracle.ide.ceditor.CodeEditor ]
    Started CommandProcessor transaction: Auto Save Actions on thread AWT-EventQueue-0 at batch level 1
    Finished CommandProcessor transaction on thread AWT-EventQueue-0 at batch level 0
    Uncaught exception
    java.lang.RuntimeException: A current ADFContext is not available.
    o.adf.share.ADFContext.findCurrent(ADFContext.java:960)
    o.adf.controller.internal.security.AuthorizationEnforcer.authorizationRequired(AuthorizationEnforcer.java:502)
    o.adf.controller.internal.security.AuthorizationEnforcer.checkPermission(AuthorizationEnforcer.java:72)
    o.adf.controller.internal.security.AuthorizationEnforcer.checkRead(AuthorizationEnforcer.java:411)
    o.adf.controller.internal.metadata.MetadataService.getTaskFlowDefinition(MetadataService.java:211)
    o.adf.controller.internal.dtrt.metadata.MetadataUtils.findTaskFlowDefinition(MetadataUtils.java:30)
    o.adf.controller.internal.dtrt.binding.DTTaskFlowBinding.findPageNames(DTTaskFlowBinding.java:676)
    o.adf.controller.internal.dtrt.binding.DTTaskFlowBinding.findPageDefinitions(DTTaskFlowBinding.java:656)
    o.adf.controller.internal.dtrt.binding.DTTaskFlowBinding.getAllEventConsumers(DTTaskFlowBinding.java:770)
    o.adfdt.model.objects.PageDefinition.getAllEventConsumers(PageDefinition.java:2355)
    o.adfdtinternal.model.ide.contextualevents.panels.EventConsumerPanel.initExecConsumerPathSet(EventConsumerPanel.java:398)
    o.adfdtinternal.model.ide.contextualevents.panels.EventConsumerPanel.init(EventConsumerPanel.java:478)
    o.adfdtinternal.model.ide.contextualevents.panels.EventConsumerPanel.<init>(EventConsumerPanel.java:199)
    o.adfdtinternal.model.ide.contextualevents.panels.ConsumerPanelCustomGUIComponent.getGUIPanel(ConsumerPanelCustomGUIComponent.java:67)
    o.i.inspector.DisplayGroupPanel.componentRendered(DisplayGroupPanel.java:334)
    o.i.inspector.DisplayGroupPanel.render(DisplayGroupPanel.java:286)
    o.i.inspector.DisplayGroupPanel.render(DisplayGroupPanel.java:111)
    o.i.inspector.DisplayGroupPanel.<init>(DisplayGroupPanel.java:72)
    o.i.inspector.VerticalDisplayGroupPanel.<init>(VerticalDisplayGroupPanel.java:28)
    o.i.inspector.DisplayGroupPanelFactory.createDisplayGroupPanel(DisplayGroupPanelFactory.java:20)
    o.i.inspector.PropertyCategoryLayoutPanel.renderDisplayGroup(PropertyCategoryLayoutPanel.java:136)
    o.i.inspector.PropertyCategoryLayoutPanel.displayGroupRendered(PropertyCategoryLayoutPanel.java:125)
    o.i.inspector.PropertyCategoryLayoutPanel.populateRows(PropertyCategoryLayoutPanel.java:92)
    o.i.inspector.PropertyCategoryLayoutPanel.render(PropertyCategoryLayoutPanel.java:77)
    o.i.inspector.VerticalCategoryCollection.expandIfNecessary(VerticalCategoryCollection.java:145)
    o.i.inspector.VerticalCategoryCollection.addCategory(VerticalCategoryCollection.java:125)
    o.i.inspector.PropertiesLayoutRenderer.touchCategoriesWithoutRendering(PropertiesLayoutRenderer.java:75)
    o.i.inspector.PropertiesLayoutRenderer.render(PropertiesLayoutRenderer.java:38)
    o.i.inspector.PropertyInspector.renderPropertiesFrom(PropertyInspector.java:499)
    o.i.inspector.PropertyInspector.render(PropertyInspector.java:386)
    o.i.inspector.PropertyInspector.updatePropertyModel(PropertyInspector.java:366)
    o.i.inspector.PropertyInspector.setPropertyModel(PropertyInspector.java:331)
    o.ii.inspector.InspectorWindowImpl.setModelInNewPropertyInspector(InspectorWindowImpl.java:1336)
    o.ii.inspector.InspectorWindowImpl.refresh(InspectorWindowImpl.java:1195)
    o.ii.inspector.InspectorWindowImpl$1.actionPerformed(InspectorWindowImpl.java:252)
    jx.s.Timer.fireActionPerformed(Timer.java:271)
    jx.s.Timer$DoPostEvent.run(Timer.java:201)
    j.a.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    j.a.EventQueue.dispatchEvent(EventQueue.java:597)
    j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    j.a.EventDispatchThread.run(EventDispatchThread.java:122)

    Seems like a good test case to use when filing an SR at https://support.oracle.com

  • How to call a javascript method after table load on JSFF Fragment load?

    Hello,
    The usecase is to invoke a javascript method after table is done loading (fetching data) when user lands to a JSFF fragment. With JSPX pages I can achieve that by using PagePhaseListener. I have tried with RegionController as follows, and the problem i face is that I cannot prevent multiple calls to the Javascript call when user presses a tab or button in a screen, or changes drop-down value with autosubmit on.
    import javax.faces.context.FacesContext;
    import oracle.adf.model.RegionBinding;
    import oracle.adf.model.RegionContext;
    import oracle.adf.model.RegionController;
    import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    import org.apache.myfaces.trinidad.util.Service;
    public class MyListener implements RegionController{
    public MyListener() {
    super();
    @Override
    public boolean refreshRegion(RegionContext regionContext) {
    int refreshFlag = regionContext.getRefreshFlag();
    System.out.println("Render flag is: "+refreshFlag);
    if (refreshFlag == RegionBinding.PREPARE_MODEL)
    initializeMethod();
    regionContext.getRegionBinding().refresh(refreshFlag);
    return false;
    public boolean validateRegion(RegionContext regionContext) {
    regionContext.getRegionBinding().validate();
    return false;
    public boolean isRegionViewable(RegionContext regionContext) {
    return regionContext.getRegionBinding().isViewable();
    public void initializeMethod() {
    FacesContext f = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service = Service.getRenderKitService(f, ExtendedRenderKitService.class);
    service.addScript(f, "myJSFunction();");
    @Override
    public String getName() {
    return null;
    I need the javascript to be called only once after the table is done loading when user lands to a fragment (jsff).
    Any ideas appreciated?
    JDeveloper version is 11.1.1.5.0
    Thank you.
    Valon
    Edited by: Valon on Apr 11, 2013 3:10 PM

    One of the requirements is to compare every row with the next row and highlight the changes. There are other requirements as well where JavaScript solution is used.
    The question remains the same. Is it doable or not without changing the solution from JavaScript solution to server-side solution ? Can we call a JavaScript only once when the user lands to a jsff fragment ?
    Hope that is clear.
    Thanks.
    Valon

  • Calling a backing bean method after load of fragment in adf

    I needed to call a backing bean method after page load of fragment in adf.
    I used the method suggested in:
    https://community.oracle.com/message/11044570
    only difference is im giving the if clause as:
    if (refreshFlag == RegionBinding.RENDER_MODEL ) {
    instead of
    if (refreshFlag == RegionBinding.PREPARE_MODEL)
    It was working fine, but page was not getting refreshed so used the code as mentioned in example:
    public void refresh() {
              FacesContext facesContext = FacesContext.getCurrentInstance();
              String refreshpage = facesContext.getViewRoot().getViewId();
              ViewHandler  viewHandler =facesContext.getApplication().getViewHandler();
              UIViewRoot viewroot =  viewHandler.createView( facesContext, refreshpage);
              viewroot.setViewId(refreshpage);
              facesContext.setViewRoot(viewroot);
    Now issue is once page is loaded and backing bean method is called, the refresh code refreshes the page and upon page load, refresh method is called again in recursive fashion.
    please advise what to do in such scenario?
    I tried to do selective refresh using some variable(also with static) but it does not help as page wont be refresh at all or page will keep refreshing recursively.

    Use clientListener on the page load event
    <af:document id=”d1″>
        <af:serverListener type=”onloadEvent”
                           method=”#{<managedbean name>.<method name>}”/>
        <af:clientListener method=”onLoadClient” type=”load”/>
        <af:resource type=”javascript”>
        function onLoadClient(event) {
          AdfCustomEvent.queue(event.getSource(),”onloadEvent”,{},false);
          return true;
        </af:resource>

  • How can I refresh a calling page on return from a TF activity ?

    Hi,
    I have a (sounds easy) case where a view activity invokes a BTW with fragments. The called BTF has been declared with isolated data control scope. Inside the BTF some updates happen and when the BTF returns the calling view should display the modified data. The BTF should not be opened as a dialog and the above take place inside a region. There are examples in the Internet for how to implement such case but only calling a taskflow with pages from a dialog.
    I tried creating first the Taskflow binding definition [19.10.1 How to Associate a Page Definition File with a Task Flow Activity|http://docs.oracle.com/cd/E35521_01/web.111230/e16182/taskflows_activities.htm#sthref539] , then I set the related operations (Execute, setCurrentRowWithKey, ...) in the Page Definition and invoke the operations inside the “After Listener” Listener (<after-listener>) of the taskflow activity but the binding context is not accessible inside the listener, I get NPE accessing the binding.
    After some tests I have found that I can call the Operations using “#data.taskflowdefinition..” but I afraid using this technique because of so many papers stating that this is a bad practice.
    Additionally I tested using an invokeAction in the calling page definition page and it works but I prefer “refreshing” the model from the activity (there are many pages calling the same activity).
    I am wondering if there is a more elegant solution that I haven’t seen yet.
    Thanks for any ideas,
    Yiannis
    Edited by: Tses on Mar 8, 2013 11:15 PM

    Hi Timo and thank you for your reply,
    As far as I know any method executed in the BTF has no effect in the calling page because of the isolated data control scope.
    Consider the following layout of a very simple TF diagram. The BTF has "Share data controls with calling task flow" unchecked and "Always begin new transaction"
    View --> Method Call --> BTF
    Now imagine that a user navigates from the View to the BTF, make updates and finally commits the transaction from a taskflow return activity. The updates are executed inside the "private" BTF's data control scope because of the BTF settings.
    Returning to the calling View the user sees stale data from the Data Control of the View, until he re-queries the model.
    ADF supports execution of code during the call of the BTF (through Method Call) and also sending and returning parameters from the View to the BTF.
    Conversely on return from the BTF there is no handler for executing code (something like "Return Method Call") in order to refresh (e.g. re-query and set current row) the View exploiting the return parameters.
    The "After Listener" in the taskflow call activity has not access to the bindings context. Using #{data.bindingTFXXX} I guess that has a risk in a high availability environment for NPE where the http call to the BTF might be processed in a different server than the returning http call so the #{data.bindingTFXXX} might not exists.
    The other solution I found using invokeAction with RefreshCondition depends on the returning values of the BTF, bloats the View with Bindings that I would prefer to be in a central place.
    Am i missing something in the whole flow above ?
    Yiannis

  • ADF Task Flow Binding - Refresh ifNeeded being invoked even WITHOUT any Parameter change

    Using JDeveloper 11.1.1.6.0
    Issue: Task Flow Binding property "refresh = ifNeeded" seems to be triggered even without the mutation of the input parameter.
    As per definition, "ifNeeded: refresh the ADF Region if the value of a task flow binding parameter changes." (Reference: 17.5 Refreshing an ADF Region)
    Now for the setup which reproduces the issue.
    I'll focus at the fragment bounded task flow level and will skip the jspx side.
    taskflow: main-flow.xml
    contains a single fragment mainFgmt.jsff
    has a managed bean defined SampleBean.java as pageFlow scope.
    taskflow: sub-flow.xml
    contains a single fragment subFgmt.jsff
    has an inputParameter SampleBean.java (because it is an input parameter, by default it will be at pageFlow scope)
    !important - has a nested taskflow (task flow call as defined in the component pallete) called inner-flow (see below)
    the nested taskflow is the default activity
    the nested taskflow has an outcome pointing to subFgmt where outcome = "return"
    taskflow: inner-flow.xml
    contains a single fragment called stop.jsff
    has a return activity without outcome = "return"
    stop.jsff has a navigation pointing to the outcome.
    Finally mainFgmt.jsff has a task flow binding (pageDef)
    with id = "sub-flow.xml"
    refresh = "ifNeeded"
    parameter SampleBean being submitted as sub-flow's input parameter. (id=sampleBean, value=#{pageFlowScope.mainSampleBean})
    Assume that code compiles.
    In this scenario where the only tricky condition is the inner nesting (defined by !important), when the inner nesting decides to invoke its outcome to visit sub-flow's fragment, mainFgmt is restarting its taskflow which makes sub-flow start over again.
    Another way of saying it is, if sub-flow starts a nested activity and that nested activity exits out to utilize sub-flow's view. The high level definition which is mainFgmt's refresh ifNeeded is restarting sub-flow.
    In the above example if you notice, the bean (SampleBean) is not really being utilized except that it is completing the purpose of refresh=ifNeeded. This scenario is only to simplify the setup - in practical use this bean will be mutated to be utilized as a refresh mechanism.
    Now interestingly, if I change the pattern a bit then the issue will not happen:
    Don't use the nested taskflow (inner-flow) as the default activity, let a fragment of sub-flow hold the initial view.
    Navigate to the nested flow.
    Exit nested flow.
    Everything works.
    Now in this scenario, it seems like the sub-flow needs to have a view established first for it to be properly be used.
    So my questions are as follows:
    Can I consider the behavior of the refresh=ifNeeded as a bug in this usecase?
    Would it be better to utilize a different way of refreshing (maybe combination of refresh condition) to get around the issue?
    Is the use of the task flow as defined logical or does it cross any boundary or best practice that might be causing this behavior?

    Hi,
    actually you lost me in your description due to complexity. I lived under assumption that sub-flow already is a region on a view in main flow, but then you sad that
    "!important - has a nested taskflow (task flow call as defined in the component pallete) called inner-flow (see below)"
    which then confused me as to I have no idea if inner flow now is the second level nesting or first level nesting (should be second level nesting). If sub-flow is a region then having "has an inputParameter SampleBean.java (because it is an input parameter, by default it will be at pageFlow scope)"  is an unnecessary broad scope because the region wont live longer than view scope.
    Anyway, it seems that a region refresh is triggered by the lifecycle involved, which can be by design or a bug. I suggest you file a Service Request with support and provide a test case as purely from the description, its hard to parse and understand what is going on.
    Frank

  • Issue with refresh of task flow in dynamic region

    Hi All,
    I am using Jdeveloper version 11.1.1.6. In my fusion application I am facing an issue with the task flow refresh in the dynamic region. In my application, I have one task flow in which the side navigation command links are there and on the right side it has a dynamic region which is used to display the respective task flows on click of navigation links. Now two of the links actually call the same task flow in dynamic region but for different purpose. One for creating a record and another one for modifying the record. The default activity of that task flow has a page fragment that has couple of fields. One a drop down and another one a text field for searching the accounts against which the record is to be created or modified. On click of the navigation link, I set the task flow id to be displayed and refresh the dynamic region. Now the issue is with those two links which shows the same task flow. Let's say  I searched for a record by putting some value in input text and then went on to modify flow using the modify navigation link. Then the value that I entered in search input text in the create flow stays and does not go away. I found out the cause for the issue and this is happening because of the immediate = true on the navigation command links. Now I cannot remove that because of the obvious reason that then it will start throwing exceptions for the mandatory fields when I am in middle of any flow. Is there any way to achieve it.
    Please help as this is quite urgent. I can also upload the sample application if anyone needs it.
    Regards
    Ajay

    try to put RefreshCondition in the pageDef file for that particular task Flow and try to make that condition to true only when you switch between edit or add. While switching, make sure that the mapped bean properties should also point to respective values i.e. either empty for new or holds some value for edit.
    So, when ever the above condition returns true, task flow gets refreshes and it will holds only the current values not the old values.
    i hope this will resolve your issue.

  • Refresh table after creation of new Toplink BO

    Hi,
    i have the following Problem and i hope someone can help me. I use ADF11g/Taskflows with TopLink-mapped BOs (no ADF BC).
    Consider following Taskflow(s):
    main activity is a jsff-page (view) showing a table of BOs. From this view there are two action-outcomes defined called "edit" and "create". The edit-action calls another Taskflow constisting of one pageFragment showing the detailForm of the given BO. This Taskflow has one input and one output parameter (the BO to edit) and has two exists called "save" and "cancel". The add-Action calls a Method called "createNewBO" first and then calls the mentioned Taskflow also. Every Taskflow has ist own managed Bean in the pageFlowScope working as a Controller and DataControl for the TaskFlow and directly included views.
    The edit-action works fine. The add action also except that the table from the default activity of the first taskflow does not refresh after return from the second Taskflow. I tried to set the Refresh-Property in the PageDef to all possible values in combination with the RefreshCondition but no combination works. I can make a manual refresh or change the sorting then the new BO is shown in the table.
    Is there a possibility to call a refresh of a jsff from a taskflow or can i force the refresh on entering the jsff?
    I'm really stuck and appreciate any help ;)
    Friedrich

    You can try this:
    - on your taskflow diagram select the page that contains the table you want to refresh, and add a Page Parameter (from #{true} to #{viewScope.refresh})
    - in pageDef for that page add one invokeAction in executables and point it to methodAction that fills the iterator you want to refresh
    - for newly created invokeAction, set Refresh to ifNeeded and Refresh condition to #{viewScope.refresh}
    This should refresh the iterator each time the page (fragment) is loaded.
    Hope this helps!
    Pedja

  • How to refresh data in SelectOneChoice component based on backing bean

    Hello.
    I am using JD Studio Edition Version 11.1.1.5.0 on Weblogic 11.1.1.5
    I have page fragment with SelectOneCoice based on backing bean (used as filter)
    <af:selectOneChoice label="#{projectBundle['label.toolbar.spinbox.period']}"
                                        valueChangeListener="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.onPeriodValueChangeListener}"
                                        binding="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.soc2}"
                                        id="soc2" value="#{pageFlowScope.ContentMainView.period}" autoSubmit="true">
                      <f:selectItems value="#{pageFlowScope.YearsListBean.yearItems}"
                                     binding="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.si2}" id="si2"/>
    </af:selectOneChoice>
    there is backing bean which reads data from database and creates list + add null value
    package sk.web.view.bean;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.jbo.Row;
    import sk.web.view.common.utils.ADFUtils;
    * Class is supposed to provide list of years for the af:SelectOneChoice component.
    public class YearsListBean {
        private static final String PERIOD_ITERATOR_NAME = "PeriodView1Iterator"; //auto generated id
        private List<SelectItem> yearItems;
        public YearsListBean() {
            super();
            yearItems = new ArrayList<SelectItem>();
            addYearsToList();
        public void addYearsToList() {
            DCIteratorBinding iter = null;
            iter = ADFUtils.findIterator(PERIOD_ITERATOR_NAME);
            Row[] rows = iter.getAllRowsInRange();
            addYearItemToList("", "");       
            for(int i = 0; i < rows.length; i++){
                Row row = rows[i];
                log.info("row[" + Integer.toString(i) +"]: " + rows[i].getAttribute("Year").toString());
                addYearItemToList( rows[i].getAttribute("Year").toString(), rows[i].getAttribute("Year").toString());
        public void clearYears() {
            log.info("Called.");
            getYearItems().clear();
       private void addYearItemToList(String strInYearLabel, String strInYearValue) {
            SelectItem tObjItem = new SelectItem();
            // Setup object
            tObjItem.setLabel(strInYearLabel);
            tObjItem.setValue(strInYearValue);
            // Add it ro list
            yearItems.add(tObjItem);   
        public List<SelectItem> getYearItems() {       
            // Get Output
            return yearItems;
    When I insert new record into DB table I want to show new value into filter. How to achieve this?
    I tryied get current instance of YearsListBean
         YearsListBean yearsList = (YearsListBean)FacesUtils.getManagedBean("pageFlowScope.YearsListBean");
    then clear and fill it again
         yearsList.clearYears();
         yearsList.addYearsToList();
    at the end I refresh view adding partial target
    AdfFacesContext.getCurrentInstance().addPartialTarget(getSoc1());
    But this procedure doesn't work. Please help me find working method.
    Thanks in advance.

    Why don't you use a model driven list in the first place? Your list gets it's data from a vo do this would be the preferred solution.
    Check out my sample http://wp.me/pcBZk-vM
    Which shows an similar use case.
    Timo

  • Jdeveloper 11.1.1.2.0 : Master Detail Using Fragment Error

    Hi
    When developing a master detail solution, using a page fragment, I have encountered the following issues. I have followed forum articles and My Support solutions with success. The steps I used to create the solution is as follows;
    1. Create ADF model project with 2 entities sharing a master detail relatiuonship.
    2. Ensure that FK assocation has Behavior property Composition Association checked.
    3. Test application module. Create works on both master and detail tables.
    4. Create ADF view controller project.
    5. Create a new task flow, with page fragments and add page to flow.
    6. Add master detail VO to created page fragment.
    7. Surround tables with Panel Collection components.
    8. Add toolbar and buttons to createinsert into master and detail tables.
    9. Add PPR to both tables for refresh when createinsert actions are performed.
    10. Create test page.
    11. Add task flow as region to page.
    12. Run adfc-config.xml
    13. Click on createinsert of master table. Capture data.
    14. Click on createinsert of detail table.
    15. Error stack is generated, JBO-25030 Detail entity with row key null cannot find or invalidate it's owning entity.
    I then created a JSF page and added the tables directly onto the page. I successfully created a master and a detail record.
    I then checked the Cascade Update Key attributes on the association and added the following code to the master ViewRowImpl class;
    @Override
    public void setNewRowState(byte state) {
    if (state != Row.STATUS_INITIALIZED || getNewRowState() != Row.STATUS_NEW) {
    super.setNewRowState(state);
    I ran the page containing the region and the following error was generated;
    <Utils><buildFacesMessage> ADF: Adding the following JSF error message: Attribute RegionId in Regions is required.
    oracle.jbo.AttrValException: JBO-27014: Attribute RegionId in Regions is required.
    I then changed auto-submit to true for the PK on the master table. This produced no error, however only the master records PK is committed to the database, other attribute values are ignored and the detail record is not committed.
    Regards
    Leon.

    Have you seen this link
    - Juan Camilo

Maybe you are looking for

  • Output video to s-video or component out?

    Hi all, I got a new Mac Pro two months ago and really like it. This is my first Mac. I'm running in dual monitor mode via DVI with two 24" Dell 2405FPW monitors of the ATI X1900 video card. The really nice features of this monitor is that it has a bu

  • How to make the whole shebang appear in itunes window

    Because my 25" Asus monitor is on the blink I'm using my 19" Asus monitor, both purchased new last year.  Problem is that the 19", which displayed itunes perfectly before, now cuts the podcast list in half vertically and I have to use the horizontal

  • Yoga 13 System Image Restore Fails Due To Excluded Disk

    Hello: I am trying to execute a restore from a system image disc created shortly after I installed my principal programs without destroying the OKR partition or files.  However, I  do not want to go all the way back to factory condition at this time.

  • Can we change the net value in the conditons of the sales order?

    Hello: I have below scenario: Sales order: Material           A PR01 (Price condition)               98 USD ZADD (Discount condition)        to be calculated by SAP R3 system (?%) Net price                                    80 USD (expected) Due to

  • Slow PAT

    Hello every one , my 865pe neo2-s bios v1.4 its performance is stuck to slow if i change it to fast,turbo or Ultra turbo it crashes and make random restart and force it back to slow mode   i use the specs below :-