5 Replies Latest reply: Apr 22, 2013 9:40 AM by 861549 RSS

    SelectOneChoice refreshing table

    861549
      Can I config Master / Detail with SelectOneChoice and table?
      I put in my form one SelectOneChoice (Country) and one table (State).
      I want to that when I select item on SelectOneChoice this refresh my table.
      I set PartialTrigger of the my table with SelectOneChoice, but this not works.
      How can I do this?
        • 1. Re: SelectOneChoice refreshing table
          prateekazam
          Hi ,

          Apart from partial trigger you should need to provide select country id in State VO for fetching state which is belong in this country.And this approach is dependent on your implementation.

          Thanks
          Prateek
          • 2. Re: SelectOneChoice refreshing table
            Subramanian Meyyappan
            while selecting the country id , you should get the state data in af:table without refreshment am right?
            while performing the cascading operation one field/operation is depend on another field/operation. refreshment is the right way. what the need to dont refesh? may i know this.
            • 3. Re: SelectOneChoice refreshing table
              861549
              Hi,
              In make the following BC (Business Componentes) structure

              Entity:
              - StateEntity
              - CountrEntity
              - Association (State x Country)

              VO:
              - StateVO (State Entity)
              - CountryVO (CountrEntity)
              - ViewLink (State x Country)

              I tried to test put two Table and configured master/detail for this and it works perfect. In other word, my BC is correct.
              But, I prefer use Select One Choice (State) and Table (Country).


              <af:selectOneChoice value="#{bindings.StateView.inputValue}"
              label="State"
              required="#{bindings.StateView.hints.mandatory}"
              shortDesc="#{bindings.StateView.hints.tooltip}"
              binding="#{backingBeanScope.TipMB.soc1}"
              id="soc1" autoSubmit="true"
              immediate="true">
              <f:selectItems value="#{bindings.StateView.items}"
              binding="#{backingBeanScope.TipMB.si1}" id="si1"/>
              </af:selectOneChoice>

              <af:table value="#{bindings.CountryView.collectionModel}"
              var="row"
              rows="#{bindings.CountryView.rangeSize}"
              emptyText="#{bindings.CountryView.viewable ? 'No data to display.' : 'Access Denied.'}"
              fetchSize="#{bindings.CountryView.rangeSize}"
              rowBandingInterval="0"
              filterModel="#{bindings.CountryViewQuery.queryDescriptor}"
              queryListener="#{bindings.CountryViewQuery.processQuery}"
              filterVisible="true" varStatus="vs"
              selectedRowKeys="#{bindings.CountryView.collectionModel.selectedRow}"
              selectionListener="#{bindings.CountryView.collectionModel.makeCurrent}"
              rowSelection="single"
              binding="#{backingBeanScope.TipMB.t1}" id="t1"
              partialTriggers=":::soc1">
              <af:column sortProperty="Country" filterable="true"
              sortable="true"
              headerText="#{bindings.CountryView.hints.Country.label}"
              id="c3">
              <af:inputText value="#{row.bindings.Country.inputValue}"
              label="#{bindings.CountryView.hints.Country.label}"
              required="#{bindings.CountryView.hints.Country.mandatory}"
              columns="#{bindings.CountryView.hints.Country.displayWidth}"
              maximumLength="#{bindings.CountryView.hints.Country.precision}"
              shortDesc="#{bindings.CountryView.hints.Country.tooltip}"
              id="it3">
              <f:validator binding="#{row.bindings.Country.validator}"/>
              </af:inputText>
              </af:column>
              </af:table>
              • 4. Re: SelectOneChoice refreshing table
                861549
                while selecting the country id , you should get the state data in af:table without refreshment am right?
                Yes, it is.
                while performing the cascading operation one field/operation is depend on another field/operation. refreshment is the right way. what the need to dont refesh? may i know this.
                I just want to it works as master/detail create by default from JDeveloper with table/table.
                • 5. Re: SelectOneChoice refreshing table
                  861549
                  I tried to remake this and now it works.

                  Thanks