2 Replies Latest reply: May 6, 2013 6:07 PM by Joe the Jet RSS

    ADF Changing Fields on "Commit"?

    Joe the Jet
      Can someone explain to me how you can identify which Detail rows have changed in a Master/Detail form situation?

      If the user presses the "commit" button, ADF seems to "change" all the rows even though I have typed nothing into the fields. I know this because the trigger on the table updates the modified date/time field.

      I think this would only happen if an update of some sort is executed on each row.

      Is there a setting of some sort? How does JDev know if a child row has changed and how do I know?

      I'm using JDev 11.1.1.5.0

      I have this in my bean

      public void saveConfRequests()
      {
      UserViewRowImpl vCurUser = (UserViewRowImpl)this.getCurrentUserVC().first();

      ConferenceViewRowImpl vConfRow = (ConferenceViewRowImpl)this.getConferenceViewParent().getCurrentRow();


      RowIterator vReqIter = vConfRow.getConferenceRequestsView();

      while (vReqIter.hasNext())
      {
      ConferenceRequestsViewRowImpl vCurrentReq = (ConferenceRequestsViewRowImpl)vReqIter.next();

      ConferenceRequestsImpl vCrEO = (ConferenceRequestsImpl)vCurrentReq.getConferenceRequests();

      if (vCrEO.getEntityState() == Entity.STATUS_NEW || vCrEO.getEntityState() == Entity.STATUS_MODIFIED ||
      vCrEO.getEntityState() == Entity.STATUS_DELETED)
      {
      if (vCrEO.getEntityState() == Entity.STATUS_NEW)
      {
      System.out.println("new");
      }
      if (vCrEO.getEntityState() == Entity.STATUS_MODIFIED)
      {
      System.out.println("mod" + vCurrentReq.getUserLogin());
      }
      if (vCrEO.getEntityState() == Entity.STATUS_DELETED)
      {
      System.out.println("delete");
      }

      if (!vCurUser.getUserLogin().equals(vCurrentReq.getUserLogin())) // Then we have a proxy situation
      {
      if (vCurrentReq.getEpayUserIdProxy() == null)
      vCurrentReq.setEpayUserIdProxy(vCurUser.getUserId());
      }
      }

      }

      this.getTransaction().commit();
      this.getConferenceRequestsMasterViewChild().executeQuery();
        • 1. Re: ADF Changing Fields on "Commit"?
          Joe the Jet
          Is there any way to tell what field ADF/Jdev thinks has changed?
          • 2. Re: ADF Changing Fields on "Commit"?
            Joe the Jet
            Ok, I figured it out by a process of elimination.

            I had a couple of columns that looked like this

            <af:inputText value="#{row.CnfrRqstCostAmt}" id="ot54" required="true">


            They needed to be this
            <af:inputText value="#{row.bindings.CnfrRqstCostAmt.inputValue}"
            label="#{bindings.ConferenceRequestsMasterViewChild.hints.CnfrRqstCostAmt.label}"
            required="#{bindings.ConferenceRequestsMasterViewChild.hints.CnfrRqstCostAmt.mandatory}"
            columns="#{bindings.ConferenceRequestsMasterViewChild.hints.CnfrRqstCostAmt.displayWidth}"
            maximumLength="#{bindings.ConferenceRequestsMasterViewChild.hints.CnfrRqstCostAmt.precision}"
            shortDesc="#{bindings.ConferenceRequestsMasterViewChild.hints.CnfrRqstCostAmt.tooltip}" id="it3">
            <f:validator binding="#{row.bindings.CnfrRqstCostAmt.validator}"/>


            Have no idea how that happened. Oh wait, I thik I do know how it happened. I think JDev, when I first dropped my Master/Detail, set it up as outputText (why I would ask) and I didnt' convert it properly.