REFRESH_UNDO_CHANGES

Hello

I have trouble when I use Refresh Row.REFRESH_UNDO_CHANGES, the problem presents when I have a view object with a base entity object and other objects of entity working as references...

The framework always trigger a need validation the required fields in the referenced entities.


In my case, I need just to cancel changes to the current line. I have to restore, otherwise, all the data of the other objects on view will be gone.


Scenario:

1. click on a button (partialSubmit = true), that opens a popup via a showPopupBehavior (TriggerType = click on)

2 window popup dialog (type yesNo) opens

3 line current of the iterator and make: currentRow.refresh(Row.REFRESH_UNDO_CHANGES |) Row.REFRESH_WITH_DB_FORGET_CHANGES)

4. click on Yes and navigates to a different page, when I click on any button and I get a lot attribute requires errors.


It is an example of the error I get for an attribute that is of the referenced entity.


< Utils > < buildFacesMessage > ADF: addition of the following JSF error message: Employee Id attribute is required.

  • oracle.jbo.AttrValException: Houston-27014: employee Id attribute is required.

at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java:252)

at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:3219)

at oracle.jbo.server.EntityCache.validate(EntityCache.java:3634)

at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:2576)

at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2666)

at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4577)

at oracle.adf.model.bc4j.DCJboDataControl.validate(DCJboDataControl.java:1620)

at oracle.adf.model.binding.DCBindingContainer.validateReferredDataControls(DCBindingContainer.java:4411)

at oracle.adf.model.binding.DCBindingContainer.validateInputValues(DCBindingContainer.java:4327)

at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4259)

at oracle.adf.controller.internal.binding.TaskFlowRegionController.validateRegion(TaskFlowRegionController.java:311)

at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4249)

at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:303)

at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:71)

to oracle.adf.controller.v2.lifecycle.Lifecycle$ 6.execute(Lifecycle.java:190)

at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)

at $200 (ADFPhaseListener.java:34) oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access

to oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$ 3.after(ADFPhaseListener.java:428)

at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:88)

at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)

at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:520)

at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)

to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)

at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)

at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)

to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:446)

at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:446)

at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)

at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)

at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)

at java.security.AccessController.doPrivileged (Native Method)

at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)

at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)

at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)

at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)

to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)

at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)

at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)


I do not understand this behavior, because I create entities such as the term of reference. Could you help me?


User, tell us your version of jdev, please!

The attribute which denounces the error is the pharmacokinetics of a referenced child eo?

Have you only tried with REFRESH_WITH_DB_FORGET_CHANGES?

Timo

Tags: Java

Similar Questions

  • Refresh an inputText after the call for immediate action = 'true '.

    Hello

    I use JDevelopper 11.1.2.4, I have a table with a column of 3 2 of them are mandatory and a button with the immediate attribute set to true to ignore validation rules.

    the button call action from bean to support that restore the current row by using the code below:

    {} public void actionAnnulerException (ActionEvent event)
    insertAutorise = true;
    editionAutorise = true;
    UtilityBean.executeMethodFromBinding ("Rollback");
    DCIteratorBinding iter = (DCIteratorBinding) UtilityBean.getBindings () .get ("ExceptionActivite1Iterator");
    Line = iter.getCurrentRow ();
    Whole EntityState = (Integer) row.getAttribute ("entityState");
    if(EntityState==0) row.refresh (row. REFRESH_REMOVE_NEW_ROWS);
    else row.refresh (row. REFRESH_UNDO_CHANGES | line. REFRESH_WITH_DB_FORGET_CHANGES);
    AdfFacesContext.getCurrentInstance () .addPartialTarget (inputDateFin);
    return;

    }

    But even if I add a partialTarget to the date. MinValue value are not updated after the action.

    Thank you;

    KHALIL

    Hello

    Please check this:http://adfpractice-fedor.blogspot.com/2012/02/understanding-immediate-attribute.html

    Kind regards

    Habib

  • get the entity level validation error after clicking the Cancel button

    Hi Experts,

    JDEV 12.1.3.0

    I have a popup and I create several rows in a table. And when you click on CANCEL, I get the validation error level feature on the home page.

    Cancel call the method below and also set immediate = "true".

    /*

    * return allchanges

    */

    {} public void refreshRemoveNewRow (rank)

    If ((row) .getNewRowState (ViewRowImpl) () == Row.STATUS_INITIALIZED) {}

    Row.Refresh (Row.REFRESH_UNDO_CHANGES + Row.REFRESH_REMOVE_NEW_ROWS + Row.REFRESH_FORGET_NEW_ROWS);

    } else {}

    Row.Refresh (Row.REFRESH_UNDO_CHANGES + Row.REFRESH_FORGET_NEW_ROWS);

    }

    }

    If I try with Rollback I get Transaction has expired. My behavior of workflow is also use existing Transaction if Possible.

    Thank you

    Roy

    Hello

    Try again with

    public void refreshRemoveNewRow(Row row) {
       if (((ViewRowImpl)row).getNewRowState() == Row.STATUS_INITIALIZED) {
             row.refresh(Row.REFRESH_UNDO_CHANGES +  Row.REFRESH_REMOVE_NEW_ROWS);
        } else {
             row.refresh(Row.REFRESH_UNDO_CHANGES + Row.REFRESH_FORGET_NEW_ROWS);
        }
    }
    

    Beside that, can you post the jdev console stack trace, to see which exactly entity and validator is in question...

  • On cancel and opening popup showing again old unsaved values.

    Hi Experts,

    12.1.3 JDEV

    On cancel and opening popup showing again old unsaved values.

    I've done an insert to create inside a pop-up window and clicking on cancel without saving the changes.

    When I revisited the popup still his watch earlier create insert records. Popup content delivery has immediate value.

    I call on cancel

    DCIteratorBinding iteratorBinding = ADFUtils.findIterator ("DetailsVO1Iterator");
    Line = iteratorBinding.getCurrentRow ();
    {if(Row!=null)}
    refreshRemoveNewRow (row);
    }

    {} public void refreshRemoveNewRow (rank)
    If ((row) .getNewRowState (ViewRowImpl) () == Row.STATUS_INITIALIZED) {}
    Row.Refresh (Row.REFRESH_UNDO_CHANGES + Row.REFRESH_REMOVE_NEW_ROWS);
    } else {}
    Row.Refresh (Row.REFRESH_UNDO_CHANGES + Row.REFRESH_FORGET_NEW_ROWS);
    }
    }

    Thank you

    AR

    Maybe you can try with: ResetUtils.reset (yourPopup) http://jdevadf.oracle.com/adf-richclient-demo/docs/apidocs/oracle/adf/view/rich/util/ResetUtils.html

    Dario

  • How to get back to the starting point after insertion to create

    Hi Experts ADF,

    JDeveloper 12 c,

    I have a home page with a table. In the table, there is a button to create. If the user clicks on create a button, a window opens.

    In the context menu if the user clicks on CreateInsert 2 times not save anything and close the pop-up window. I see these 2 empty lines in the home page as well.

    So, how to avoid these 2 lines when the user closes the popup.

    Thank you

    Ray

    Yes, it is a. call this method and provide the current row of the iterator as a parameter:

    public void refreshRemoveNewRow(Row row) {
        if (((ViewRowImpl)row).getNewRowState() == Row.STATUS_INITIALIZED) {
                row.refresh(Row.REFRESH_UNDO_CHANGES +
                            Row.REFRESH_REMOVE_NEW_ROWS);
        } else {
                row.refresh(Row.REFRESH_UNDO_CHANGES +
                            Row.REFRESH_FORGET_NEW_ROWS);
        }
    }  
    
  • Discover changes to the object attribute - value old &amp; new value

    JDeveloper: 11.1.1.7.1

    I'm trying to manage a Cancel button that changes rollsback to the previous state (not necessarily state DB). If an attribute in my VO passes from the

    A (DB State)-> B-> C

    This scenario is a UI master-child - where, in the transition is on the child entity in a popup with options save/Cancel. The real DB except happens however on the master file.

    In this regard, if a user changes from a

    A (DB State)-> B-> C

    on the child by clicking on save on the popup of the child, how can we return to State B, which is the last valid state for this child.

    Takes VO.refresh (REFRESH_UNDO_CHANGES) he State A - is therefore not a valid application.

    After traveling a lot, wonder if it is a gap in the ADF - esp. around usecases Master-child where the actual validation happens at the master level.

    User, this is a misunderstanding on the side. ADF has only the status of the db and no other intermediate States. A transaction is performed on all changes since the last commit of a module of application taking the transaction. Tuts had nothing to do with the relationship master detail.

    We could call this behavior a flaw in the adf, but as long as no one calls for an enhancement request with support.oracle.com which could be implemented, ADF works as designed and documented.

    Timo

  • Not able to reset the InputText binding

    Hi team,

    Jdev - 11.1.1.6

    Scenario-

    I have a jsff page (bankPage) and in which I have a few inputtext, Radiobutton, etc.

    On the same page, I have a button Save and Cancel button.

    When I come to the page and I try to enter a value in the input field and click on the button cancel, its not reset my InputText value.

    When I'm on the same page again, I can learn my value previously entered in Input text fine that I clicked on Cancel.

    I wrote Action Listnere on the Cancel button and wrote code below

    input.resetValue() ;

    adfFacesContext.addPartialTarget(input);

    But this is not resettiing my values.

    I also tried ResetUtils.reset (input);

    But still not able to reset my IputText.

    Please help me,

    Thanks in advance.

    Thank you

    Céline

    then, instead of food, try it with

    Row.Refresh(Oracle.jbo.Row.REFRESH_UNDO_CHANGES |)  Row.REFRESH_FORGET_NEW_ROWS);

  • Table not refreshing after the cancellation of the changes.

    Dear friends Jdev.

    We head to the last stages of the migration of our desktop application for the web app adf based and serious problems come lately.

    We use arrays of the ADF to alter data in the form of bulk... When we made changes in the editable fields and the user cancels them ADF operating tables are not updated. I mean the changed data of the iterator are indicated in the tables and the original data are displayed when I click on the next record in the table or reload the page.

    I'm pasting my code.

    {} public void onCancelListener (ActionEvent actionEvent)

    setDmlMode (null);

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding pmIter = bindings.findIteratorBinding("AgeingParamsIterator");

    pmIter.getCurrentRow (.refresh (Row.REFRESH_UNDO_CHANGES));

    pmIter.executeQuery ();

    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance ();

    adfctx.addPartialTarget (tblAgeing);

    adfctx.addPartialTarget (socModule);

    }

    my table is 'tblAgeing' and the component inside the table, I'm editing is "socModule".

    for the iterator, I set CacheResult to false.

    I wonder even after execution of the iterator again why the data is not updated?

    Ashraf

    Have you tried tag?

  • Problem with rear roller with continue combination

    Experts,

    I work in JDev 11.1.1.6.0. I am facing a problem when I roll with the combination continue.

    My code snippet

    While (VO.hasNext ())

    {

    Try

    {

    Row = (Row) VO. Next();

    business logic

    getDBTrasaction () .commit)

    }

    catch (System.Exception e)

    {

    getDBtransaction () .rollback (); / /

    continue;

    }

    }

    Imagine that I have 3 rows and 1 rank obtained exception and roll back and continue doing it then but vo.next still give/pointing to the same line because rollback ADF will reset the current line to the first always, but I want to continue to the next rank, how can achieve us?

    Pouvez one facing this kind of problem?

    -Thank you.

    When a downturn comes all iterators open have their current line pointer, reset the first record in the defined folder, so what is needed to restore the current row of the iterator after making back. This can be done either by the creation of the current line of iterator or does not call back himself and use the following code to refresh the current line and commit the transaction.

    catch(Exception e)
    {
    if (currentrow != null) {
    currentrow .refresh(currentrow.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS);
    getDBTrasaction().commit()
    }
    }
    
  • handle double click on a table row

    Hi all

    In the link below

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/56-handle-DoubleClick-in-table-170924.PDF

    Popup is implemented

    < af:table value = "#{bindings.allEmployees.collectionModel} '"

    selectionListener ="

    "#{bindings.allEmployees.collectionModel.makeCurrent}".

    < / af:column >

    ...

    < af:clientListener method = "handleTableDoubleClick".

    Type = "dblClick" / >

    < af:serverListener type = "TableDoubleClickEvent".

    Method = "#{empbean.handleTableDoubleClick}" / >

    < / af:table >

    < af:popup id = "p1" binding = "#{allEmployeesBean.editEmployees} '"

    contentDelivery = "lazyUncached" >

    "< af:dialog id ="d2"type ="none"ITRE ="... "resize ="on">

    < af:panelFormLayout id = "pfl1" >

    < af:selectOneChoice... >

    ...

    < / af:selectOneChoice >

    < af:inputText value =... >

    ...

    < / af:inputText >

    ...

    < / af:panelFormLayout >

    < / af:dialog >

    < / af:popup >

    < af:resource type = "javascript" >

    function handleTableDoubleClick (evt) {}

    var table = evt.getSource ();

    AdfCustomEvent.queue (table, "TableDoubleClickEvent", (), true);

    evt. Cancel();

    }

    < / af:resource >

    {} public void handleTableDoubleClick (EC ClientEvent)

    Popup RichPopup = this.getEditEmployees ();

    no indication means that popup is launched in the

    Center of the page

    RichPopup.PopupHints ph = new RichPopup.PopupHints ();

    Popup.Show (pH);

    }

    {} public void onSubmitPopup (ActionEvent actionEvent)

    Popup RichPopup = this.getEditEmployees ();

    Popup.Hide ();

    refresh the table

    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance ();

    adfctx.addPartialTarget (getEmployeesTable ());

    }

    {} public void onCancel (ActionEvent actionEvent)

    Undo changes

    Table richeTableau = this.getEmployeesTable ();

    Model CollectionModel = table.getValue ((CollectionModel));

    JUCtrlHierBinding = treeBinding

    Model.getWrappedData ((JUCtrlHierBinding));

    Iterator = DCIteratorBinding

    treeBinding.getDCIteratorBinding ();

    Line rw = iterator.getCurrentRow ();

    RW. Refresh (Row.REFRESH_UNDO_CHANGES);

    Popup RichPopup = this.getEditEmployees ();

    Popup.Hide ();

    }

    For my use case.

    I want to execute a function on double click.

    From now on, I am able to run it on single click inside makeCurrent.

    < af:table value = "#{bindings.allEmployees.collectionModel} '"

    selectionListener ="

    #{bindings.allEmployees.collectionModel.makeCurrent} ">"

    {} public void makeCurrent (SelectionEvent selectionEvent)

    Table richeTableau = (RichTable) selectionEvent.getSource ();

    Object selectedRowData = table.getSelectedRowData ();

    SomeBean rowdata = selectedRowData (SomeBean);

    }

    {} public void handleTableDoubleClick (EC ClientEvent)

    I want to make the features inside makeCurrent here

    }

    User is simple java.

    Javadoc for ClientEvent tells you that you get the component that has been the source of the event by (not with getSource() as I told you last time of memory)

    {} public void handleTableDoubleClick (EC ClientEvent)

    Object obj = ce.getComponent ();

    UIComponent ui = (UIComponent) obj;

    UIComponent component = ui.getParent ();

    //...

    }

    If you're lucky, the user interface component that you get from the event of the customer's table (I can't check because I'm not in front of the pc).

    Timo

  • Clear lines of VO without using Rollback

    Hello

    I use JDeveloper 11.1.2.3.0

    I am trying to create a set of rows programmatically in a method within the AMImpl.

    Whenever this set of rows is created in the VO I should erase the lines of VO and enter the new set of rows with values.

    I need, do the following to dynamically display components on the page.

    But given that some names of similar components whenever rowset is created that gives an exception like

    oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the primary key oracle.jbo.Key

    How can the VO be cleared each time before adding a set of lines in there.

            ViewObject vo = this.getAsfiledVO();
                 vo.clearCache();
                vo.executeQuery();
    ....
    ....
                    NameValuePairs nvp = new NameValuePairs();
                    nvp.setAttribute("Fieldname", currentField.getFieldName());
                    nvp.setAttribute("Fieldtypecode", "03");
                    nvp.setAttribute("Intvalue", currentField.getFieldValue());
                    Row row = rowset.createAndInitRow(nvp);
                    rowset.insertRow(row);
    
    

    Kind regards

    Nigel.

    You can browse the lines and for each row call something like:

    Row.Refresh (rank. REFRESH_UNDO_CHANGES | line. REFRESH_REMOVE_NEW_ROWS);

    Dario

  • Calendar of the ADF: Drag and Drop

    Dear all,

    I tried to add the drag and drop functionality provided by Oracle ADF to a calendar that displays events from the database.

    < af:calendar id = 'c4' value = ' #{bindings. " CalendarView1.calendarModel}.

    calendarActivityListener = "#{CalendarBean.activityListener}" > "

    < af:calendarDropTarget dropListener = "#{CalendarBean.handleDrop}" action = "MOVE" / > "

    < / af:calendar >

    The "CalendarBean" code is that provided in the Oracle ADF Faces "DemoCalendarBean.java" demo application

    Unfortunately, the following error occurs "oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$ AdfmCalendarActivity cannot be cast to oracle.adfdemo.view.calendar.rich.model.DemoCalendarActivity.

    Can anyone advise a solution

    Thanks in advance

    Concerning

    Hello

    Start with the calendar using Oracle demonstrations certainly seem convoluted - I did the same thing. I had to interpret what the demo was trying more of in the java code in general, and then write my own code. Below, I have the code that works for my clients.

    1.) tag add calendar Drop target within your calendar.

    2.) create your listener to drop in a managed bean (make sure that your method is mapped into the target calendar Drop). Note the areas where I've "updated HERE". I had fun with the data conversions that you see

    Updated - this must go in your bean example. You can of course do this dynamic, but for now, it should work.

    currTimeZone private zone is TimeZone.getTimeZone (' America/Detroit');.

    This card to your target calendar drop tag

    public DnDAction handleDrop (DropEvent dropEvent) {}

    Method to handle the Drag and Drop feature calendar

    Return _handleDrop (dropEvent, false);

    }

    public DnDAction _handleDrop (DropEvent dropEvent, showPopup boolean) {}

    Drag and drop (mailable)

    Transferable transferable = dropEvent.getTransferable ();

    CalendarDropSite dropSite = (CalendarDropSite) dropEvent.getDropSite ();

    DropSiteDate date = dropSite.getDate ();

    CalendarActivity.TimeType timeType = dropSite.getTimeType ();

    Civil activity

    Activity CalendarActivity = (CalendarActivity) transferable.getData (DataFlavor.getDataFlavor (CalendarActivity.class));

    If (activity! = null) {}

    _handleCalendarActivityDrop (dropEvent, dropSiteDate, activity, showPopup);

    Return dropEvent.getProposedAction ();

    }

    Return DnDAction.NONE;

    }

    private _handleCalendarActivityDrop Sub (DropEvent dropEvent, dropSiteDate Date, CalendarActivity activity, boolean showPopup) {}

    Current start date Info get an activity

    Date startDate;

    startDate = activity.getStartDate (currTimeZone);

    Calendar startCal = Calendar.getInstance (currTimeZone);

    startCal.setTime (startDate);

    Obtain the primary key of the calendar item as we move

    String rowPK = activity.getId (m:System.NET.SocketAddress.ToString ());

    int startDayOfYear = startCal.get (Calendar.DAY_OF_YEAR);

    int startHour = startCal.get (Calendar.HOUR_OF_DAY);

    int startMin = startCal.get (Calendar.MINUTE);

    int startYear = startCal.get (Calendar.YEAR);

    Get current Info from Date of end of the activity

    Date endDate;

    endDate = activity.getEndDate (currTimeZone);

    Calendar endCal = Calendar.getInstance (currTimeZone);

    endCal.setTime (endDate);

    int endDayOfYear = endCal.get (Calendar.DAY_OF_YEAR);

    int endHour = endCal.get (Calendar.HOUR_OF_DAY);

    int endMin = endCal.get (Calendar.MINUTE);

    int endYear = endCal.get (Calendar.YEAR);

    Download New Start Date object dropSiteDate Info

    Calendar dropCal = Calendar.getInstance (currTimeZone);

    dropCal.setTime (dropSiteDate);

    int dropDayOfYear = dropCal.get (Calendar.DAY_OF_YEAR);

    int dropHour = dropCal.get (Calendar.HOUR_OF_DAY);

    int dropMint = dropCal.get (Calendar.MINUTE);

    int dropYear = dropCal.get (Calendar.YEAR);

    calculation variables

    long eventDelta = 0;

    int newEndDayOfYear = 0;

    Check if there is any change with the start date new old vs.

    If (startDayOfYear! = dropDayOfYear) {}

    Get the value of delta beginning-enddate

    eventDelta = endCal.getTime () .getTime () - startCal.getTime () .getTime ();

    Info set start date (Leaving time infact info)

    startCal.set (Calendar.DAY_OF_YEAR, dropDayOfYear);

    startCal.set (Calendar.YEAR, dropCal.get (Calendar.YEAR));

    startCal.set (Calendar.MONTH, dropCal.get (Calendar.MONTH));

    calculate the new endDate

    Day newEndDate = new Date (startCal.getTime () .getTime () + eventDelta);

    endCal.setTime (newEndDate);

    reformat the start date, just in case.

    Trainer SimpleDateFormat;

    Formatter = new SimpleDateFormat ("yyyy-MM-DD hh: mm:." "") « « S ») ;

    Date newStartDate;

    newStartDate = new Date (startCal.getTime () .getTime ());

    Formatter.format (newStartDate);

    Take the iterator that is used for the calendar

    DCBindingContainer dcbindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    UPDATE HERE - the name of your iterator binding your view calendar object

    Iterator DCIteratorBinding = dcbindings.findIteratorBinding ("NameOfYourViewObjectIterator");

    Get lines of database that uses the iterator

    Line lines [] = iterator.getAllRowsInRange ();

    Line currentRow = iterator.getCurrentRow ();

    Must make sure that we have the iterator on the right line

    If (rows.length > 0) {}

    for (int i = 0; i)< rows.length;="" i++)="">

    Updated HERE - this is a primary key for your view object

    If (rows [i].getAttribute("Id").toString () .equals (rowPK)) {}

    We found the line, now exit loop and move forward

    currentRow = lines [i];

    break;

    }

    }

    }

    If (currentRow! = null) {}

    Get the binding of operations

    CHECK to make sure that you have a validation link on your Page Def

    OperationBinding commitBinding = dcbindings.getOperationBinding ("Commit");

    / Date start and end Date for the line that we are changing the value

    * We need to create an oracle.jbo.domain.Timestamp because the view entity object using oracle.jbo.domain.Date

    * oracle.jbo.domain.Date does not accept that the oracle.jbo.domain.Timestamp, which stamp accepts java.util.Date

    */

    Start date of new game

    Timestamp newStartDateTs;

    newStartDateTs = new Timestamp (newStartDate.getTime ());

    UPDATE HERE - launched date field

    currentRow.setAttribute ("Startdate", newStartDateTs);

    New defined end date

    Timestamp newEndDateTs;

    newEndDateTs = new Timestamp (newEndDate.getTime ());

    UPDATE HERE - launched date field

    currentRow.setAttribute ("Enddate", newEndDateTs);

    Perform field validation against currently modified line

    try {}

    currentRow.validate ();

    } catch (Exception e) {}

    System.out.println (e);

    Restore all changes so there is no garbage data is entered into the database

    currentRow.refresh (Row.REFRESH_UNDO_CHANGES);

    return;

    }

    Run the validation on the database operation

    commitBinding.execute ();

    Look for errors during validation: If no errors, then update calendar

    If (commitBinding.getErrors () .isEmpty ()) {}

    Refresh the calendar client in order to reflect the new changes

    RequestContext adfContext = RequestContext.getCurrentInstance ();

    adfContext.addPartialTarget (getCalendarComponent ());

    } else {}

    currentRow.refresh (Row.REFRESH_UNDO_CHANGES);

    }

    } else {}

    Nothing to do here.

    }

    }

    }

    protected RichCalendar getCalendarComponent() {}

    FacesContext context = FacesContext.getCurrentInstance ();

    UIComponent root = context.getViewRoot ();

    Hard-coded id for the moment, but that can be loaded dynamically.

    UPDATE your schedule component JSPX HERE - id

    return (RichCalendar) root.findComponent ("c1");

    }

    (3.) If can't remember off hand imports, if you have a problem let me know, I'll send a list of what I have.

    I hope this helps. Good luck!

    Gavin

  • Undo the insert does not properly - Popup

    Friends

    To speak frankly fed up with Oracle ADF (Newbie .net was much easier)

    I have a use case for the edition of Masters details... Details are displayed in the table... For detail edit and create operation I use popup with the Control Panel window.

    My problem.

    I used a managed bean and operation of 'Create' to add new lines of appeal. Works well, but when I cancel my code does not work, I still see a blank line in the table of means...


    I get the rwStatusfrom method AM to check the status of the line. Please see the code.


    If (NEW".equalsIgnoreCase (rwStatus)) {" "}


    RW. Refresh(Row.REFRESH_UNDO_CHANGES |) Row.REFRESH_REMOVE_NEW_ROWS);


    }
    on the other
    {
    RW. Refresh (Row.REFRESH_UNDO_CHANGES);

    }


    If I add dtIter.getViewObject () .clearCache (); the code above Houston line concurrency exception is thrown, but new line is deleted.

    I even regenerated my table... No use.



    At the beginning I used "CreateInsert" for the insert operation and it was much easier remove the line but the question during the insertion of the first record my validation was immediately called in the showPopup (before adding data) so I tried the "Create" operation.


    Advice me please. I'm in the third day with this problem. (Creation of Bothe and CreateInsert works perfectly well in a form (view) but only question in popup).

    Thank you

    Published by: KK_Ash on May 26, 2013 08:13

    Hello

    in fact + "to speak frankly fed up with Oracle ADF (Newbie .net was much easier)" + "

    is a very very very bad start for a question of aid - honestly. Its never a good idea to disrupt a forum before asking for their time to solve your problem. To delete the line of the display, you must remove the link layer and not in the morning (which should get updated automatically). Then in the dialog box change the logic to cancel it if you access the current row of the iterator

      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("iterator name");
      iter.getCurrentRow().remove();
    

    See for how to handle the OK/Cancel button in a dialog box: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/77-ok-cancel-support-in-dialog-351871.pdf

    (which is basically your use case)

    Frank

  • Impossible to reset values LOV

    Hello

    I have a jsff page. I have LOV dependent as below

    JDEV version: 11.1.1.5.0

    LOV_A
    LOV_B
    LOV_C
    LOV_D
    LOV_E

    LOV_B depends on LOV_A
    LOV_C, LOV_D depend on LOV_B
    LOV_E depends on LOV_D

    LOV are working properly and to submit, the main Main_VO which holds these LOV is < B > application < /B > VO not based on entities.

    < b > < /b > problem: impossible to reset values LOV selected

    < b > approaches followed up here < /b >:
    1 ResetButton

    2 CommandButton control with < af:resetActionListener / > and immediate = "true" >

    3. at the bean, I tried to update the Main_VO with the code below
    currentRow.refresh (currentRow.REFRESH_UNDO_CHANGES); Here the line current is slected line in the user interface
    Fortunately this resets the values of all the drop downs, unfortunately LOV contains previously triggered lists and even addiction is lost

    4. I changed the LOV_A value attribute like below as suggested by Frank in a thread

    < af:selectOneChoice < b > value = "#{backingBeanScope.AddEventOnOrderReleases.BindVariable}"< /b > "
    label = "#{bindings." BsResponsiblePartyGid1.label}.
    required = "#{bindings." BsResponsiblePartyGid1.hints.mandatory}.
    shortDesc = "#{bindings." BsResponsiblePartyGid1.hints.tooltip}.
    ID = "soc2" autoSubmit = "true" rendered = 'true '.
    Binding = "#{AddEventOnOrderReleases.BindVariable} '"
    valueChangeListener = "#{AddEventOnOrderReleases.selectBSResponsiblePartyGId}" >
    < f: selectItems value = "#{bindings." BsResponsiblePartyGid1.items}.
    ID = "si2" / >
    < / af:selectOneChoice >

    This change, I see a conversion error cannot convert < b > Integer < /b > < b > RichSelectOneChoice < /b >

    In this regard, any help is appreciated.

    Thank you
    Agnes.

    To reset a lov you must rest value the lov stores selection too.
    Check out my blog http://wp.me/pcBZk-sA

    Timo

  • DCBindingIterator refresh only one line

    Hi all!

    Is that what someone can say, is there a chance to refresh only a current record in the DCBindingIterator?

    Now I do it like that
    JUIteratorBinding it = ELExp.getIterator("TestIterator");
    String saveRowKey = it.getCurrentRowKeyString();
    it.executeQuery();
    it.setCurrentRowWithKey(saveRowKey);
    But I think that's not very optimal.

    Thank you!

    Hello

    oracle.jbo.Row has a refresh() method that allows you to refresh a single row of for example the database or simply for unspecified changes.

    Line rw = it.getCurrentRow ();
    RW. Refresh (Row.REFRESH_UNDO_CHANGES);

    http://download.Oracle.com/otn_hosted_doc/JDeveloper/1012/bc4jjavadoc/RT/Oracle/JBO/row.html

    Frank

    Published by: Frank Nimphius, March 6, 2012 20:42

Maybe you are looking for