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.

Similar Messages

  • 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 delete formula from cells and keep the values in Excel VBA

    Hi,
    In my Excel I have 15 columns. In column F which has a formula (INDEX MATCH), it has contains "RECEIVED" and "INTRANSIT". I need to filter the column F for all "RECEIVED" and then remove the formula from cells and
    retain or keep the values that are already in the cells. something tricky and i'm not sure on how to work on this in Excel VBA.
    Below is my initla VBA code:
    I already have the codes on how to filter. kindly please help me on how to do this. thank you in advance.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    Debug.Print rng.Address
    rng.AutoFilter Field:=6, Criteria1:="RECEIVED"
    End With
    Application.creenUpdting = True
    End Sub

    Solved.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Dim rRec As Range
    Dim btField As Byte
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    btField = 6
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    With rng
    .AutoFilter Field:=btField, Criteria1:="RECEIVED"
    On Error Resume Next
    Set rRec = .SpecialCells(xlCellTypeVisible)
    On Error GoTo 0
    End With
    .AutoFilterMode = False
    If Not rRec Is Nothing Then
    With rRec
    .Columns(btField).Value = .Columns(6).Value
    End With
    End If
    End With
    Application.ScreenUpdating = True
    End Sub

  • Not able to keep defualt value in UDF Field

    Hello Frnds,
    I have one question to you, I want to keep default value in one of the UDF field which is ContNo which is exist in A/R invoice.
    I want to keep default value =9999999
    So to do this I have followed the following process:-
    First I went to ToolsUser-Defined FieldsManage User FieldsMarketing DocumentsTitleContNo
    then pressing update button there is an option to enter Default value and press OK button.
    After that its taking some 30 mins and giving error of "SEWSY"
    Please help me to let me know the solution.
    Regards,

    Hello Gordon,
    Please note that as per your suggestion now im not updating the udf  by the sql query.
    As i was already trying to update it from as a exclusive user of B1, but its not updating.
    Its always give the error of SEWSY.  At the time of updating there is not user logged on SAP also im updating with the adminstrator role.
    Please suggest me.

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

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Refreshing af:selectOneChoice values in multi-user environment

    Imagine the following scenario:
    a) User 1 is looking at a af:selectOneChoice on a web (ADF Faces) page showing some data
    b) User 2 inserts a new row in the table (from different jsf page) whose data is shown on that af:selectOneChoice, and commits that new row
    I need I way for the User 1 to see newly inserted row as a choice in the af:selectOneChoice.
    So, here is relevant part of code:
                                <af:selectOneChoice value="#{bindings.LokacijaId.inputValue}"
                                                    label="#{bindings.LokacijaId.label}"
                                                    binding="#{tradingTicketBacking.selectOneChoice15}"
                                                    id="selectOneChoice15"
                                                    showRequired="true">
                                  <f:selectItems value="#{bindings.LokacijaId.items}"
                                                 binding="#{tradingTicketBacking.selectItems16}"
                                                 id="selectItems16"/>
                                </af:selectOneChoice>- and here is relevant part of pageDef :
        <list IterBinding="TeeTradingTicketVOIterator" Uses="LOV_LokacijaId"
              id="LokacijaId">
          <AttrNames>
            <Item Value="LokacijaId"/>
          </AttrNames>
        </list>So, how to refresh values in the af:selectOneChoice, in order to see changes made by another user ?
    I have the same question for data displayed in a af:table - how to make changes made by another user to be automatically visible for the first user ? What is the best way to achieve this ?
    I am using ADF BC, and when I say "automatically", I mean "after User 1 made form submit in any way (partial or not)"
    Message was edited by:
    Cwele
    Message was edited by:
    Cwele

    After user 1 submits the page, it might not even be committed, so there is no way to have the pending data from user1 seen by user2.
    However, we do have a new feature in ADF 11g TP4 that I plan to blog more about called Auto-Refresh view objects. This feature allows a view object instance in a shared application module to refresh its data when it receives the Oracle 11g database change notification that a row that would affect the results of the query has been changed.
    The minimum requirements in 11g TP4 to experiment with this feature which I just tested are the following:
    1. Must use Database 11g
    2. Database must have its COMPATIBLE parameter set to '11.0.0.0.0' at least
    3. Set the "AutoRefresh" property of the VO to true (on the Tuning panel)
    4. Add an instance of that VO to an application module (e.g. LOVModule)
    5. Configure that LOVModule as an application-level shared AM in the project properties
    6. Define an LOV based on a view accessor that references the shared AM's VO instance
    7. DBA must have performed a 'GRANT CHANGE NOTIFICATION TO YOURUSER'
    8. Build an ADF Form for the VO that defined the LOV above and run the web page
    9. In SQLPlus, go modify a row of the table on which the shared AM VO is based and commit
    When the Database delivers the change notification, the shared AM VO instance will requery itself.
    However that notification does not arrive all the way out to the web page, so you won't see the change until the next time you repaint the list.
    Perhaps there is some way to take it even farther with the active data feature PaKo mentions, but I'm not familiar enough with that myself to say whether it would work for you hear.

  • 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

  • Keep login value after validation

    Hi,
    i'm learning Dreamweaver and doing a login page.
    Is it possible, when I submit my Login Form, to keep the
    value I entered in the login texfield and display a error message?
    Ex: Form method="post"
    If it's valid, redirect to page x
    If not, redirect to the same form, display the message"
    Invalid password" and keep the wonrg value in the Login field.
    thanks,
    Rosline

    Hi,
    yes of course,
    can you post the link, or the source code where is the
    problem,
    T

  • Keep the value  after a event

    I am designing a page .on its left i place some condition for searching and a button named search. on its right one table for result.
    when i click the search button ,it trigger a event which do a searching according to those conditions.Then ,the table display result.
    but,those condition which is in the textinput,choice,...disappear.
    I want to keep these value .
    Please help me!

    I don't understand, both questions seem to be about saving selected state, which Attila answered nicely. You can save and bind to the selected value as a page property.
    Did I misunderstand, do you have another question?
    Here's a working example from a page, which looks almost exactly like Attila's post:
    the ui nodes:
    <bc4j:rootAppModuleScope name="EmpAppModule" >
    <contents>
    <header text="Search" >
    <contents>
    <form name="search" >
    <contents>
    <inlineMessage prompt="Search" vAlign="middle" >
    <contents>
    <bc4j:viewObjectScope name="EmpView" >
    <contents>
    <flowLayout>
    <contents>
    <choice name="attrName"
    data:selectedValue="attrName@ctrl:page"
    shortDesc="Search Column">
    <contents>
    <bc4j:region automatic="true" >
    <bc4j:attrStamp>
    <option>
    <boundAttribute name="text" >
    <bc4j:attrDefProperty name="name" />
    </boundAttribute>
    <boundAttribute name="value" >
    <bc4j:attrDefProperty name="name" />
    </boundAttribute>
    </option>
    </bc4j:attrStamp>
    </bc4j:region>
    </contents>
    </choice>
    <textInput name="attrValue" columns="20"
    data:text="attrValue@ctrl:page"
    shortDesc="Search"/>
    </contents>
    </flowLayout>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    <end>
    <submitButton text="Go" ctrl:event="search" />
    </end>
    </inlineMessage>
    </contents>
    </form>
    </contents>
    </header>
    and the event handler
    <event name="search" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="EmpAppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="EmpView" >
    <!-- search for the view criteria -->
    <bc4j:findByExample>
    <bc4j:exampleRow ignoreCase="true" >
    <bc4j:exampleAttribute comparison="equals" >
    <bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
    <bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
    </bc4j:exampleAttribute>
    </bc4j:exampleRow>
    </bc4j:findByExample>
    <bc4j:executeQuery/>
    <!-- store the current search criteria as page properties -->
    <bc4j:setPageProperty name="attrName" >
    <bc4j:parameter name="attrName" />
    </bc4j:setPageProperty>
    <bc4j:setPageProperty name="attrValue" >
    <bc4j:parameter name="attrValue" />
    </bc4j:setPageProperty>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>

  • How to set the Selectonechoice Value associated with MethodAction

    Hi All,
    I am using Jdeveloper 11.1.1.5 and i have a two textbox on my page and one selectonechoice.I am fetching the values from the Master Table in the dropdown by sending the supplierVatId and SupplierPostCode and the base dataSource of the selectonechoice is my transaction table(InvoiceHeaderTable).
    My jspx page source is :-
    <af:inputText value="#{bindings.Suppostcode.inputValue}"
    binding="#{backingBeanScope.backing_parkSupplierId.it7}"
    id="it7">
    </af:inputText>
    <af:inputText value="#{bindings.Suppvatid.inputValue}"
    binding="#{backingBeanScope.backing_parkSupplierId.it8}"
    id="it8">
    <f:validator binding="#{bindings.Suppvatid.validator}"/>
    </af:inputText>
    </af:panelFormLayout>
    <af:selectOneChoice value="#{bindings.supplierid.inputValue}"
    binding="#{GeneralManagedBean.suppid}"
    id="soc1">
    <f:selectItems value="#{bindings.supplierid.items}"
    binding="#{GeneralManagedBean.suppiditems}"
    id="si1"/>
    </af:selectOneChoice>
    and this is my pageDef code :-
    <attributeValues IterBinding="InvoiceheaderView1Iterator" id="Suppostcode">
    <AttrNames>
    <Item Value="Suppostcode"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="InvoiceheaderView1Iterator" id="Suppvatid">
    <AttrNames>
    <Item Value="Suppvatid"/>
    </AttrNames>
    </attributeValues>
    <methodAction id="getSupplierIdfromDB" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="getSupplierIdfromDB"
    IsViewObjectMethod="false" DataControl="SupplierDetailImpl"
    InstanceName="SupplierDetailImpl.dataProvider"
    ReturnName="data.SupplierDetailImpl.methodResults.getSupplierIdfromDB_SupplierDetailImpl_dataProvider_getSupplierIdfromDB_result">
    <NamedData NDName="supplierpostcode"
    NDValue="#{bindings.Suppostcode.inputValue}"
    NDType="java.lang.String"/>
    <NamedData NDName="suppliervatid"
    NDValue="#{bindings.Suppvatid.inputValue}"
    NDType="java.lang.String"/>
    </methodAction>
    <list IterBinding="InvoiceheaderView1Iterator" id="supplierid"
    DTSupportsMRU="true" StaticList="false"
    ListIter="getSupplierIdfromDBIterator">
    <AttrNames>
    <Item Value="Suppid"/>
    </AttrNames>
    <ListAttrNames>
    <Item Value="supplierid"/>
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="supplierid"/>
    </ListDisplayAttrNames>
    </list>
    </bindings>
    And i have a button on the page called as "Clear DropDown".Now on click of Clear DropDown button  i need to clear the dropdown list and need to set a new value in the SupplierId selectonechoice.For the testing purpose it can be a static value like "Shah".
    I am trying to do like this but no help ..
    public String clearDropDown() {
    ValueExpression suppid1 = null;
    String id = "Shah";
    suppid1 =
    elFactory.createValueExpression(elContext, "#{bindings.supplierid.attributeValue}",
    Object.class);
    suppid1.setValue(elContext,id);
    AdfFacesContext.getCurrentInstance().addPartialTarget(suppid);
    AdfFacesContext.getCurrentInstance().addPartialTarget(suppiditems);
    return null;
    Please suggest!!!
    Regards,
    Shah

    While setting the value, it is giving me this warning in the logs :-
    *<FacesCtrlListBinding> <getInputValue> ADFv: Could not find selected item matching value Shah of type: java.lang.String in the list-of-values*.
    I know that the Shah is not present in the List but how do i clear the list and set the New Value which is "Shah".
    Please Suggest!!
    Regards,
    Shah

  • SelectOneChoice values as values

    Hi,
    Is it possible to have selectOneChoice/selectItems, with values as values and not with indexes as values?

    Thank you,
    But it doesn't work. If I put valuePassThru to "true", option tags's values are always indexes and not real values. Maybe beacause I have selectOneChoice value pointing to bindings attribute and selectItems value pointing to another attribute?
    <af:selectOneChoice label="Label 1" id="soc1"
                                           value="#{row.bindings.DydValue.inputValue}"
                                           autoSubmit="true" valuePassThru="true">
                        <f:selectItems value="#{row.bindings.ValueWithLov.items}" id="si1"/>
               </af:selectOneChoice>I have these 2 different attributes beacause I want the user to update first attribute, but this attribute is not always with LOV, so I create the second transient attribute, just to populate the selectOneChoice.

  • Keep Filter Value and Remove Filter Value

    Hi BI/BW Experts
    Can anyone explain me the concept of Keep Filter Value and Remove Filter Value in Business Explorer Analyzer and the Web Analyzer with a real time examples?
    Thanks
    BI Curious

    Hi,
    Check this links:
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/28d5be53706021e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/d45cdc487f6f75e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/0b532390e96e96e10000000a11466f/frameset.htm
    Hope this helps..........
    Rgs,
    Ravikanth.

  • Input Field of Type Time Unable to Keep Input Value

    Hi,
    I am facing the following problem:
    I am using an input field of type time that initially its value comes from a BAPI call. I want though to be able to change its value and use the same field as import parameter for another BAPI. The value of the field is populated correctly from the first BAPI but when I try to change it, the value disappears and it does not keep what I type within the field i.e. the field remains empty.
    Could you please let me know how to resolve this problem?
    Thank you in advance.
    Kind Regards
    Michael

    which runtime do you use?
    which version of VC?

Maybe you are looking for