How to get the selected values of the af:selectManyChoice in the bean support

Hello

I have a selectManyChoice with a list of static, as shown below.
At the click of the button, is called a method in the bean support. I want to get the list of the values selected by the method of the bean.
How to do the same thing.
<af:panelFormLayout id="pfl1" fieldWidth="50%" labelWidth="50%">
        <af:selectManyChoice label="Days" id="smc1"
                             binding="#{Bean.addDaysChoice}">
          <af:selectItem label="Monday" value="MON" id="si17"/>
          <af:selectItem label="Tuesday" value="TUE" id="si13"/>
          <af:selectItem label="Wednesday" value="WED" id="si15"/>
          <af:selectItem label="Thursday" value="THU" id="si14"/>
          <af:selectItem label="Friday" value="FRI" id="si11"/>
          <af:selectItem label="Saturday" value="SAT" id="si16"/>
          <af:selectItem label="Sunday" value="SUN" id="si12"/>
        </af:selectManyChoice>        
          <af:commandButton text="Button"
                            actionListener="#{bean.callSomeMethod}"
                            id="cb1"/>  
<af:panelFormLayout/>
Thank you
Ajay

Published by: Ajay on January 31, 2011 06:26

Hello

What about setting the property "value" of the selectManyChoice, and then point to a method of the managed bean (setter/accessor for a variable of type list)?

Frank

Tags: Java

Similar Questions

  • How to get the maximum supported ram speed

    Hi, I HAVE a laptop COMPAQ PRESARIO CQ 60 132 - el and I want to upgrade the RAM. I have now that support max 8 GB, but I want now, which is the maximum speed of the ram supported by Mhz, in fact I have 3 GB ddr 2 sodimm 4

    programmatically Z CPU at 400 mhz.   Please help me! I am grateful for!

    Plug

    You have 32 bit Vista OS (can support max ~ 4GB RAM)

    Your computer laptop support up to 4 GB of RAM MAX - so even if you install OS 64-bit, your motherboard only supports up to 4 GB in the first place.

    You can replace a 1 GB of RAM from the slot with 2 GB PC2-6400 DDR2 667 MHz SO-DIMM SDRAM, but the cost of RAM will be huge compared to the performance & capacity that he proposed as these types of RAM (DDR, DDR2) are not used in recent laptops & they are 'very precious' for - $ 100 for a key 2 GB DDR2.

    Go through page 1-3, 3-6, 4-13, 14 in this manual.

    Concerning

    Visruth

  • How to: get the Vista support replacement

    Original title: lost 3cds for windows vista professional. But I have product keys. How to download software?

    lost 3cds for windows vista professional. But I have product keys. How to download software?

    Hello

    How to reinstall Vista

    Contact the manufacturer of the laptop computer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    also ask them if you have a recovery partition on your hard drive to get back to the way you bought

    you would normally press F8, F9, F10 or F11 or Alt + F10 or 0 to start to start the recovery process according to the manufacturer

    Ask them of the exact key sequence

    or borrow a vista microsoft dvd; not a HP, Acer recovery disk etc

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    http://www.theeldergeek.com/Vista/vista_clean_installation.html

    How to replace Microsoft software or hardware, order service packs and replace product manuals

    http://support.Microsoft.com/kb/326246

  • HP Officejet 6500 E710n-z: how to get the hardware support for HP Officejet 6500 E710n-z

    I'm probably in the wrong forum, but I'm not anywhere else to go.  Just throw it out there and I hope someone has the answer.

    My very reliable Officejet printer has lost the ability to feed paper from the paper tray.  It is that decend on top of paper rolls and are believed to feed the paper until the collection of wheels.  The rolls go down, but they don't happen, and therefore no paper feed.  I can gently push the individual sheets until the collection of wheels and printing works very well.

    Has anyone dealt with this kind of problem.  Of course, it's hardware related and I'll probably have to bring somewhere for repairs.  It's a great printer for several years and I look forward to replace themselves.

    Thank you.

    I bought a new printer because the cost to fix this little problem is higher than the purchase of a new machine.

  • How to call the bean support just after JSFF / fragment of page loads?

    Hello

    I have a simple requirement - call the Backing Bean method for my page-fragment AFTER that its loading. The JSFF is delimited to the workflow.

    I tried the solution given here: http://fortunefusionminds.blogspot.com.au/2013/04/how-to-invoke-backing-bean-method-right.html but it does not work for me.

    Every time I tried to access any link layer (i.e. the PanelFormLayout DepartmentId) attribute/property within the refreshRegion method below gives NullPointerException.

    My DepartmentId property is exposed to the Backing Bean by using the Bindings property in the property inspector.

    @Override

    {} public boolean refreshRegion (RegionContext regionContext)

    int refreshFlag = regionContext.getRefreshFlag ();


    if(refreshFlag == RegionBinding.PREPARE_MODEL) {}

    System.out.println (getDepartmentId.GetValue ())

    }

    regionContext.getRegionBinding (.refresh (refreshFlag));

    Returns false;

    }


    {} public void setDepartmentId (RichInputText departmentId)

    this.departmentId = departmentId;

    }

    public RichInputText getDepartmentId() {}

    return departmentId.

    }

    Any help please?

    Thank you

    Hitesh Patel


    Hi all

    Here's how it works for me.

    1. in your backing bean create property & its get accessor for afterPageLoad as below. We don't need a setter method.

    private; channel afterPageLoad

    public String getAfterPageLoad() {}

    If (!.) {AdfFacesContext.getCurrentInstance.isPostBack ()}

    initPage();

    }

    Return afterPageLoad;

    }

    private void initPage() {}

    System.out.Print ("I'm initPage() and called exactly once");

    }

    2. create a hidden field to the bottom of your JSFF page as below.

    Thanks - Hitesh

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • How to get the value of a selected character unicode?

    Hi all

    How to get the value of a selected character unicode?

    The content property of a 'Character' InDesign object is a simple Unicode string. For access to the various characters is a basic javascript operation, and a google gives this as a good first result: http://www.w3schools.com/jsref/jsref_charCodeAt.asp

    Therefore, the value of a selected character unicode is

    App.Selection [0]. Characters [0].contents.charCodeAt (0)

  • How to get the selected values from the shuttle

    Hello

    Please tell me how to get the values of the option chosen by the shuttle leading the list.

    Thank you

    Check out this link and that this might help you.

    Attack-shuttle leak problem

    Thank you
    -Anil
    http://oracleanil.blogspot.com/

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • How to get the value of varStatus in managed Bean

    Hi all

    I use jDeveloper 11.1.2.4 version.

    I had a table with table with departments view object. I added an extra column to the table to display the serial numbers of the lines like this.

    < af:table...

    varStatus = 'vs' rowSelection = "multiple" id = "t1" binding = "#{ReferenceBeans.departmentTable}"> "

    < af:column id = "c5" headerText = "varStatus" >

    < af:outputText value = "#{vs.index + 1}" id = "ot1" binding = "#{ReferenceBeans.varStatus}" / > "

    at the bean, I get all the values of the selected line, but I don't get the varStatus value of the column.

    If I use

    Object varStatus is getVarStatus () .getValue ();.

    System.out.println("varstatus::"+varStatus);

    That's the impression first value only, but not the values of the selected line.

    varStatus.jpg

    How to get the varStatus value in the bean selected lines.

    Best regards

    Claude Reynier.

    You can get the index of the line of the ViewObject.getRangeIndexOf (row) method. Something like this:

    empIter.getViewObject () .getRangeIndexOf (currentRow)

    example:

        RowKeySet selectedEmps = getTable().getSelectedRowKeys();
        Iterator selectedEmpIter = selectedEmps.iterator();
        DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding empIter = bindings.findIteratorBinding("EmployeesView1Iterator");
        RowSetIterator empRSIter = empIter.getRowSetIterator();
        while (selectedEmpIter.hasNext())
        {
          Key key = (Key) ((List) selectedEmpIter.next()).get(0);
          Row currentRow = empRSIter.getRow(key);
          System.out.println("FirstName" + currentRow.getAttribute("FirstName") + "  - Row Index= " + (empIter.getViewObject().getRangeIndexOf(currentRow) + 1));
        }
    
  • How to get the balance of an element value

    Hello

    I have a requirement to obtain related information with balance. I am able to read the information on the element except balance.how to get the value of the particular item balance.

    for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.

    These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".

    IAM new to hrms, Please help me on how to get this balance of values

    Thank you

    Hello

    It is not very clear what you want to display in the form of balance for a given range of dates.

    It depends on how you have configured your balances and periods and balance which you are referring.

    The API allows for a given only date that matches the date earned.

    Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.

    "If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.

    Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:

    Select sum (nvl (pbv.value, 0))

    of pay_balance_values_v the VB.

    where pbv.balance_name = 'base salary.

    and pbv.database_item_suffix = '_ASG_PTD. '

    and pbv.assignment_id =

    and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')

    and to_date (' 31/03/2015 ',' dd/mm/yyyy');

    Kind regards
    Rajen

  • How to get the values of the table of the ADF to bean class?

    Hi all

    My 11.1.1.6 Jdev

    Here I do not use BC ADF in my project.  I'll put values in the ADF table with bean.

    In the table, I put a checkbox. When I selected (Checkbox) a few rows in table and submit. In the submit method, I want to get all the values of line checkbox selected in my bean class.

    How can I get the values. ???

    Here my table UI code

    < af:table var = "row" rowBandingInterval = "0" id = "t1" value = "#{pageFlowScope.BinderSolutionsBean.uiBinderProperties} '"

    styleClass = "AFStretchWidth" emptyText = "no record found".

    Binding = "#{pageFlowScope.BinderSolutionsBean.binderTree}" >

    < af:column sortable = "false" headerText = "Script ID" id = 'c4' >

    < af:panelGroupLayout id = "pgl4" >

    < af:selectBooleanCheckbox id = 'sbc1' > < / af:selectBooleanCheckbox >

    < af:spacer width = "5" / >

    < af:outputText value = "#{row.scenarioId}" id = "ot5" / > "

    < / af:panelGroupLayout >

    < / af:column >

    < af:column sortable = "false" headerText = "Quote ID" id = "c1" >

    < af:outputText value = "#{row.quoteId}" id = "ot4" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "NASP ID" id = "c2" >

    < af:outputText value = "#{row.naspId}" id = "ot2" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "GCH ID" id = 'c3' >

    < af:outputText value = "#{row.gchId}" id = "ot3" / > "

    < / af:column >

    < af:column id = "c6" headerText = "Term" >

    < af:outputText value = "#{row.term}" id = "ot9" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "Status" id = "c5" >

    < af:outputText value = "#{row.status}" id = "ot6" / > "

    < / af:column >

    < / af:table >

    follow some above recommendation such as the creation of additional attribute. You will also need the key in your collection, while making the data for your chart.

    You must write a custom selectionListener. On valueChangeEvent of box, get the key of a line and add the line at the bean.

    Maybe it's little help for you

    https://tompeez.WordPress.com/2012/01/22/jdev-custom-SelectionListener-for-viewobjects-in-rangepaging-mode/

    How to get the selected row in a table no-bind ADF

  • How to get the fnd_profile.value in the host program

    Hi all

    How to get the FND_PROFILE. VALUE('ORG_ID') in the host program.

    I loved not below, but it failed.

    v_return =' $ORACLE_HOME/bin/sqlplus - s $FCP_LOGIN < < END

    set pagesize 0

    trigger the echo

    fnd_profile. Value ('ORG_ID');

    EXIT;

    END '

    echo $v_return

    but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »

    Kind regards

    UVA

    > but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »

    .. .who is the same thing that will happen if you run SQL * more and type "fnd_profile.value...". »

    Assuming that fnd_profile.value is a function, you must select from the something (say double) or assign to a variable.

  • How to get 3table of values in the row of acronym in 11g

    Hi all
    I have 3 tables,
              Tab1
    Ck_no   amt
    1     2000
    
    
              Tab2
    
    Ck_no          Line        amt
      1              1         1000
      1              2         1000
    
    
             Tab3
    
    Ck_no         Line          sub        amt
    1               1            1          500
    1             1            2          500
    1               2            1          100
    1               2            2          200
    1               2            3          700
    In all ck_no tables is common.
    Since the 3 tables above, I need the output in the following format,

    Amt1    amt2      amt3     amt4   amt5     amt6    amt7        amt8     amt 9
    2000    1000    1000      500     500        500     100        200       700
    Can someone help me in this?

    Thank you


    Kind regards
    Gurujothi

    Published by: Gurujothi on July 9, 2012 20:46

    Published by: Gurujothi on July 9, 2012 20:47

    Gurujothi wrote:
    I know how to get the values in a row for a single column,
    ...
    but I get the error,

    Too Many values
    

    How do I change this?

    Please post your data in the example, the expected results of these data and explain the logic so that we can understand how the data relate to each other.

    In your original post, it is not clear how amt4, amt5 abd amt6 therefore show them all 500 when there are only two 500 values in the source data.

    SQL> ed
    Wrote file afiedt.buf
    
      1  with Tab1 as (select 1 as ck_no, 2000 as amt from dual)
      2      ,Tab2 as (select 1 as ck_no, 1 as line, 1000 as amt from dual union all
      3                select 1, 2, 1000 from dual)
      4      ,Tab3 as (select 1 as ck_no, 1 as line, 1 as sub, 500 as amt from dual union all
      5                select 1, 1, 2, 500 from dual union all
      6                select 1, 2, 1, 100 from dual union all
      7                select 1, 2, 2, 200 from dual union all
      8                select 1, 2, 3, 700 from dual)
      9  --
     10  -- END OF TEST DATA
     11  --
     12  select ck_no
     13        ,max(decode(rn,1,amt)) as amt1
     14        ,max(decode(rn,2,amt)) as amt2
     15        ,max(decode(rn,3,amt)) as amt3
     16        ,max(decode(rn,4,amt)) as amt4
     17        ,max(decode(rn,5,amt)) as amt5
     18        ,max(decode(rn,6,amt)) as amt6
     19        ,max(decode(rn,7,amt)) as amt7
     20        ,max(decode(rn,8,amt)) as amt8
     21        ,max(decode(rn,9,amt)) as amt9
     22  from (
     23        select ck_no, amt, row_number() over (partition by ck_no order by ord, line, sub) as rn
     24        from (
     25              select 0 as ord, ck_no, 0 as line, 0 as sub, amt from tab1 union all
     26              select 1 as ord, ck_no, line, 0 as sub, amt from tab2 union all
     27              select 2 as ord, ck_no, line, sub, amt from tab3
     28             )
     29       )
     30* group by ck_no
    SQL> /
    
         CK_NO       AMT1       AMT2       AMT3       AMT4       AMT5       AMT6       AMT7       AMT8    AMT9
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
             1       2000       1000       1000        500        500        100        200        700
    
  • How to get the value of viewrow by chain

    With the help of Jdev11.1.1.5.0 - adfbc - ireport3.0.0

    Here I will describe: what I've done.

    use jsff (dynamic region) while hitting the af:tree nodes it opens. Fine OK

    I had somevo manually wroten Query. and the query is fine no problem with it
     here i give sample not a original query
    select * from sometable where acctid = :pacctid
    I do drag and drop the pacctid correspondent run params vo as selectoncechoice


    public static vo
    Value of data - to pay account, advance

    Announcement name - ap, given


    in this jsff
    *page representation*
    
    account type :   account payable (ap) - select one choice type
                            advance           (ad) - select one choice type
    
    like this some select once choice and some inputs.
    
    Run report - command button
     .jsff code 
    <af:selectOneChoice value="#{bindings.ACCT_TYPE.inputValue}"
                              label="Account Type"
                              shortDesc="#{bindings.ACCT_TYPE.hints.tooltip}"
                              id="soc3" required="true" 
                              autoSubmit="true"
                              binding="#{backingBeanScope.SUP1040V.soc3}"
                              valuePassThru="true"
                              valueChangeListener="#{backingBeanScope.SUP1040V.ValueChangeListener1}">
                             
            <f:selectItems value="#{bindings.ACCT_TYPE.items}" id="si3"/>
          </af:selectOneChoice>
    
     <af:commandToolbarButton text="Export in pdf" id="ctb2">
              <af:fileDownloadActionListener method="#{backingBeanScope.SUP1040V.Report}"
                                             />
            </af:commandToolbarButton>
    . Java
         //while hitting the button following logs are appeared i show it as commented format.
    
        public void Report(FacesContext context, OutputStream out) throws IOException,Exception
            {
            
                FacesContext ctx = FacesContext.getCurrentInstance();
                HttpServletRequest request =
                    (HttpServletRequest)ctx.getExternalContext().getRequest();
                HttpServletResponse response =  
                    (HttpServletResponse)ctx.getExternalContext().getResponse();
                
            .....
                         
                BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                System.out.println("print binding" +bindings1 );
           
    //while using sop i get this in my log : :  print binding  ReportsPageFragments_SUP1040VPageDef_WEB_INF_TaskFlows_SUP1040_V_TF_xml_SUP1040_V_TF
    
           
                JUCtrlListBinding listBinding1 = (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
                System.out.println("print list bindings" +listBinding1 );
           
    //while using sop i get this in my log : :  print list  bindings0
    
    
                Object selectedValue1 = listBinding1.getSelectedValue();
                System.out.println("print selected value" + selectedValue1);
    
    //while using sop i get this in my log : :  print selected  valueViewRow [oracle.jbo.Key[AP ]]    
                
                  
     request.setAttribute("ACCT_TYPE", //here i want the value  "AP" in  String  ); 
    
    if i use like this means
    request.setAttribute("ACCT_TYPE", soc1.getValue()  );  i get the index value.
    
    i need the dataname "ap" so i go above method which say wrotes ...
                 
              
                           ...                                    
                request.getRequestDispatcher(response.encodeURL("/sup1040servlet")).forward(request,response);
                
                System.out.println("hihihihih");
                response.flushBuffer();
                ctx.responseComplete();
           
            }
    
        public void ValueChangeListener1(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            String AcctType = valueChangeEvent.getNewValue().toString();
            System.out.println("AcctType" + AcctType);
            FacesContext contxt = FacesContext.getCurrentInstance();
            valueChangeEvent.getComponent().processUpdates(contxt); 
          
           BindingContainer bindings1 =
           BindingContext.getCurrent().getCurrentBindingsEntry();
           // Get the sepecific list binding
           JUCtrlListBinding listBinding1 =
           (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
           // Get the value which is currently selected
           Object selectedValue1 = listBinding1.getSelectedValue();
           System.out.println(selectedValue1);
        }
    If I get ap means my report runs. or otherwise it will show an empty page.

    How to get the value of class viewrowimpl as string.

    Published by: ADF7 on March 24, 2012 07:27

    ADF7,
    I'm not sure that understand what you're up to.
    For as far as I understand you want to get the value of display rather than the index
    I use this code

        public void StatusChangedListener(ValueChangeEvent valueChangeEvent)
        {
            BindingContext lBindingContext = BindingContext.getCurrent();
            BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
            JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("Status");
            int newindex = (Integer) valueChangeEvent.getNewValue();
            Object row = list.getDisplayData(); // Wichtig um die liste zu laden!!!!
            Row lFromList = (Row) list.getValueFromList(newindex);
            Object lAttribute = lFromList.getAttribute("Value");
            String newVal = (String) lAttribute;
        }
    

    to get the value of a component of selectOneChoice...

    Timo

Maybe you are looking for

  • My phone freezes again and again!

    whenever I try to play a video, use didctation, use the camera talk to siri and touch sometimes simply 3D, my phone hangs and turns! This is the case FOR many that my phone crashes sometimes 5 times in 2 minutes when trying to play a video! To replic

  • Why can't I change my favorites?

    I have Firefox 33.1 on my mac. I would like to modify my favorites, but for the life of me I can't understand how something but add bookmarks. Please, please, please tell me how to change or at least delete and recreate. Thank you.

  • How to cancel the automatic subscription Apple music on iPad

    I have read several articles, but none of them offer specific instructions on how to disable automatic upgrades of Apple's music. It comes to the selection screen when I press the icon of the silhouette in the upper left corner of the music app, tap

  • App (other than Message) to send SMS

    Girl has no data on his iPhone. When she is on Wifi, no problem to send an IMessage, but when it is not, therefore, a way to send her SMS. I don't want to change the parameter setting, I want just an app that could access my SMS provider.

  • No secure WiFi connection. Need firewall software?

    my wifi connection is not safe here, believe so I need to install a firewall on iPad software to enable my email be directed to real addresses I choose to send them to, rather than, when seized upward, and the word 'send' is pressed, then this partic