3 Replies Latest reply on Feb 5, 2013 8:28 AM by DiegoVélez

    PPR on Select One Choice

    DiegoVélez
      Hi,

      I have 3 dependant selectOneChoice that play as master-detail. I've set all partial triggers to refresh each of them when the master is changed, and it works fine.

      My problem is, I need to change their value on my Bean, so I set currentrow of each iterator to the row I need to be selected. Now the list binding.inputValue is changed but the component doesn't refresh.

      This is my code:
      <af:selectOneChoice value="#{bindings.Nombrecorto.inputValue}"
                          label="Cliente"
                          required="#{bindings.Nombrecorto.hints.mandatory}"
                          shortDesc="#{bindings.Nombrecorto.hints.tooltip}"
                          id="soc1" autoSubmit="true"
                          binding="#{CalendarBean.soc1}"
                          partialTriggers="d2">
          <f:selectItems value="#{bindings.Nombrecorto.items}"
                         id="si1"/>
      </af:selectOneChoice>
      <af:selectOneChoice value="#{bindings.Descripcion.inputValue}"
                          label="Proyecto"
                          required="#{bindings.Descripcion.hints.mandatory}"
                          shortDesc="#{bindings.Descripcion.hints.tooltip}"
                          id="soc2" partialTriggers="soc1"
                          autoSubmit="true"
                          binding="#{CalendarBean.soc2}">
          <f:selectItems value="#{bindings.Descripcion.items}"
                         id="si2"/>
      </af:selectOneChoice>
      <af:selectOneChoice value="#{bindings.Titulo.inputValue}"
                          label="#{bindings.Titulo.label}"
                          required="#{bindings.Titulo.hints.mandatory}"
                          shortDesc="#{bindings.Titulo.hints.tooltip}"
                          id="soc4" partialTriggers="soc2"
                          binding="#{CalendarBean.soc4}">
          <f:selectItems value="#{bindings.Titulo.items}"
                         id="si4"/>
      </af:selectOneChoice>
      Bean code:
              iterator = dcbindings.findIteratorBinding("ClientesLOV1Iterator");
              iterator.executeQuery();
              rsi = iterator.getRowSetIterator();
              key = new Key(new Object[] { idCliente });
              row = rsi.findByKey(key, 1)[0];
              rsi.setCurrentRow(row);
              
              AdfFacesContext.getCurrentInstance().addPartialTarget(soc1);
              
              iterator = dcbindings.findIteratorBinding("ProyectosLOV1Iterator");
              iterator.executeQuery();
              rsi = iterator.getRowSetIterator();
              key = new Key(new Object[] { idProyecto });
              row = rsi.findByKey(key, 1)[0];
              rsi.setCurrentRow(row);
      
              AdfFacesContext.getCurrentInstance().addPartialTarget(soc2);
      
      
              iterator = dcbindings.findIteratorBinding("TareasLOV1Iterator");
              iterator.executeQuery();
              rsi = iterator.getRowSetIterator();
              key = new Key(new Object[] { idTarea });
              row = rsi.findByKey(key, 1)[0];
              rsi.setCurrentRow(row);
      
              AdfFacesContext.getCurrentInstance().addPartialTarget(soc4);
      What am I doing wrong?

      JDeveloper 11.1.2.3.0

      Thanks in advance,
      DV