3 Replies Latest reply: Jan 31, 2013 11:29 PM by grodno RSS

    SelectOneChoice again-valuePassThru always true

    grodno
      hi,

      i often use soc built on table's column - show description from lookup table, and return id
      now i defined a stand-alone soc
      it's always returns me description
      probably something's wrong in pagedef (item name )
      <list IterBinding="RefPlacementTypeV1Iterator" ListOperMode="navigation" ListIter="RefPlacementTypeV1Iterator"
      id="RefPlacementTypeV1" DTSupportsMRU="true" SelectItemValueMode="ListObject">
      <AttrNames>
      <Item Value="Name"/>
      </AttrNames>
      </list>

      how can i fix it to return me id
      <af:selectOneChoice
      binding="#{registerBean.socPT}"
      label="#{bindings.RefPlacementTypeV1.label}" autoSubmit="true"
      required="#{bindings.RefPlacementTypeV1.hints.mandatory}"
      shortDesc="#{bindings.RefPlacementTypeV1.hints.tooltip}" id="soc2"
      valuePassThru="false"
      valueChangeListener="#{registerBean.socPTChangeListener}">
      <af:setPropertyListener from="#{bindings.RefPlacementTypeV1.inputValue}"
      to="#{viewScope.PlacementType}" type="valueChange"/>
      <f:selectItems value="#{bindings.RefPlacementTypeV1.items}" id="si1"/>
      </af:selectOneChoice>
        • 1. Re: SelectOneChoice again-valuePassThru always true
          Frank Nimphius-Oracle
          Hi,

          easiest option is to create an attributeValue binding in the PageDef file, point it to the same iterator the SOC value property points to (the iterator that gets updated from the SOC) and then choose the ID attribute. The attributeValue that you can access from Java or EL (#{bindings.attributename.inputValue) will be synched with the user selected and submitted SOC value

          Frank
          Ps.: The SOC behaves correct by the way and the number it shows is the index of the row the user selected. This way its possible for a SOC to pass additional attributes and objects within an list of values                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
          • 2. Re: SelectOneChoice again-valuePassThru always true
            grodno
            Frank,
            i've checked your blog
            you mean something using technique from below?
            https://blogs.oracle.com/jdevotnharvest/entry/how_to_access_ui_component
            • 3. Re: SelectOneChoice again-valuePassThru always true
              grodno
              somehow got to work