SelectOneChoice values get repeated

I have some dependant drop down lists. This works pretty much fine (after several workarounds for other problems), except that I get strange behaviour where the data in the LOV gets repeated sometimes. It's reproducible but not by following any particular sequence of events that I can see.
Say I had a SelectOneChoice with:
1. Oracle
2. Microsoft
3. Sun
Then, if I play with it for a bit, just selecting different values all over the place, eventually the list will contain:
1. Oracle
2. Microsoft
3. Sun
1. Oracle
2. Microsoft
3. Sun
And sometimes that will go on and on, repeated many times.
Now, is this a glitch with ADF, or should I be refreshing the iterator, and where/when should I do that?
many thanks
~R

Frank,
Haven't had a chance to do that, but I know how to reproduce it now. Please see post:
Page Def - where is the data coming from?

Similar Messages

  • SelectOneChoice value getting reset

    Hi All,
    My page has 4 conditional selectOneChoice components.
    1.State
    2.City
    3.Area
    4.Zipcode
    I have partialtriggers for all components.When i select "State" my valueChangeListener gets called and values for "City" comes but the value for "State" selectOneChoice gets reset to "Unselected label".
    Please let me know the reason for value getting reset.
    Following is the code
    JSPX page
    <af:selectOneChoice id="compId328"
    value="#{bindings.State.inputValue}"
    label="#{messageBean['SS_UM_STATE']}"
    required="#{ !umRegistrationIdtypeChange.tdnRegPprFlag}"
    unselectedLabel="#{messageBean['SS_UM_STATE_SELECT']}"
    autoSubmit="true" inlineStyle="width: 125px"
    binding="#{umRegistrationIdtypeChange.stateSelecOneChoice}"
    valueChangeListener="#{umRegistrationIdtypeChange.chngCity}" >
    <af:selectItem label="AN" value="AN"/>
    <af:selectItem label="AP" value="AP"/>
    <af:selectItem label="AR" value="AR"/>
    <af:selectItem label="AS" value="AS"/>
    <af:selectItem label="UP" value="UP"/>
    <af:selectItem label="WB" value="WB"/>
    </af:selectOneChoice>
    <af:selectOneChoice id="compId333" partialTriggers="compId328"
    unselectedLabel="Select"
    inlineStyle="width: 125px"
    binding="#{umRegistrationIdtypeChange.cityselecOneChoice}"
    value="#{bindings.City.inputValue}"
    required="#{ !umRegistrationIdtypeChange.tdnRegPprFlag}"
    label="#{messageBean['SS_UM_CITY']}"
    autoSubmit="true"
    valueChangeListener="#{umRegistrationIdtypeChange.chngArea}">
    <f:selectItems value="#{umRegistrationIdtypeChange.returnCityList}"/>
    </af:selectOneChoice>
    <af:selectOneChoice id="compId334"
    partialTriggers="compId333 compId328"
    inlineStyle="width: 125px"
    required="#{ !umRegistrationIdtypeChange.tdnRegPprFlag}"
    value="#{bindings.StreetAddress3.inputValue}"
    autoSubmit="true" unselectedLabel="Select"
    binding="#{umRegistrationIdtypeChange.cityareaSelecOneChoice}"
    label="#{messageBean['SS_UM_STREET_ADDR3']}"
    valueChangeListener="#{umRegistrationIdtypeChange.chngPincode}">
    value="#{bindings.StreetAddress3.inputValue}"-->
    <f:selectItems value="#{umRegistrationIdtypeChange.returnAreaList}"/>
    </af:selectOneChoice>
    <af:selectOneChoice id="compId335"
    partialTriggers="compId334 compId333 compId328"
    inlineStyle="width: 125px"
    value="#{bindings.PostalCode.inputValue}"
    autoSubmit="true"
    required="#{ !umRegistrationIdtypeChange.tdnRegPprFlag}"
    unselectedLabel="Select"
    label="#{messageBean['SS_UM_ZIP_CODE']}"
    binding="#{umRegistrationIdtypeChange.postalcodeSelecOneChoice}"
    valueChangeListener="#{umRegistrationIdtypeChange.chngPostalCode}">
    <f:selectItems value="#{umRegistrationIdtypeChange.returnPincodeList}"/>
    </af:selectOneChoice>
    <af:inputText id="compId320"
    binding="#{umRegistrationIdtypeChange.houseNoInputText}"
    label="#{messageBean['TDN_UM_STREET_ADDR1']}"
    inlineStyle="width: 125px" maximumLength="100"
    required="true"
    requiredMessageDetail=" "
    value="#{bindings.StreetAddress.inputValue}"/>
    <af:inputText id="compId323"
    binding="#{umRegistrationIdtypeChange.street_addressInputText}"
    label="#{messageBean['TDN_UM_STREET_ADDR2']}"
    maximumLength="150" inlineStyle="width: 125px"
    rendered="true"
    required="true"
    requiredMessageDetail=" "
    value="#{bindings.StreetAddress2.inputValue}"/>
    Code in Bean
    public List<SelectItem> chngCity(ValueChangeEvent valueChangeEvent) {
    log.info("Call the chngCity method");
    returnCityList = new ArrayList<SelectItem>();
    String state = valueChangeEvent.getNewValue().toString();
    if (state != null) {
    List<Object> returnPickList = RegAMImpl.getCity(state);
    for (Object obj: returnPickList) {
    SelectItem si = new SelectItem();
    String eDistValues = obj.toString();
    si.setLabel(new String(eDistValues));
    si.setValue(new String(eDistValues));
    returnCityList.add(si);
    return returnCityList;
    public List<SelectItem> chngArea(ValueChangeEvent valueChangeEvent) {
    log.info("Call the chngArea method");
    returnAreaList = new ArrayList<SelectItem>();
    String city = valueChangeEvent.getNewValue().toString();
    if (city != null) {
    List<Object> returnPickList = RegAMImpl.getArea(city);
    for (Object obj: returnPickList) {
    SelectItem si = new SelectItem();
    String eDistValues = obj.toString();
    si.setLabel(new String(eDistValues));
    si.setValue(new String(eDistValues));
    returnAreaList.add(si);
    return returnAreaList;
    public List<SelectItem> chngPincode(ValueChangeEvent valueChangeEvent) {
    log.info("Call the chngPincode method");
    returnPincodeList = new ArrayList<SelectItem>();
    String area = valueChangeEvent.getNewValue().toString();
    if (area != null) {
    List<Object> returnPickList = RegAMImpl.getPincode(area);
    for (Object obj: returnPickList) {
    SelectItem si = new SelectItem();
    String eDistValues = obj.toString();
    si.setLabel(new String(eDistValues));
    si.setValue(new String(eDistValues));
    returnPincodeList.add(si);
    return returnPincodeList;
    public void chngPostalCode(ValueChangeEvent valueChangeEvent) {
    String pincode = valueChangeEvent.getNewValue().toString();
    UMPostalCodeTypeVOImpl pincodeVO = RegAMImpl.getUMPostalCodeTypeVO1();
    ViewCriteria vc = pincodeVO.createViewCriteria();
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    vcr.setAttribute("ParentName", pincode);
    vc.insertElementAt(vcr, 0);
    pincodeVO.applyViewCriteria(vc);
    In pagedef i have also added RefreshCondition="{adfFacesContext.postback==true}" for iterators of VO's binded to selectOneChoice
    <iterator id="ContactAddressVO1Iterator" RangeSize="-1"
    Binds="Root.RegistrationAM1.ContactAddressVO1"
    DataControl="SessionAMDataControl" RefreshCondition="{adfFacesContext.postback==true}"/>
    <iterator id="RegStateTypeVO1Iterator" RangeSize="-1" RefreshCondition="{adfFacesContext.postback==true}"
    Binds="Root.RegistrationAM1.RegStateTypeVO1"
    DataControl="SessionAMDataControl"/>
    <iterator id="UMCityTypeVO1Iterator" RangeSize="-1" RefreshCondition="{adfFacesContext.postback==true}"
    Binds="Root.RegistrationAM1.UMCityTypeVO1"
    DataControl="SessionAMDataControl"/>
    <iterator id="UMCityAreaTypeVO1Iterator" RangeSize="-1" RefreshCondition="{adfFacesContext.postback==true}"
    Binds="Root.RegistrationAM1.UMCityAreaTypeVO1"
    DataControl="SessionAMDataControl"/>
    <iterator id="UMPostalCodeTypeVO1Iterator" RangeSize="-1" RefreshCondition="{adfFacesContext.postback==true}"
    Binds="Root.RegistrationAM1.UMPostalCodeTypeVO1"
    DataControl="SessionAMDataControl"/>
    Regards,
    Himanshu

    Please read the FAQ http://forums.oracle.com/forums/help.jspa and format your code, as it is unreadable.
    Next you need to supply more information about your environment like jdev version and technology stack you are using.
    Timo

  • How to get SelectOneChoice value from a af:Table

    JDeveloper v11.1.2.4.0 - JSF
    Greetings,
    im having a problem getting a column value that is a select one choice object.
    This is not a common problem since i actually did different thing than others so please follow my problem
    description and if you have any answer/questions please reply below.
    I have create a Database View that returns me 3 columns, lets say TestCode, TestDescription, TestValue.
    I have added one extra temporally column in my OV and called Temp.
    I drag & drop my OV, delete Temp value, and its column position, i drag&drop a LOV that is from another View,
    that shows me Doctor's name & surname and return doctor's id as select one choice value.
    Im using a function that go thru the iterator, gets the rows, and save them in database (doesn't matter how).
    The problem is, my selectonechoice, do not have row.bindings.DoctorId.InputValue but bindings.DoctorId.InputValue instead, so i can retrieve the current row's selectonechoice value.
    So when my loop is finish and insert the rows in to my database, all row's doctor's id is the same since the binding do not change thru the loop.
    I don't know how to get the current row's select one choice value to use the correct value on each row loop.
    Here is my loop function:
            DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding iterator = bc.findIteratorBinding("ExaminationsIterator");
            DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
             RowSetIterator rsi = iterator.getRowSetIterator(); 
             int i=0;
            OperationBinding save_exams = bindings.getOperationBinding("SAVE_EXAMINATION");
            OperationBinding save_exams_commit = bindings.getOperationBinding("SAVE_EXAMINATION_COMMIT");
            try{
             while(i < rsi.getRowCount()){
                 Row r = iterator.getCurrentRow();
                 save_exams.getParamsMap().put("CodeTest", r.getAttribute("CodeTest"));
                 save_exams.getParamsMap().put("Dates", r.getAttribute("Dates"));  
                 save_exams.getParamsMap().put("CodeId", orderid.getValue());  
                 save_exams.getParamsMap().put("Times", r.getAttribute("Times"));   
                 save_exams.getParamsMap().put("DoctorId", resolveExpression("#{bindings.DoctorId.attributeValue}").toString());
                 save_exams.getParamsMap().put("IdPatients", patientid.getValue());  
                 save_exams.execute();
                 rsi.next();
                 i++;
                save_exams_commit.execute();
    I get the current doctor's id binding and not each row's value.
    Can you assist me on this please?

    I have created a work around solution, until any more expert than me come with more advance solution.
    1) I add a LOV at doctor's id on target View object.
    2) On runtime, i populate my Database View
    3) go through all rows in my DB View iterator
    4) add each row on the target View Object (missing the doctor's id, since i want that to be on runtime) & commit rows
    5) after the loop is done and the target view object show me the results of the DB View, i choose on runtime the doctor's id and commit the changes so
    the new rows, with new updated date will be finally populated to the database.
    Hope this helps if anyone have a similar task.
    Please let me know if you find a more direct solution, that working with 2 tables to populate 1.

  • How to get the values from repeated frame?.

    Hi
    how to get the values from repeated frame?. i have to disply the first 3 digits in another place in my report.
    i have field empno in repeated frame and i want to disply first 3 digits in another place in the same report.
    thanks

    How often do you need to display it? It sounds like you might want to base a summary on that formula with a function of first or last. If it's a per page basis, it can be a page level summary. If it's at a higher level repeating frame, then you can create the summary at that level. I'd suggest taking a look at the online help for summaries using the first/last functions.
    Hope that helps,
    Toby

  • Getting repeating frames according to Parameter value

    Dear Users....I wanna print bar codes in a report based on a query. Now the scenario is that users want to take multiple prints of the same barcode on the same page. I think its possible only if the repeating frame gets repeated as many times as user enters a value from parameter form or the query should return number of records equal to parameter value. what do u peeps suggest about that how is it possible. Suppose report query is as simple as:
    Select Bar_Cod From Abc;

    Thanx magoo...Yes,u've done apparently a difficult job very simply using a Cartesion product :) But I think there are some other ways too for this. Can we use Rollup or Cube in the same case anyway?

  • Field values are repeating for search help.

    Hello Friends.
    I have a problem. When I create a search help for a field the identical field values are repeating. What should I do to trigger only the first time.
    for example:
    <u>Field-name</u>-                        <u>field-value</u>
    Supplier Nr ---                                 Commodity
    5001 -
                                               casting
    5002 -
                                               casting
    5003 -
                                               casting
    So when I create the search help for commodity it is showing 'casting' 3 times in a pop-up window. It should not repeat. Can you please give me the solution what should I do?

    Hi
    Search helps
    Standard search help
    Types of search helps
    Concept of search help
    Search Help Interface
    Dialog behavior of search helps
    Selection method for search helps
    Performance of search helps
    Attaching search helps
    Hierarchy of search helps
    Standard Search Help
    The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field. A value can be directly copied to an input field by list selection.
    The fields having an input help are shown in the R/3 System by the input help key to the right of the field. This key appears as soon as the cursor is positioned on the corresponding screen field. The help can be started either by clicking on this screen element or with function key F4.
    If the number of possible entries for a field is very large, you can limit the set of displayed values by entering further restrictions.
    Further meaningful information about the displayed values is included in the display of possible entries, especially if the field requires that a formal key be entered.
    TYPES OF SEARCH HELPS
    Elementary search helps
    Describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    Collective search help
    Combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    Search Help Interface
    Search help interface determines how the exchange of values between the screen template and the selection method is implemented.
    The search help interface defines the context data that can be used in the input help and the data that can be returned to the input mask. Analogously to the interface of a function module, the search help interface comprises interface parameters.
    When you define an interface parameter of a search help, you must also define whether it should be used to copy data to the input help (IMPORT parameter) or whether it should be used to return data from the input help (EXPORT parameter). A parameter of a search help can also have both attributes at the same time.
    The location from which the IMPORT parameters of a search help get their values and the screen fields in which the contents of the EXPORT parameters of the search help are returned are defined in the search help attachment. The search help itself should always be attached to an EXPORT parameter of the search help. If this parameter is also the IMPORT parameter, its contents are only used in the input help if it is a search string (that is, if it contains a ´*´ or a ´+´).
    You must define the parameter types of a search help. You can do this by assigning them data elements.
    Value Transport for Input Helps
    NOTE:In the above example, screen fields A, B and C are linked with parameters of the search help. As a result, values can only be transported between the screen and the search help for these three fields. Existing contents of screen fields A and B can be used for selecting the hit list since they are linked with an import parameter of the search help. The values of parameters A and C can be returned to the screen from the hit list since these parameters are declared as export parameters of the search help.
    Description of dialog behavior
    A hit list might contain plentiful number of entries. A
    dialog provides the user with an option to restrict the
    entries displayed on the hit list.
    In an input help process, the set of possible entries is presented in the dialog box as a list for displaying the hit list. The user selects the required value from this list by double clicking. Since the possible entries are often formal keys, you must be able to display further explanatory information about the possible entries in the list.
    If the set of possible entries is very large, the user should be able to define additional conditions for the attributes of the selected entry. Restricting the set of data in this way both increases the clarity of the list and reduces the system load. Additional conditions can be entered in a further dialog window, the dialog box for restricting values.
    Specifying the dialog type of a search help defines whether the dialog box for restricting values should be offered and if so under what conditions.
    The attributes in the dialog box for displaying the hit list or in the dialog box for restricting values must be defined as internal parameters of the search help. An internal parameter can also be used in only one of the two dialog boxes. It can also belong to the search help interface.
    The internal parameter types are also defined with data elements. These data elements define how the parameters are displayed in the two dialog boxes.
    Reward if usefull

  • Cannot set selectOneChoice value during reload (value auto become null)

    Dear all,
    I have a problem that getting null value in the SelectOneChoice field in a table binded to
    a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details
    of the situation is described as follows:
    I've binded a view objects with 8 attributes to a af:table, then I manually change
    2 of the inputText fields inside 'Column' fields of the table to inputlistofvalue and
    selectOneChoice. The code is as follow:
    <af:column sortProperty="#{bindings.OpenBalanceVO1.hints.AcNo.name}"
    sortable="false"
    headerText="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
    id="c1" width="180"
    inlineStyle="font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:medium;">
         <af:inputListOfValues value="#{row.bindings.AcNo.inputValue}"
              label="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
              required="#{bindings.OpenBalanceVO1.hints.AcNo.mandatory}"
              columns="#{bindings.OpenBalanceVO1.hints.AcNo.displayWidth}"
              maximumLength="#{bindings.OpenBalanceVO1.hints.AcNo.precision}"
              shortDesc="#{bindings.OpenBalanceVO1.hints.AcNo.tooltip}"
              id="it1"
              model="#{bindings.AcNo2.listOfValuesModel}"
              autoSubmit="false"
              returnPopupListener="#{backingBeanScope.backing_ImportOpenBalance.returnListener}">
              <f:validator binding="#{row.bindings.AcNo.validator}"/>
         </af:inputListOfValues>
    </af:column>
    <af:column sortProperty="#{bindings.OpenBalanceVO1.hints.CurrencyCode.name}"
         sortable="false"
         headerText="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
         id="c2">
         <af:selectOneChoice value="#{row.bindings.CurrencyCode.inputValue}"
              label="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
              shortDesc="#{bindings.OpenBalanceVO1.hints.CurrencyCode.tooltip}"
              id="it2" autoSubmit="false"
              partialTriggers="cb1 cb2">
              <f:selectItems value="#{loginInfo.activeCurrencies}" id="currenciesList"/>
         </af:selectOneChoice>
    </af:column>
    And I have binded the returnPopupListener to returnListerner event handler to automatically
    set the Currency field (2nd field) after the user chose the Account field (1st field) from
    the input list of value:
    public void returnListener(ReturnPopupEvent returnPopupEvent) {
         RichInputListOfValues lovField = (RichInputListOfValues)returnPopupEvent.getSource();
         ListOfValuesModel lovModel = lovField.getModel();
         CollectionModel collectionModel = lovModel.getTableModel().getCollectionModel();
         JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
         RowKeySet rks = (RowKeySet)returnPopupEvent.getReturnValue();
         List tableRowKey = (List)rks.iterator().next();
         DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();
         Key key = (Key)tableRowKey.get(0);
         Row row = dciter.findRowByKeyString(key.toStringFormat(true));
         DCBindingContainer bc = getBindingContainer();
         DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
         OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
         FacesContext fctx = FacesContext.getCurrentInstance();
         ExpressionFactory elFactory = fctx.getApplication().getExpressionFactory();
         ValueExpression ve = elFactory.createValueExpression(fctx.getELContext(), "#{loginInfo}", LoginInfo.class);
         LoginInfo loginInfo = (LoginInfo)ve.getValue(fctx.getELContext());
         System.out.println("Return place: search date:" + loginInfo.getSearchDate());
         Row newRow = viewObject.createRow();
         String selectedAcNo = row.getAttribute("AcNo").toString();
         String selectedCurrency = row.getAttribute("CurrencyCode").toString();
         newRow.setAttribute("AcNo", selectedAcNo);
         newRow.setAttribute("CurrencyCode",selectedCurrency);
         newRow.setAttribute("OpenBal", 300);
         newRow.setAttribute("AvailBal", 200);
         newRow.setAttribute("CreateDate", new Date());
         newRow.setAttribute("EffectiveDate", loginInfo.getSearchDate());
         newRow.setAttribute("LockStatus", "N");
         viewObject.insertRowAtRangeIndex(rowIndex, newRow);
    The problem occurs when I use a 'createInsert' button to create a new row in the table,
    and then choose a value from the inputListOfValues. The new row refresh and get the value
    I chose in the first column in the new row. But the second column (currency field) is left
    as empty (null value). If I change the second column frmo selectOneChoice to inputText,
    the correct Currency value (e.g. "HKD" or "USD") can be shown. So I wonder if there is any
    additional tricks in order to set the selectOneChoice value during refresh.
    Additionally I have tried to check the state of the view object attributes during the refresh
    lifecycle and found that the following reload method (else place) is being reached 3 times after I click
    the 'ok' button in the popup up in the inputListOfValue.
    public void beforePhase(PagePhaseEvent event) {
         //System.out.println("i am here inside backing bean : before phrase 1 phrase ID:" + event.getPhaseId());
         if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
              if (!isPostback()) {
              } else {
                   System.out.println("Post Back on Page Load!");
                   DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
                   OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
                   RowSetIterator iterator = viewObject.createRowSetIterator(null);
                   iterator.reset();
                   while (iterator.hasNext()) {
                        //Row row = viewObject.getCurrentRow();
                        Row row = iterator.next();
                        System.out.print("Account:" + row.getAttribute("AcNo"));
                        System.out.print(",AvailBal:" + row.getAttribute("AvailBal"));
                        System.out.print(",OpenBal:" + row.getAttribute("OpenBal"));
                        System.out.print(",CurrencyCode:" + row.getAttribute("CurrencyCode"));
                        System.out.print(",EffectiveDate:" + row.getAttribute("EffectiveDate"));
                        System.out.print(",UserCreate:" + row.getAttribute("UserCreate"));
                        System.out.println("");
                        if (row.getAttribute("UserCreate").toString().equals("<current user>")) {
                             System.out.println("Match <current user> in preload");
                             //row.setAttribute("CurrencyCode", "USD");
                   System.out.println("end of reload");
    During the 1st time, the CurrencyCode field was set currently, but then in the 2nd and 3rd
    times, it's value suddenly changed to 'null'. If I use inputText, all the 3 times currencyCode
    field is showing correctly without the null issue.
    Anyone can kindly give me some hints? Thanks a lot!!!

    Dear all,
    I have a problem that getting null value in the SelectOneChoice field in a table binded to
    a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details
    of the situation is described as follows:
    I've binded a view objects with 8 attributes to a af:table, then I manually change
    2 of the inputText fields inside 'Column' fields of the table to inputlistofvalue and
    selectOneChoice. The code is as follow:
    <af:column sortProperty="#{bindings.OpenBalanceVO1.hints.AcNo.name}"
    sortable="false"
    headerText="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
    id="c1" width="180"
    inlineStyle="font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:medium;">
         <af:inputListOfValues value="#{row.bindings.AcNo.inputValue}"
              label="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
              required="#{bindings.OpenBalanceVO1.hints.AcNo.mandatory}"
              columns="#{bindings.OpenBalanceVO1.hints.AcNo.displayWidth}"
              maximumLength="#{bindings.OpenBalanceVO1.hints.AcNo.precision}"
              shortDesc="#{bindings.OpenBalanceVO1.hints.AcNo.tooltip}"
              id="it1"
              model="#{bindings.AcNo2.listOfValuesModel}"
              autoSubmit="false"
              returnPopupListener="#{backingBeanScope.backing_ImportOpenBalance.returnListener}">
              <f:validator binding="#{row.bindings.AcNo.validator}"/>
         </af:inputListOfValues>
    </af:column>
    <af:column sortProperty="#{bindings.OpenBalanceVO1.hints.CurrencyCode.name}"
         sortable="false"
         headerText="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
         id="c2">
         <af:selectOneChoice value="#{row.bindings.CurrencyCode.inputValue}"
              label="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
              shortDesc="#{bindings.OpenBalanceVO1.hints.CurrencyCode.tooltip}"
              id="it2" autoSubmit="false"
              partialTriggers="cb1 cb2">
              <f:selectItems value="#{loginInfo.activeCurrencies}" id="currenciesList"/>
         </af:selectOneChoice>
    </af:column>
    And I have binded the returnPopupListener to returnListerner event handler to automatically
    set the Currency field (2nd field) after the user chose the Account field (1st field) from
    the input list of value:
    public void returnListener(ReturnPopupEvent returnPopupEvent) {
         RichInputListOfValues lovField = (RichInputListOfValues)returnPopupEvent.getSource();
         ListOfValuesModel lovModel = lovField.getModel();
         CollectionModel collectionModel = lovModel.getTableModel().getCollectionModel();
         JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
         RowKeySet rks = (RowKeySet)returnPopupEvent.getReturnValue();
         List tableRowKey = (List)rks.iterator().next();
         DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();
         Key key = (Key)tableRowKey.get(0);
         Row row = dciter.findRowByKeyString(key.toStringFormat(true));
         DCBindingContainer bc = getBindingContainer();
         DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
         OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
         FacesContext fctx = FacesContext.getCurrentInstance();
         ExpressionFactory elFactory = fctx.getApplication().getExpressionFactory();
         ValueExpression ve = elFactory.createValueExpression(fctx.getELContext(), "#{loginInfo}", LoginInfo.class);
         LoginInfo loginInfo = (LoginInfo)ve.getValue(fctx.getELContext());
         System.out.println("Return place: search date:" + loginInfo.getSearchDate());
         Row newRow = viewObject.createRow();
         String selectedAcNo = row.getAttribute("AcNo").toString();
         String selectedCurrency = row.getAttribute("CurrencyCode").toString();
         newRow.setAttribute("AcNo", selectedAcNo);
         newRow.setAttribute("CurrencyCode",selectedCurrency);
         newRow.setAttribute("OpenBal", 300);
         newRow.setAttribute("AvailBal", 200);
         newRow.setAttribute("CreateDate", new Date());
         newRow.setAttribute("EffectiveDate", loginInfo.getSearchDate());
         newRow.setAttribute("LockStatus", "N");
         viewObject.insertRowAtRangeIndex(rowIndex, newRow);
    The problem occurs when I use a 'createInsert' button to create a new row in the table,
    and then choose a value from the inputListOfValues. The new row refresh and get the value
    I chose in the first column in the new row. But the second column (currency field) is left
    as empty (null value). If I change the second column frmo selectOneChoice to inputText,
    the correct Currency value (e.g. "HKD" or "USD") can be shown. So I wonder if there is any
    additional tricks in order to set the selectOneChoice value during refresh.
    Additionally I have tried to check the state of the view object attributes during the refresh
    lifecycle and found that the following reload method (else place) is being reached 3 times after I click
    the 'ok' button in the popup up in the inputListOfValue.
    public void beforePhase(PagePhaseEvent event) {
         //System.out.println("i am here inside backing bean : before phrase 1 phrase ID:" + event.getPhaseId());
         if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
              if (!isPostback()) {
              } else {
                   System.out.println("Post Back on Page Load!");
                   DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
                   OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
                   RowSetIterator iterator = viewObject.createRowSetIterator(null);
                   iterator.reset();
                   while (iterator.hasNext()) {
                        //Row row = viewObject.getCurrentRow();
                        Row row = iterator.next();
                        System.out.print("Account:" + row.getAttribute("AcNo"));
                        System.out.print(",AvailBal:" + row.getAttribute("AvailBal"));
                        System.out.print(",OpenBal:" + row.getAttribute("OpenBal"));
                        System.out.print(",CurrencyCode:" + row.getAttribute("CurrencyCode"));
                        System.out.print(",EffectiveDate:" + row.getAttribute("EffectiveDate"));
                        System.out.print(",UserCreate:" + row.getAttribute("UserCreate"));
                        System.out.println("");
                        if (row.getAttribute("UserCreate").toString().equals("<current user>")) {
                             System.out.println("Match <current user> in preload");
                             //row.setAttribute("CurrencyCode", "USD");
                   System.out.println("end of reload");
    During the 1st time, the CurrencyCode field was set currently, but then in the 2nd and 3rd
    times, it's value suddenly changed to 'null'. If I use inputText, all the 3 times currencyCode
    field is showing correctly without the null issue.
    Anyone can kindly give me some hints? Thanks a lot!!!

  • Setting the selectOneChoice value at runtime

    Hi,
    I need to set the selectOneChoice value at runtime. On Page Load I am creating object of RichSelectOneChoice and currencyCode.setValue("USD");
    When I check on runtime it is not showing "USD" as selected item in dropdown where as in background it is sending USD to downstream application.
    How to get the show the value in SelectOneChoice which is selected at runtime in code?
    Thanks in advance.

    Hi,
    Selected value will be taken from the value property of selectOneChoice component, I guess you don't have specified value property. Create a String instance variable in bean and then set the value 'USD' to this variable and then bind it to value property of selectOneChoice component.
    Sample:
    //inside bean
    private String selectedValue;
    //Getter and Setter methods
    //Replace the currencyCode.setValue("USD"); line with the below code
    this.selectedValue = "USD"
    //Finally in jspx page bind this selectedValue to value property of bean
    <af:selectOneChoice value="#{bean.selectedValue}" ... />Sireesha

  • SelectOneChoice value

    I have a ad selectOneChoice related with a ViewObject:
    <af:selectOneChoice value="#{bindings.DocumentoVista.inputValue}"
    label="Tipo Documento:"
    required="#{bindings.DocumentoVista.hints.mandatory}"
    shortDesc="#{bindings.DocumentoVista.hints.tooltip}"
    id="schoDocumento"
    valueChangeListener="#{backingBeanScope.Usuario.selectTipoDocumento_valueChangeListener}"
    binding="#{backingBeanScope.Usuario.selectTipoDocumento}">
    <f:selectItems value="#{bindings.DocumentoVista.items}"
    </af:selectOneChoice>
    The View has the code and the description of the document. When the user select this selectOneChoice i want to get the code of the document selected to pass it to a query for validate. As you can see i have a backingbean whit a method:
    public void selectTipoDocumento_valueChangeListener(ValueChangeEvent valueChangeEvent) {    
    tipoDocumento = valueChangeEvent.getNewValue().toString();
    }

    Hi,
    the first question is the most difficult to answer. Looking into my crystal ball here on my desk, I guess its that you get an index value instead of the selected value. Not sure I am correct because you don't tell and my abilities to predict future and truth became rusty.
    Assuming I am right, then you can try as follows
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingEntry();
    JUCtrlListBinding list = (JUCtrlListBinding ) bindings.get("name-of-list-binding-in-PageDef");
    Object value = list.getSelectedValue();
    if this doesn't produce the selected value, try
    Object value = list.getAttributeValue();
    Note that your sample has another issue, which is that the target source is the same View Object as the list source. These need to be different though
    Frank

  • How to not repeat the column values if repeated on next line and so on..?

    Hi all,
    The XmlP template that is designed gives me the output as follows :
    COL1 COL2 COL3 COL4 COL5 COL6 COL7
    abc 1 1000.00 10.00 95.00 695.00 cad
    abc 2 1000.00 100.00 95.00 695.00 cad
    abc 3 1000.00 100.00 95.00 695.00 cad
    But my requirement is as follows :
    COL1 COL2 COL3 COL4 COL5 COL6 COL7
    abc 1 1000.00 10.00 95.00 795.00 cad
    - 2 - 100.00 - - -
    - 3 - 100.00 - - -
    Note : "-" indicates blank column values (gaps are being filled)
    How do I not repeat the column values if repeated?
    Please let me know if you have answer for it?
    Thanks in Advance
    Munna

    Iam trying to design the xml publisher template using xmlp template builder.
    My requirement is :
    For a receipt number, I have receipt amount, applied amount, unapplied amount and on account amount. And for each receipt, there can be multiple applied amount ( as the receipt can be applied multiple times), but the unapplied amount, on account amount and receipt amount is single.
    By using the logic as said above from http://blogs.oracle.com/xmlpublisher/2007/04/13
    Iam getting the output something like this:
    Receipt Number| Receipt Amount | App Amount |UnappAmount|OnaccountAmount|
    111-b|249.28|249.28|0.00|0.00|
    1110|1,000.00|10.00|95.00|795.00|
    1110| -|10.00|-|-|
    1112|1500.00|1,271.02|-|-|
    1112|-|228.98|-|-|
    My requirement is to go get something like this:
    Receipt Number| Receipt Amount | App Amount |UnappAmount|OnaccountAmount|
    111-b|249.28|249.28|0.00|0.00|
    1110|1,000.00|10.00|95.00|795.00|
    1110| -|10.00|-|-|
    1112|1500.00|1,271.02|0.00|0.00| ---> here lies the difference
    1112|-|228.98|-|-|
    How do i check the duplicate of the column values only for a receipt number??
    Because as for receipt no. 111-b the unapplied amount and on account amount is 0.00, the the unapplied amount and on account amount for receipt number 1112 is getting hided( because its a duplicate) . In reality, it should be 0.00 and any other line for that receipt number (1112) should be hided. except for the applied amount.
    Note We can see that last 2 columns in the last record( for receipt number 1112) is getting hided that is as expected but for 4th record the unapplied amount and on account amount should be 0.00 respecively.
    '-' indicates hided value
    Please help.
    Thanks in Advance

  • Keep selectonechoice value

    Hi,
    I'm facing a problem with SelectOneChoice wich is configured as a dynamic list. Base data source is variable, List data source is View object, and labeled item is included. When I go to another page, and after that return, value of SelectOneChoice is blank item. How can I avoid selectonechoice from reseting and keep previously selected item in list?
    Thanks in advance
    Dragana

    Hi Dragna,
         When you go to the other page or when the value is selected you can record the currently selected value from the selectOneChoice object in a sesssionBean or by some other means.
         If you want to store it on a session bean.
         Create a session bean.
         Create a a managed property on the session bean.
         When you navigate to the new page or when the value is set record the selected value on property you created on the session bean.
         FacesContext ctx = FacesContext.getCurrentInstance();
         MySessionBean mySessionBean =(MySessionBean)JSFUtils.getManagedBeanValue(ctx, "mySessionBean");
         mySessionBean.setSelectedValue(selectOneChoice1.getValue);
         There is a method on backing bean which should look like this.
         public void setSelectOneChoice1(CoreSelectOneChoice selectOneChoice1) {       
    this.selectOneChoice1 = selectOneChoice1;
         Add code similar to below
         public void setSelectOneChoice1(CoreSelectOneChoice selectOneChoice1) {       
    this.selectOneChoice1 = selectOneChoice1;
         FacesContext ctx = FacesContext.getCurrentInstance();
         MySessionBean mySessionBean =(MySessionBean)JSFUtils.getManagedBeanValue(ctx, "mySessionBean");
         selectOneChoice1.setValue(mySessionBean.getSelectedValue());
         Now the value will be set when the page is painted unless something updates or happens to the data that populates the list.
         If you are concerned about the list being updated and the value no longer being present in the list or the order changed etc. You should record the value you are interested from
         the list that populates the selectOneChoice select items and set the selectOneChoice value to its position in the list when the user returns to the page.
         You can retrieve the results on bindings as follows.
         OperationBinding myBinding = bindings.getOperationBinding("myBinding");
         List l = ((List)myBinding.getResult()).get(0);
         int i = 0;
         boolean notFound = true;
         MyObject myObject= null;
         while (i < l.size() && notFound){
              myObject = (MyObject) l.get(i);
              if (myObject.mySelectItem = selectItem){
                   notFound = false;
         this.selectOneChoice1.setValue(new Integer(i));
         Kind regards,
              Richie.

  • Header getting repeated in GUI_DOWNLOAD

    Hi,
    I am downloading a report output to local file on PC.
    For this I'm using FM GUI_DOWNLOAD with file type as 'DAT'.
    If the no. records in the table, that i am passing to the FM, are more than 30,000 then the header (which am passing to FM through 'Fieldnames') is getting repeated after every 9810 row.
    Please suggest me how to get the header displayed only once as in this case it is getting displayed 4 times in the downloaded file (text file as well as excel file).
    Thanks,
    Inder

    Hi,
    Sure it is unusual.
    have you checked whether the "header" was not repeated in the internal table itself?
    Best regards,
    Guillaume

  • Excise Duty values getting inventoriesed in MIGO but reversed in MIRO

    Dear Experts,
    I am using Taxinn procedure and while creating the PO the excise duty values are calculated properly but when I am posting the MIGO the stock value is posted along with the Excise duties. The excise invoice is captured & posted in MIGO itself and the values are posted correctly.
    While posting the MIRO the excess amount is posted at the time of MIGO is posted back to the material. How do i fix this??
    thanks in advance
    Suresh

    Hi Jayakantan/Ashok
    thanks for the replies
    I am using Taxinn procedure and the conditions are flowing from that procedure. In the purchase order i am giving the condition types only for basic price and freight.
    As far as i know, the account key determines whether the condition type is cenvatable or to be inventorised. If i give the account key as NVV the values get inventorised. If i give the other account keys and assign the gl accounts to that account key that value will be posted to that gl account and not inventorised. Correct me if i am wrong or is there any other settings which will define so.
    I have done the following settings as well for the condition types
    spro>log gnrl>tax on goods mvmt>india>basic settings>maintain cond typs>classify cond types
    and one more similar setting in the same path.
    do i need to do anything further?
    Suresh

  • Reg: Data getting repeated in the table and displayed in the Smartorm.

    Hello Experts,
    Requirement is to display header data from kna1table and item data from two tables faglflexa and bsid.
    Layout is something like this.
    Name and Address is capture from KNA1.
    Item Details from faglflexa and BSID based on one condition, UMSKZ ne 'X' and 'Y' for the respective KUNNR from KNA1.       First Item table.I have taken a separate internal table from print program
    Item Details from BSID only based on one condition, UMSKZ eq 'X' and 'Y' for the respective KUNNR from KNA1. Second Item table. I have taken a separate internal table from print program
    Calculation based on faglflexa and BSID table on one condition,UMSKZ ne 'X' and 'Y' for the respective KUNNR from KNA1.       Third t Item table. Data from the first internal table
    The complete thing should be displayed on Smartform for one Customer (kunnr). Then should go to the next customer.
    I have a written a code like this, For Example.
    loop at kna1 into w_kna1.
    Used Table1 in smartform and give a loop to display the item details based on first internal table.
    display itemdetails
    Used Table2 in smartform and give a loop to display the item details based on second internal table.
    display itemdetails.
    Used Template to display the item details to display the item details based on first internal table.
    endloop.
    Now my problem is table 1 is coming fine. table 2 data is getting repeated for all the customers based on 1st customer data, how should i clear the workarea after every customer.
    Similar pbm for the template which i'm using.
    Please help me on this.
    Thanks in advance.
    Abdur Rafique

    Hi Vishnu,
    Thanks for replying. I cant use one single table to display the output. There are several conditions in two tables.
    I have corrected the error of repetition data. Logic i will mention it below.
    loop at kna1 into wa_kna1.
    for header data " this is main table
    loop at item_1  into wa_item_1. " for first item table
    Data displayed.
    loop at item_2 into wa_item_2. " for 2nd item table
    Data displayed.
    endloop. " for 2nd item table
    data calculation based on first item table.
    endloop. " this is for first item table
    endloop." this is for 2nd item table.
    The data which is there in the 2nd item table should display data based on the kna1 loop. Data is displaying properly but not in 1 table, say for example.
    kunnr- 1000010
    there are 9 items.
    All the 9 items should be in 1 table. But here it is displaying 1 item in 1 table till 9 items in 9 tables.
    I need to club all the 9 items in 1 table.
    One more doubt is 2 items have same belnr (document number) i need to club this and add the wmbtr field and then display as 1 record.
    So final records in 2nd item table should be 8 not 9.
    Can you please help me on this.
    Thanks in advance.
    Abdur Rafique

  • Table Header not getting repeated in subsequent pages

    Hi,
    I have a table and i want to table header to be repeated in subsequent pages but only till 2nd page the table header is repeated from the 3rd page onwards the table header is not repeated.
    I have selected the Header Row in hierarchy and in Pagination tab for the header row i have checked the the check box Insert Header Row in Subsequent Pages.
    After selecting the checkbox also table header is repeated only in 2 pages and not repeated after the second page.
    My table hierarchy in form is :
    TableSubform
    ---Table
    HeaderRow
    Row1
    I am using Designer 8.0 and Acrobat Reader 8.1.2
    Can you please help me in solving this issue.
    Regards,
    Bala Baskaran.s

    Hi All,
    I have selected the the check box Insert Header Row in Subsequent Pages then also the header is not getting flowed in subsequent pages only till 2nd page its getting flowed.
    I have used table wizard to create table and i have made the table subform as flowed then also table header is not repeating in subsequent pages.
    MainForm (Flowed)
    TableSubform1(Flowed)
    Table1
    HeaderRow
    Row1
    TableSubform2(Flowed)
    Table2
    HeaderRow
    Row1
    I selected TableSubform1 and in Pagination tab OverFlow Leader dropdown i selected HeaderRow, the same i did for TableSubform2 also but the table header is not getting repeated in subsequent pages.
    Please help me in solving this problem.
    Regards,
    Bala Baskaran.S

Maybe you are looking for

  • Translate oracle error message into User-Friendly messages

    I want to translate the following message and display the user-friendly message. Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-02290: check constraint ... I have a table with MRU,MRD,... How do I do that?

  • Changing the default installation settings in AIR installer

    I was wondering if there is a way to change the default settings the the AIR Installer uses when installing an Application that I created. More specifically, when the user is going through the installation process for my application using the AIR Ins

  • My Safari page (with Lion) suddenly doubles in size?

    With Lion, my Safari pages suddenly double in size with a slight movement of my mouse. Any ideas on how to fix this?  Also, with Lion, when I leave my iMac for some period of time, the pages freezes and the cursor point pixilates when I move the mous

  • Hotspot cause Blue screen & reboot on laptop why??/

    When I use my Razor Maxx HD as a hot spot with my laptop, the laptop goes to a blue screen and reboots.  What do I do????

  • WVC80N and loud continuous audio static

    Looks like I'm suffering from the same complaint as some other people.  Just hooked up a new WVC80N and all I can hear on the audio is a loud stuttering static that drowns out all other sounds. I am connected using Wireless N over a Netgear WNDR3700