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

Similar Messages

  • SystemD Values Get Reset to Default after some Time

    Hi,
    I'm using two machine as gateways and Keepalive HA load balancers, so I've enabled some kernel options, but after some time (the next day or so), these options have been reset to their default (disabled) values.
    Why does that happen, and how to stop that from happening?
    I have to reset the parameters each time. I could set up a script to run on a schedule, but I would like to prevent it from happening in the first place.
    These are the values which get reset to 0 (this time):
        net.ipv4.conf.all.accept_redirects
        net.ipv4.vs.conntrack
        net.ipv4.vs.expire_nodest_conn
        net.ipv4.vs.expire_quiescent_template
    Thank you.

    I didn't find anything in the journal, but I am curious about what I did find: every 1-3 seconds, there is an entry which is repeated: "sshd[<Number>]: Set /proc/self/oom_score_adj to 0". What does it mean? I've been scrolling for the last few days-worth of this message, and there is still more... I also have many attempts to log in via ssh from China, from multiple IP addresses, with various user names and many unsuccessful authentication attempts for root; maybe the entry is related to these attempts...
    Going back to the original discussion, I think I've seen someone mention a systemd service or something like that which resets kernel settings, or some other things, to their default values, in a post (here), but I didn't find it again. Is there such a service that does something like that?
    It is strange that since I started this thread, and since I reset the settings to 1, they have remained at 1. I notice that it happens irregularly.

  • 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?

  • DataGrid dropdowns getting reset on scrolling through the grid

    I have a datagrid which contains two columns with dropdowns.
    The dropdown values are set to particular index programmatically.
    But when the scroll bar of the grid is made to scroll from top to
    bottom and then back to top the selected values get reset. Any idea
    about this behaviour?

    Yes. item renderers are "recycled". Flex only creates enough
    for the visible rows. When you scroll, the item data for the
    scrolled-into position item is sent to the renderer(through the set
    data() setter), which must use that data to render its visible
    state.
    This means all aspects of the item renderer must be data
    driven. You cannot do an data oriented work in initialize or
    creation complete, but must override the set data() method. Best
    practice is actually a bit more complicated thatn that. You will
    have toset the selectedIndex of the renderer combobox from some
    value stored in the item.
    Google: Alex Harui item renderer recycle
    For a full explanation and examples.
    Tracy

  • 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.

  • Parameter gets reset and Multi-value parameter doesn't work

    Hi
    Two Issues:
    I've set the value of a Date parameter (Start Date) when moving from the home screen (Report 1) to the next screen (Report 2) as the first day of the current year (DateSerial(Year(Today),1,1). In report 2, if I try to change the Start Date to another date,
    it gets reset to the first day of the year. I had the default value set as the first day of the year and even after removing it, the Start Date gets reset.
    I've set a multi-value parameter (Area) in Report 1 that collects four integers. I pass Area to Report 2 (through Join (Parameters!Area.value,",")). I also used SPLIT (Join (Parameters!Area.value,","),",") to get the value.
    Then, in the data set, I call this parameter as "Select A1,A2,A3,B1,B2,B3 FROM TEST_VIEW WHERE ID IN (?)". But this query throws an error that the query could not be executed. I ran the same query on the server side and it runs fine.
    Note:
    We cannot reference parameter names as @area for example because the Composite Server doesn't allow that.
    Split and Join operate on strings but my parameters are of integer type. Is this an issue?
    Please help.

    1. Are setting an expression for available values of parameter in report 2? Is the value you pass a valid among the set of values?
    2. IN wont work with comma separated values. You need to parse the individual values out using a string parsing udf as a table and then join to that
    so in your case you would be like
    Select A1,A2,A3,B1,B2,B3 FROM TEST_VIEW t
    INNER JOIN dbo.ParseValues (@Area,',')f
    ON t.ID = f.Val
    ParseValues UDF can be found in below link
    http://visakhm.blogspot.in/2010/02/parsing-delimited-string.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Protecting the attribute value from getting reset!

    Hello all,
    I have attached a custom drop down search help to the attribute "SERVICE_UNIT_NAME" in the "BTPARTNERSET" context node. The drop down list contains a blank entry as well as a couple of other entries, I have placed a create object statement for my search help class in the Getter method "GET_V_SERVICE_UNIT_NAME" while written the following code in the setter method "GET_P_SERVICE_UNIT_NAME" as suggested by one of the esteemed experts here on the forum.
      case iv_property.
        when if_bsp_wd_model_setter_getter=>fp_fieldtype.
             rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
      endcase.
    This drop down list is showing correctly, however my problem is that if the user selects any value from the drop down list, the selected value gets copied to the attribute but when ever the user press an "ENTER KEY" or any other action, the value in the attribute gets initialized to the first value in the drop down list which is a "BLANK" value. I want to preserve the value originally selected by the user from the drop down list, without it being reset by any other user actions on the screen.  Do I need to redefine any other method for this attribute? I'll appreciate any help.
    Regards,

    Naresh and Sumit, many thanks for your valuable inputs however, I have tried your code but I am still facing the same issue, as the attribute value for "SERVICE_UNIT_NAME" is getting refresh every time an "ENTER" is pressed on the page. Let me specify some other detail that may help in understanding this behaviour for the attribute value, actually when on the initial page, user has to enter his phone no / network ID, so that the standard functionality bring about the city, postal code, country etc. so once these values are set in the related attributes, the user will click on the incident button, which brings about a search help (web dialogue) for partner selection, so any value selected, is displayed afterwards in the "SERVICE_UNIT_NAME" attribute on the next page. However, after putting the custom drop down list at the said attribute, the value selected on the previous page is not populating in the attribute and the user can select the value from the custom drop down list now, but once he press "ENTER" or pushes any other button the page, the selected value in the attribute gets initialized. Is there a way to check for the user input?

  • 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!!!

  • 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.

  • Xsl:param or xsl:variable gets reset.

    Hi, I'm trying to keep a counter using a top level variable in xsl.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:variable name="rownumber">1</xsl:variable>
    And every time my xsl calls a specific template, i want to keep a counter.
    <xsl:template match="row">
    <xsl:variable name="rownumber">     
    <xsl:number value="$rownumber+1"/>     
    </xsl:variable>     
    <xsl:variable value="$rownumber"/>
    </xsl:template>
    However, my variable $rownumber always gets reset to the default value of "1" everytime the template is called and returns a value of "2".
    Is there a work around for this? Is there a way to keep a counter in xsl? Can top level variable change?
    I don't want to count the nodes either....
    Thanks in advanced,
    jon

    You can't do that. Variables can't change. And there is no "workaround", as you put it. XSLT is not that kind of programming language. If you want to count something, you need to figure out an expression that looks at the incoming XML and determines the answer. This is often surprisingly easy once you stop writing programs that assume that statements are executed one after the other. For example, in your case it appears that you just want to count the number of "row" elements in the document. The XPath expression for that is "count(//row)". Or perhaps you want to count the number of "row" elements below the current node; that's "count(row)".

  • 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

  • Where in the JSF lifecycle does submittedValue, localVaue, value get set?

    Where in the JSF lifecycle does submittedValue, localVaue and value get set? I was looking at those values on a hidden input field and it was not clear to me in what phases the various values get set. It seemed like sometimes one was set, sometimes the other was set. It was not clear to me how to know where to look for the value (other than try one if that was null try another).
    Brian

    BHiltbrunner wrote:
    Where in the JSF lifecycle does submittedValueIt will be set during the apply request values phase, in the decode() method of the HtmlBasicRenderer.
    It will be reset to null during the process validations phase, in the validate() method of the UIInput.
    localValue and value get set? Those will be set during the process validations phase, in the validate() method of the UIInput.
    The difference is that 'localValue' represents the actual and unevaluated value, and 'value' represents the outcome of the evaluated ValueExpression value.
    I was looking at those values on a hidden input field and it was not clear to me in what phases the various values get set. It seemed like sometimes one was set, sometimes the other was set. It was not clear to me how to know where to look for the value (other than try one if that was null try another).Depends on the where and when you're going to check them.

  • Audio stream gets reset when it shouldn't

    Hello
    I've got 1 asset with 4 audio streams and 5 subtitle streams and according to the language choice made on the first page of the menu, the correct audio streams and subtitle streams get set. There are 10 different documentary DVDs, of these 5 are doing what they should and 5 not - the fifth language choice, Swahili, somehow resets to the first audio stream (english or original language) even though the correct subtitle stream still comes up. This when simulating and when burning the disc. When we check the info panel while simulating to see what values get passed thru the specific GPRMs, the correct values are there but as soon as one clicks on the Play button, you can see the value being incorrectly set back to the "english" audio stream. We've double checked all our settings, compared to the projects that work correctly, checked over and over to see why this could happen and there is no difference between the ones that work and the ones that don't...
    Any ideas on why this might be so?
    Corné

    Hello
    No, that was not it but I did manage to resolve the problem after literally checking every single line in every script and physically what is where. And we found that DSP does not like it if there are gaps between audio tracks. For example, one needs to stack audio tracks up beneath each other, as soon as there is one track on track 1 and then one on track 3, the audio will reset back to track 1 when clicking on a button that is set to track 3. Because we have so many languages but not all films had all the audio tracks, we wanted to keep a basic structure all the way thru so our scripts would be easy to change, therefore sometimes having empty tracks between others, but clearly this does not work.
    Corné

  • Absolute Encoder getting Reseted to Zero while MAX initializa​tion (Clear Power Reset)

    Motion Control CardCI 7390
    DI / DO Card: PCI 6560
    Motor Specificationanasolnic Minas A5
    Model Number:MHMD082S1V
    Encoder Type:Absolute
    Zero Absolute encoder reading after switching ON the System.
    Motion Control Logic as bellow:
    1) Initialize PCI 7390 to enable Servo
    2) Get Encoder Reading
    3) If it is not equal to zero 
    4) Move this axis to Zero Position(Homing) & Enable Home Indicator
    5) Operator will Load the component
    6) Press "Cycle Start"
    7) Move Axis to 198000 pulses (Target Position)
    8) Get Job complete Signal
    10) Move Axis to 0th Position (Homing)
    Suppose,During Axis movement power goes off,then ideally Absolute Encoder value should remain same after system start up.
    But,It is not happening.We are getting Zero for every time after Switch ON the system.
    {MAX Checking:Current Encoder Value=1500,if we send 5000 digital pulses to Servo in position control mode,it moves clockwise to 6500th position in forward direction.In second case,if we send -3800 digital pulses to Servo in same mode,it moves anticlockwise to -2300th position in reverse direction.}
    I personally feel this problem due to initializing,when we are initialize Servo,that time it is writing Zero value or resetting Absolute Encoder Value.
    Attachments:
    l&t PCI 7390motion config.zip ‏1109 KB

Maybe you are looking for

  • Performance Issue with VL06O report

    Hi, We are having performance issue with VL06O report, when run with forwarding agent. It is taking about an hour with forwarding agent. The issue is with VBPA table and we found one OSS note, but it is for old versions. ours is ECC 5.0. Can anybody

  • How can i print a scrit to keep in wait for some time then be printed

    Hi Experts, This is sheela reddy.I am new to SDN. I need your help. as per my requirement there is a trasaction code .let say X. So when i excute X and save the data through the Tcode,then it automtically calls script and given for printing Since the

  • Trouble with the image quality when viewing under 100%. First time posting on the forum.

    Hello everyone. I am sorry we have the get acquainted this way but I am having some issues and this is one of my last options of getting help.   Allow me to explain the problem.    When viewing a file under 100% zoom, everything looks jagged like the

  • Getting Error in Execution of Interface in ODI

    Requirement: To transfer data from Oracle to SQL server. LKM Used : LKM SQL to SQL Getting Below Error In Executing the Interface. ODI-1226: Step --------INTERFACE NAME------ fails after 1 attempt (s).ODI-1240 :Flow --Interface Name--- fails while pe

  • Import error in DBA Studio

    Hi, I am using Oracle 8i in a windows NT environment. I want to import data. I created a database, and I use the import data option in DBA studio. I get the following error (as it is in french, excuse me for the translation ...) the following error o