Adf refresh table after popup

I have a search page with a deep link to a page showing detailed information about the selected search result. From the detail page I open up popups to enable the user to change some of the data. When returning from the popup the detailed information is not refreshed. To fix this I have added a backing bean and calls it from the returnListener.
The problem is that the detailpage does not show the changed data. If I call the popup a second time and then just exit it the detail page then finally shows the changed data.
Any idees on why this happens ?
In the logg I get
08/08/07 11:10:35 [2246] Reusing a cached session application module instance
And
oracle.jbo.JboException: queryByKeyValue: Argument Key Value cannot be null
Mette
<af:commandLink id="StartVeiEndreLikningsopplysninger"
text="#{nls['TABLE_TITLE_VEIENDRELIKNINGSOPPLYSNINGER']}"
action="dialog:StartVeiEndreLikningsopplysninger"
useWindow="true" partialSubmit="true"
launchListener="#{DialogLaunchHandler.handleDialogLaunch}"
disabled="#{processScope.inInfoEiendom!= 'true' or jhsUserRoles['SERG_LES']}"
windowWidth="1100" windowHeight="600"
returnListener="#{backing_show.backFromPopup}">
<f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
<f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
<af:resetActionListener/>
</af:commandLink>
public void backFromPopup(ReturnEvent returnEvent)
EL.set("#{requestScope.veiviser}",true);
FacesContext context = FacesContext.getCurrentInstance();
String currentView = context.getViewRoot().getViewId();
ViewHandler vh = context.getApplication().getViewHandler();
UIViewRoot x = vh.createView(context, currentView);
x.setViewId(currentView);
context.setViewRoot(x);
try { FacesContext.getCurrentInstance().getExternalContext().redirect("http://159.216.138.187:8989/SergWebApp-ViewController-context-root/faces/pages/InfoEiendom.jspx");
FacesContext.getCurrentInstance().renderResponse();
catch (IOException e) {
System.out.println("test");
Part of the pageDef.xml.
<executables>
<invokeAction id="queryByKeyValueInfoEiendomInvoke"
Binds="queryByKeyValueInfoEiendom" Refresh="prepareModel"
RefreshCondition="#{jsfNavigationOutcome=='DeepLinkInfoEiendom'||requestScope.veiviser}"/>

I also got it working by setting CacheResults'"false" in the page def, but now I am getting the following:
oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel makeCurrent
WARNING: ADFv: No row found for rowKey: [oracle.jbo.Key[31 ]].
Edited by: user13378799 on Sep 13, 2010 10:25 AM

Similar Messages

  • Howto refresh table after closing a popup

    Using JDev 11.1.1.3
    I have a table and a popup. The table is populated by records from a datacontrol.
    The popup has a form showing details of the selected record in the table. I also use that popup to create new records.
    I have problems when pressing the "OK" button on the dialog. The record is saved to the database, a commit has been executed but my table does not show the new record. I need to press F5 before i see the record.
    I have tried setting a partialTrigger to the table from the popup but that does not work.
    This is the dialogEvent code:
        public void enqueteListener(oracle.adf.view.rich.event.DialogEvent dialogEvent) {
           if(dialogEvent.getOutcome() != DialogEvent.Outcome.no) {
             BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
             OperationBinding operationBinding = bindings.getOperationBinding("Commit");
             operationBinding.execute();
             operationBinding = bindings.getOperationBinding("Execute");
             operationBinding.execute();
           else {
             BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
             OperationBinding operationBinding = bindings.getOperationBinding("Rollback");
             operationBinding.execute();
        }As you see the commit gets executed and after that i execute the Execute to refresh the table but it does not seem to work...
    How can i achieve that i do not longer need to press F5 so the record show up directly in the table after the OK button is clicked in the popup?

    Hi,
    you may add this helper method to your basking bean (or base backing bean)
    public void refreshUIComponent(UIComponent x) {
            AdfFacesContext.getCurrentInstance().addPartialTarget(x);
    }When using the addPartialTarget on your adf table component, it will refresh the table entirely.
    With the "fetching data....." message etc... (It is a bit heavy)
    What would be nice, is to refresh only the current row and not the whole table.
    How ?
    protected void refreshTableCurrentRow(RichTable xTable) {
            //Refresh Table UI Current Row
            Set<Object> selectedKeys = xTable.getSelectedRowKeys();
            assert selectedKeys.size() == 1;
            Object old = xTable.getRowKey();
            try {
                xTable.setRowKey(selectedKeys.iterator().next());
                List<UIComponent> colList = xTable.getChildren();
                Iterator iter = colList.iterator();
                while (iter.hasNext()) {
                    UIComponent col = (UIComponent)iter.next();
                    Iterator iterCol = col.getChildren().iterator();
                    while (iterCol.hasNext()) {
                        refreshUIComponent((UIComponent)iterCol.next());
            } finally {
                xTable.setRowKey(old);
        }And call it just after executing the "Execute" operation
    operationBinding = bindings.getOperationBinding("Execute");
    operationBinding.execute();
    refreshTableCurrentRow(getTable());
    Regards
    Nicolas

  • 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

  • Refresh Datagrid After Popup Data Edit

    Hi all,
    I'm fairly new to flex development, so please keep that in mind when trying to help... I may ask some really stupid questions!
    Basically what I'm trying to do is to refresh the source data of a datagrid ONLY when the popup window that I'm using to add/edit/delete records is closed.
    I have successfully captured WHEN the window closes... I can see the event happening in my datagrid component.  I used an Alert.show() to prompt me after the popup closes and the datagrid captures the close event.
    What I can't figure out for the life of me is how to refresh the datagrid's source data, when that source data is being called & populated from a "parent" component.
    How it works is like this...
    Search Component (6 drop down menus & 1 text input)
    |___Datagrid (displays all records by default, only records meeting search criteria upon clicking the "search" button)
      |______Popup window editor (this is called by passing the "ID" of the record I want to take action on into the popup window using a public variable when a user DOUBLE CLICKS a value in the datagrid)
    So let's say for instance you are looking at customer A.  Customer A's record loads into the popup window... and then let's say you want to delete that record for whatever reason.  Currently, when you click the "Delete Record" button in my application, the popup window closes, and from the looks of things, it dispatches the close event properly.  (I added an event listener to the datagrid component when I instantiated it in the search component), so when the popup window closes, the event listener fires and I have an Alert to tell me that yes, the close event was dispatched.
    I think I know "What" I'm doing wrong, but I don't know how to go about changing it to make it work.  Basically because the datagrid is populated IN the search component from an arraycollection, my attempts to "Refresh" the data in the datagrid component which captures the close event of the popup window won't work because the datagrid component has no visibility to the arraycollection used in the search component to populate said datagrid component.
    I know that the record is being deleted, as if I actually click the "search" button again, the record does disapear from the datagrid.  How do I force that to happen automagically when the popup form closes?
    I can provide a code refernce if I need to... gonna take a bit though as alot of what I've built has references to client's data which I'd have to remove.
    If anyone could provide some insight here, or a direction I would appreciate it.  I've looked at a number of solutions so far, and I've not had luck with any of them.

    Hi all,
    I'm fairly new to flex development, so please keep that in mind when trying to help... I may ask some really stupid questions!
    Basically what I'm trying to do is to refresh the source data of a datagrid ONLY when the popup window that I'm using to add/edit/delete records is closed.
    I have successfully captured WHEN the window closes... I can see the event happening in my datagrid component.  I used an Alert.show() to prompt me after the popup closes and the datagrid captures the close event.
    What I can't figure out for the life of me is how to refresh the datagrid's source data, when that source data is being called & populated from a "parent" component.
    How it works is like this...
    Search Component (6 drop down menus & 1 text input)
    |___Datagrid (displays all records by default, only records meeting search criteria upon clicking the "search" button)
      |______Popup window editor (this is called by passing the "ID" of the record I want to take action on into the popup window using a public variable when a user DOUBLE CLICKS a value in the datagrid)
    So let's say for instance you are looking at customer A.  Customer A's record loads into the popup window... and then let's say you want to delete that record for whatever reason.  Currently, when you click the "Delete Record" button in my application, the popup window closes, and from the looks of things, it dispatches the close event properly.  (I added an event listener to the datagrid component when I instantiated it in the search component), so when the popup window closes, the event listener fires and I have an Alert to tell me that yes, the close event was dispatched.
    I think I know "What" I'm doing wrong, but I don't know how to go about changing it to make it work.  Basically because the datagrid is populated IN the search component from an arraycollection, my attempts to "Refresh" the data in the datagrid component which captures the close event of the popup window won't work because the datagrid component has no visibility to the arraycollection used in the search component to populate said datagrid component.
    I know that the record is being deleted, as if I actually click the "search" button again, the record does disapear from the datagrid.  How do I force that to happen automagically when the popup form closes?
    I can provide a code refernce if I need to... gonna take a bit though as alot of what I've built has references to client's data which I'd have to remove.
    If anyone could provide some insight here, or a direction I would appreciate it.  I've looked at a number of solutions so far, and I've not had luck with any of them.

  • How to refresh the page/table after completion of taskflow in popup

    Hi,
    Scenario:
    In main page, having an emp-table and popup(which contains taskflow as region). In taskflow, iam modifying the emp-table data and after successfully completion of taskflow, want to refresh the emp-table present in the main page. How can we do this...?
    Note:
    (1) In Taskflow last activity is 'taskflow-return', where iam commiting all the data.After this i want to refresh the emp-table,(pop-up closes when it reaches last activity).
    (2) Tried PPR in bean code of main page, it refreshes, but before commiting.
    Something like, Refreshing the entire page either closing/hiding of popup, will help......?
    Regards.

    try with regionNavigationListener:
    public void myRegionNavigationListener(RegionNavigationEvent event) {
          String newViewId = event.getNewViewId();
          if (newViewId == null) { // null new view id indicates the taskflow has ended !
                refreshEmpTableSomehow();
    }As one alternative, take a look at my last message from this thread:
    Re: How to handle the "cancel" button and "close" icon of a popup ?
    Edited by: Cvele_new_account on Oct 5, 2012 12:19 AM

  • Refresh the table after closing the Popup iView

    Hi all,
    I have list of survey in my table. In that table i have toolbar button(DELETE) for deleting the survey. While deleting the survey it asks the confirmation. If we click Ok it delete the selected survey and close the popup also. what I want is I should refresh the table after closing the Popup.How can i achieve this?
    Help me in this regard.
    Thanks & Regards,
    Hemalatha J

    Hi Hema,
    Check this link.
    Visual Composer - You can do anything....
    In this blog, they are used 'Refresh' Button and a Hidden 'Plain text' message to solve this problem. If you are satisfy with this you can take this solution.
    Or you can try to trigger the 'Submit' action of 'Input form' once again from the 'Popup window' when the 'Delete' button is clicked.
    Hope it helps...
    Regards
    Basheer
    Edited by: Basheer on Dec 23, 2008 8:03 PM

  • Tables in popups not refreshing

    I'm having difficulty with some table refreshes within a popup. Here's my scenario. I have a window that displays a table. The user clicks edit, and the table is shown in an “edit” popup. At this point, if the user makes changes, clicks ok, then the table on the beginning page is refreshed correctly. To do this, I am using the following method to refresh the page fragement, AdfFacesContext.getCurrentInstance().addPartialTarget(this.getViewTablex());
    Here is the issue,
    The user chooses to edit the main table, and the edit popup appears. So far so good. The user then wants to add a new record, they click “Add” within the edit popup so I then show a new popup form where the user enters the fields for the new row. When they click ok on the "add" popup form, then the edit popup (from which they called the add popup) does not refresh the table with the newly added row. The row they added then appears as the first row in the edit popup.
    What further complicates this is that I have to validate the "edit" popup rows when they click ok, to make sure all the data is valid, so I can not do a commit on the underlying table until after the validation. But, I need the newly added row in the table (or view) in the edit popup as part of my validation.
    So, I have a table that makes use of an edit table popup that in turn makes use of an add form popup. But I cannot commit until I validate the edit popup. The problem is I’m not getting the newly added row that was created in the “add” popup to show up in my edit popup.
    Here is the add popup handler I’m using
    public void onAddxxxPopupFetchAction(PopupFetchEvent pPopupFetchEvent) {
    try {
    OperationBinding lOperationBinding =
    lBindings.getOperationBinding("CreateInsert");
    //If the Insert failed, return a "Severe" message.
    Object result = lOperationBinding.execute();
    if (!lOperationBinding.getErrors().isEmpty()) {
    return;
    } catch (Exception e) {
    public void addxxxDialogOKAction(DialogEvent pDialogEvent) {
    try {
    //refresh the page fragment.
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getEditPopupTable());
    } catch (Exception e) {
    And here is the popup portions of the page fragment
    <af:popup id="addPopup" contentDelivery="lazyUncached"
    popupFetchListener="#{backingBeanScope.backing_ui_pages_Maintenance. onAddxxxPopupFetchAction }"
    popupCanceledListener="#{backingBeanScope.backing_ui_pages_Maintenance.onAddxxxPopupCancelAction}">
    <af:dialog id="addDialog"
    dialogListener="#{backingBeanScope.backing_ui_pages_Maintenance. addxxxDialogOKAction }"
    closeIconVisible="false">
    and for the edit popup;
    <af:popup binding="#{backingBeanScope.backing_ui_pages_Maintenance.editPopup}"
    id="editPopup">
    <af:dialog binding="#{backingBeanScope.backing_ui_pages_Maintenance.editDialog}"
    id="editDialog" closeIconVisible="false"
    dialogListener="#{backingBeanScope.backing_ui_pages_Maintenance.editxxxDialogOKAction}">
    I am using JDeveloper 11.1.1.6.0.
    Any help would be appreciated.
    thanks!
    Doug

    Seems like a PPR issue. Try have a partialTrigger corresponding to the OK button of add popup on the table in the edit popup.
    Thanks,
    TK

  • Oracle ADF - Refresh quick query for a table in the pop up.

    Hi,
    I am using Oracle jDev 11.1.1.4.0
    In my application I have a Find button in jspx.
    Onclick of Find button, a popup opens.
    When I search for a record by name in QuickQuery, suppose - I entered name as jon.
    It gives me the correct result.
    Now when I close the pop up and again click on Find button, that previous search remains as it is in the pop up
    and also the previous criteria in quick query search region as "jon".
    I have changed the refresh property of iterator(of table in popup) in pageDef
    But still not working...
    How to refresh that search region for every subsequent Find click.
    Appreciate your help.
    Thanks,
    Madhav

    do u changed refresh > ifneeded or always.
    user.
    r u luking for partially page rendering.
    by using ppr. we can refresh.
    if so.
    http://www.adftips.com/2010/10/adf-ui-refreshing-page-or-region.html
    http://biemond.blogspot.com/2007/11/how-to-refresh-region-in-jdeveloper-11g.html
    Re: ADF Region Interaction
    Edited by: Erp on Sep 27, 2011 4:37 AM
    Edited by: Erp on Sep 27, 2011 4:42 AM

  • ADF Question: Set focus in table after ppr

    Hi all,
    I am using JDeveloper 10.1.3.3 with ADF and BC.
    In my table I have two editable fields, itemCode and quantity.
    When I hit enter in the itemCode, I execute a method in the backing bean, and the table is ppr refreshed.
    After that, I want the focus to go to the next field, quantity.
    I have tried following this example: http://www.bloggingaboutoracle.org/archives/focussing-conditionally-in-a-table-after-a-partial-page-refresh
    However, the focusItem string never has the row index included. So the focus never gets set correctly.
    Next I tried doing it via javascript, changing the focus after the event by adding a partial target to a script tag that sets the focus. However, the row index at this time is not what it was at the time of entering the itemCode.
    It looks like the rowIndex (ie: form1:table1:rowIndex:quantity) is changing after the ppr event. At the beginning (when entering the item) it is 0, but after the ppr, it is 1 or 3 or something else...
    How can I get this row id? OR how can I go about setting the focus to that next field (quantity) after the ppr?
    Thanks,
    Heather

    Hi,
    the row index should always be in synch with the underlying binding. So if you get the current rows position in the iterator then you know its index in the table
    Frank

  • How to update ADF VO object to refresh the data in ADF Pivot table

    I need to know how to update the View object so that the date in pivot table is refreshed/updated/filtered.
    here are the steps I performed to create ADF pivot table application using VO at design time.
    1) created a collection in a Data Control (ViewObject in an ApplicationModule) that provides the values I wanted to use for row and column labels as well the cell values (Used the SQL query)
    2) Dragged this collection to the page in which wanted to create the pivot table
    3) In the pivot table data binding editor specified the characteristics of the rows (which attribute(s) should be displayed in header), the columns (likewise) and the cells.
    Now, I have a requirement to update/filter the data in pivot table on click of check box and my question is how to I update the View object so that the date in pivot table is refreshed/updated/filtered.
    I have got this solution from one of the contact in which a WHERE clause on an underlying VO is updated based upon input from a Slider control. In essence, the value of the control is sent to a backing bean, and then the backing bean uses this input to call the "filterVO" method on the corresponding AppModule:
    but, I'm getting "operationBinding" object as NULL in following code. Please let me know what's wrong.
    here is the code
    Our slider component will look like
    <af:selectBooleanCheckbox label="Unit" value="#{PivotTableBean.dataValue}"
    autoSubmit="true" />
    The setDataValue() method in the backing bean will get a handle to AM and will execute the "filterVO" method in that, which takes the NumberRange as the input parameter.
    public void setDataValue(boolean value) {
    DataValue = value;
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("filterVO");
    Object result = operationBinding.execute();
    The filterVO method in the AMImpl.java will get the true or false and set the where Clause for the VO query to show values.
    public void filterVO(boolean value) {
    if (value != null) {
    ViewObjectImpl ibVO = getVO1();
    ibVO.setWhereClause("PRODUCT_TOTAL_REVENUE(+) where rownum < 10");
    ibVO.executeQuery();
    }

    Did you define a filterVO action in your pagedef.xml file?
    You might want to read on how to access service method from a JSF Web Application in the ADF Developer Guide for 10.1.3 chapter 8.5

  • Maintain the current row position of a table after refresh.

    Hi,
    I use a poll to refresh tables continuously. when a table is refreshed, the current referring row is reset.
    To maintain the current row position after a refresh I use the following poll method.
    public void refreshTableT1(PollEvent pollEvent) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding dcb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bindings1 = (DCBindingContainer) dcb.getValue(fctx);
    DCIteratorBinding dciter = bindings1.findIteratorBinding("<VOIterator>");
    if(dciter!=null){
    if(dciter.getCurrentRow()!=null){   
    Key current_row_key = dciter.getCurrentRow().getKey();
    dciter.executeQuery();
    if(current_row_key!=null){
    try{
    dciter.setCurrentRowWithKey(current_row_key.toStringFormat(true));
    }catch(Exception ex) {
    System.out.println("Exception in current_row_key");
    }This works for normal tables well. But when I use it to master-detail tables (pair of tables) it does not.
    At the master-detail tables, before the first data fetch, it works well. if we go below the first data fetch, it sets the current row into another position.
    how can I overcome this...??
    Thanks,
    Dinuka.

    Hi Mr.Frank,
    I have an association in two VOs.
    for example: There are 2 tables called Emp and Dept. Every Department has Employees. so there is an association (both tables have a common column). Master table is the Dept table. when you click on one record of the Dept table Detail table will show the details of the employees belongs to that selected department. That's what I referred as master-detail tables. first one is master table; second one is detail table.
    When the web page loads all the table data is not fetched from the db (it will depend on the fetch size). when we scroll down the table data fetch happens again and again.
    think my data fetch size is 25 rows per time.
    Suppose we use mine poll method and think I have clicked on the 20 ^th^ row of table1(master table). then the table2 will display details belongs to selected department. that is OK even after refresh. that works well.
    when I go to 30 ^th^ row data fetch will happen (my fetch size = 25)
    when I click on the 30 ^th^ row of the table1(master table), table2 will display details belongs to selected department. but after the poll method is called the selected row at the table1 disappears and is set to another position. now the 30 ^th^ row is not in the 30 ^th^ position. but it is the selected row and table2 displays correct details.
    I think you have got the problem now. :D
    Thanks a lot.
    Dinuka.

  • Refreshing ADF Query Component after changing some property of a criteria

    Hi All
    Use Case : Refreshing ADF Query Component after changing some property of a criteria attribute.
    I have a query panel with 2 query criteria i.e. FirstName and DepartmentId where in DepartmentId is a drop down. The scenario is like when change the value of DepartmentId to 'Finance' with code value of '100' then my criteria attribute 'Firstaname' should be invisibe(queriable=false).
    Approach: Have overriden the queryOperationListener of adfquery as " queryOperationListener ="#{backingBeanScope.backing_queryLstener.processQueryOperation}" "
    My backing bean method goes as below :
    public void processQueryOperation(QueryOperationEvent queryOperationEvent) {
    // Add event code here...
    if( queryOperationEvent.getOperation().equals(queryOperationEvent.getOperation().CRITERION_UPDATE) ){
    DCBindingContainer bindings = (DCBindingContainer)this.getBindings();
    DCIteratorBinding iter =bindings.findIteratorBinding("EmployeeView1Iterator");
    ViewObjectImpl voimpl = (ViewObjectImpl)iter.getViewObject();
    ViewCriteria vc = voimpl.getViewCriteriaManager().getViewCriteria("EmployeeViewCriteriaDemo");
    Row currRow = vc.first();
    System.out.println("Department :"+currRow.getAttribute("DepartmentId"));
    if( (Integer)currRow.getAttribute("DepartmentId") ==100 ){
    AttributeDef[] attrs = voimpl.getAttributeDefs();
    int attrIndex = voimpl.getAttributeIndexOf("FirstName");
    ViewAttributeDefImpl attrDef = (ViewAttributeDefImpl) attrs[attrIndex];
    attrDef.setQueriable(false);
    // AdfFacesContext.getCurrentInstance().addPartialTarget(getQryId1()); //here i need to refresh the query component which is not happening
    // refreshQueryComponent(getQryId1());
    Everything is happening as expected but the query panel s not get refreshed.When i refresh the whole link/page then i can see the change.
    Please suggest.
    Thanks in adv.
    -Sanjeeb

    Hi,
    can's say anything about the first part of the question as more insight to the implementation would be required. However, have a look at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/83-bidi-synchronization-tree-form-401841.pdf, which may be what you are looking for
    To the second part: You can programmaticallly refresh the tree component from a managed bean. So instead of using the declarative PPR option (or ChangeEventPolicy set to PPR on the iterator binding) you can wire the submit button to the managed bean, perform your validation and if it fails don't refresh teh tree
    The call is
    AdfFacesContext.getCurrentInstance().addPartialTarget(the_tree_instance)
    Frank

  • Creating new row right after popup opens (JBO-35007 because of  trigger)

    Hi,
    I have the same popup (with an ADF form) to add and to edit data. But i have two buttons which displays this popup - Add new and Edit, Edit works OK, on add, i insert new record like this:
            DCIteratorBinding dciter =
                (DCIteratorBinding)bindingContainer.get(iterator);
            ViewObject view = dciter.getViewObject();
            Row newRow = view.createRow();
            view.insertRow(newRow);
            view.setCurrentRow(newRow);before popup is open. And it adds a new record. But the record has id -10 (or some other negative number). This -10 is shown on calling page (the page from which the popup is open) in ADF ReadOnly table as -10 as id and other cells in row empty. That shouldn't happen (se bellow why). User then edits empty form in popup, and commits - then i get JBO-35007 because -10 changed to 123 - because of trigger.
    I tried to requery - it doesn't help, see Refresh after pop-up window closes.
    Can you suggest a solution on how to create a row right after popup opens?
    Also,
    i create new record on button's LaunchListener method. This method seems to execute before popup is open and so it affects the calling page also. I think the problem would be solved if new row would be created after popup is opened, not while opening it. (clicking create in popup works fine)

    in my real case, i usually don't show ids; but to simplify debugging, i created test project where i show as many things as possible.
    you mean, creating new record like following?
            bindings.getOperationBinding("Create").execute();I don't use that because i don't get empty fields in popup window (although new record is created). Actually, i don't know how to set this created record to be selected one. Suggestions?
    And I did some more testing, if I create new record with clicking on Create (not creating new row automatically), i get JBO-35007 only if there was selected any other than the first row in table.
    and i tried to move create method binding in pagedef, so it's the first one.. But it seems like there is no effect.
    btw, i found this in one of examples on web:
       <invokeAction Binds="Execute"
                      id="refreshTableViewObjectAfterAddingNewApp"
                      Refresh="prepareModel"
                      RefreshCondition="#{processScope.addedNewApp}" />refresh condition must be true when adding new row and false for everything else. I'm not sure what that does, but it seems to work... :)
    I really shouldn't use the same View Objects in popup and 'master' page, should I?

  • ADF Pivot table - Custom Pivot

    Hello ADF Experts,
    I would like to pivot to row/column using my custom method than using the default API as ADF pivot table does not support asymmetric pivoting.
    For example I have below as base grid:
    Product
    Geography
    Sales
    Prod1
    US
    100
    Prod2
    IN
    50
    UK
    30
    If I move Geography to columns, it will create invalid layout.
    Product
    Sales/US
    Sales/IN
    Sales/UK
    Prod1
    100
    Prod2
    50
    30
    Now you can observe that Prod1->Sales/IN, Prod1->Sales/UK and Prod2-> Sales/US is empty which is not in sync with my database as there are values 200, 300, 40 respectively.
    To avoid such empty cells, I would like to write my custom method to fetch the new values while pivoting.
    How can I do this?

    Hi Timo,
    Jdev version: 11.1.1.7
    Custom method will be my method which will pivot to columns as well as populate the empty cells(the cells which are created by asymmetric layout).
    Basically I would like get the new grid data after pivoting and refresh the pivot table if its asymmetric with empty cells.
    Unfortunately my data is in PageFlowScope so it doesnt get refreshed.
    Regards,
    Suresh

  • Can not refresh page after save properly(When not saving master record)

    I am using jdeveloper 11g R2 (11.1.2.3) JSF Facelet
    In some use case I have Address as master table and Person as detail table
    For some business reason I need to don't save same addresses
    eg:
    If +1 Test St+ is in database already and new user coming and adding this address with new person
    I need to use the row in database not creating a new address
    I do saving in doDML method of Address with some hashing algorithm and it is fine
    My problem is that I can not refresh page after save properly
    User coming to page think Adding a new address and a new person but in fact no new
    address added because of business I describe above
    Any ideas how I can implement this?
    Appreciate that
    Regards
    Mohsen

    Hi,
    from your description it is not clear why the page doesn't refresh. It could be a problem in your implementation code - who knows. What if you perform the address check on a command button that actually submits the new address? If the check returns true (address exists) you would call row.refresh(forget new row); and re-query the view object so the address coming from the database is displayed. If you wanted to use the doDML then yuou need to be aware that doDML doesn't help removing the row the user created. It just ignores the database update but the entity is still around, which in my suggested solution wont be the case.
    Frank

Maybe you are looking for

  • Deletion of Open Reservations

    Hi How to delete open reservations in mass. pl help me out. regards ssp

  • Purchasing Queries/Reports in SAP BW

    Hi, Could you please updated me with the delivered Business Content version of Queries and cube on Purchasing in BW Thanks

  • Custom operator for advanced search in OIM

    Hi All, We have two operators like Equals and Begin with in Advanced users search. I want to search with new operator, Can we add any other new operators Regards user7609

  • Sending flash quiz results to an LMS

    Hey Guys, Using Flash CS3, having issues getting flash to send quiz results to a LMS. Using the Flash quiz templates, exporting with SCORM 1.2 compliance. The LMS is able to track times attempted and if the lesson was complete or not, however the qui

  • Spot removal bug in LR 5.3 for Mac??

    I have been working on a photo in LR 5 trying to remove dust spots. I can select but they don't go away. Opened in LR 4 and it works fine. Anyone have an idea on how to fix? Thanks.