Getting the selected row (selected using radio button in dataTable)

I have problem getting the selected row.
If not mistaken, the way used in BalusC's website sets the value to the backing bean using the valueChangeListener.
Can I set the value to the DTO instead?
using something like
private boolean selected;
public void setSelectedItem(ValueChangeEvent e){
this.selected = true;
}  If i use this way it throws NoSuchMethodException. I have no idea why. I did this for the checkbox and it works fine. I don't know why it doesn't work for radio buttons.

The DataTable is below :
<h:panelGrid columns="1" columnClasses="table_align">
          <t:dataTable id="table1" value="#{sysMgrBean.locationList}"
               var="location" rows="5" styleClass="table" headerClass="tableHeader"
               rowClasses="tableRowOdd, tableRowEven" width="500">
               <t:column>
                    <f:facet name="header">
                         <h:outputText styleClass="lbl" value="#{lbl['no']}" />
                    </f:facet>
                    <h:outputText value="#{location.id}" />
               </t:column>
               <t:column>
                    <f:facet name="header">
                         <h:outputText styleClass="lbl" value="#{lbl['slct']}" />
                    </f:facet>
                    <h:selectOneRadio  value="#{location.selected}"
                         onfocus="dataTableSelectOneRadio(this);"
                         onclick="enableInput(this.form,this)" valueChangeListener="#{location.setSelectedItem}">
                         <f:selectItem itemValue="" value="true" />
                    </h:selectOneRadio>
               </t:column>
               <t:column>
                    <f:facet name="header">
                         <h:outputText styleClass="lbl" value="#{lbl['cd']}" />
                    </f:facet>
                    <h:outputText value="#{location.loccd}" />
               </t:column>
               <t:column>
                    <f:facet name="header">
                         <h:outputText styleClass="lbl" value="#{lbl['desc']}" />
                    </f:facet>
                    <h:inputText id="Description" value="#{location.descr}" disabled="#{location.disabled}" />
               </t:column>
          </t:dataTable>In the DTO :
private boolean selected;
public void setSelectedItem(ValueChangeEvent e){
this.selected = true;
}

Similar Messages

  • How to get the previous row selected index of a table....

    Hi friends,
    I have a table. i have a action/event handler defined on its onLeadSelect event.
    In this event, if i use node_code->get_lead_selection_index( ) .. i m getting the newly clicked row index.
    ex: table has 3 rows.
    Row 1 is by default selected. Now if i select the row 3, in my event by using node_code->get_lead_selection_index( ). im getting index 3. which i sel
    But i want to get index 1. 
    kindly help me.. i dont have any other option as i m very new to this.
    hope i gave u correct inputs on my problem.
    thanks in advance,
    Niraja

    One way to achieve this is to maintain an attribute in the assistance class or a node element , called OldLeadSelection , at the Component controller level which stores the value of the lead selection index.
    On LeadSelect action handler method, in the first line, read the value of the attribute/element defined above. For the first time a row is lead selected, this value will be initial. After exexcuting the code in the LeadSelection event handler method, store the LeadSelection index value in the attribute defined above. The next time when the LeadSelection event method is called, when the value of this attribute is read in the initial line, it will house the value of the index of the previous LeadSelection.
    There could be other ways to achieve this. This is one of the methods.
    Best Regards,
    Rashmi.

  • Getting the entire file path using "Browse button"

    Hi All,
    I searched the forum for the solution, but did not find it there.
    I am using JFileChooser to browse and select a file.
    then i have to pass this file as and argument to another java program where it reads the file and sends it to the server.
    Now what i actually want is, when the file is selected i want to get the file nam along with the path i.e. C:/temp/temp.doc
    instead i am getting only temp.doc.
    I tried setting the JFileChooser mode as DIRECTORIES_ONLY. But that gives me only C:/temp and not the file name.
    If i set it as FILES_AND_DIRECTORIES it again gives me only the file name and not the path.
    pls. help me. its urgent.
    thanks

    What is wrong with JFileChooser.getSelectedFile()? From the returned File object you can get the canonical name which sounds to be what you want.

  • The first row of a radio button is hidden

    Dear all
    i've a tabular block(4 rows) which contains two radio buttons, at runtime only 3 rows are displayed
    thanks in advance for your help
    MHassan
    Edited by: user5473866 on Oct 9, 2011 5:00 AM

    Please read this:
    http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
    Without details, it will be difficult to help. There is a long list of reasons why an object may not be visible at runtime. Here are just a few:
    1. You have coded the object to not be visible.
    2. The object's Visible property is set to No
    3. The object is covered by another
    As always, the best way to troubleshoot any problem is to simplfy it. Create a new form and create the same objects on the canvas that you have on your failing form. Do not change any of the object properties or add any of your own code. Does it appear correctly when you run it? If so, they you now know that one of the reasons listed above is causing the problem.

  • How to use Radio Buttons in SAP BI 7 for a set of three fields?

    Dear SAP Gurus,
    We are using SAP BI 7. We need to use Radio button to select one field name (out of a set of three fields) which
    appeared on selection screen.
    The scenario is; we have three fields
    1) Field Name A
    2) Field Name B
    3) Field Name C
    Now, we need to select one field(using Radio button) from the above and later the report related to the above
    selected field should be displayed.
    The three reports will be as follows:
    1) Report A
    2) Report B
    3) Report C
    if Field Name A  is selected then Report A  will be displayed,
    if Field Name B  is selected then Report B  will be displayed and
    if Field Name C  is selected then Report C  will be displayed.
    To display the report we have two cases;
    1) There will be a common selection screen and all the three reports will come in single workbook but in seperate worksheet.
    2) There will be a common selection screen and all the three reports will come in same worksheet, one after the other.
    Is it possible to create the report in this manner, if yes, please suggest the steps.
    Regards,
    DV.

    I think you would just use commands to do the following:
    1. Hide report Analysis Item 2 and Analysis Item 3 if the 1st button was pushed.
    2. Hide report Analysis Item 1 and Analysis Item 3 if the 2nd button was pushed.
    3. Hide report Analysis Item 1 and Analysis Item 2 if the 3rd button was pushed.
    Hope that helps...

  • Related selects using radio button

    Hi All,
    I wanna use radio button with three options and one dropdown
    box .
    my problem is i wanna choose option from radio button and run
    the related query to get the values into dropdown box and then
    choose the value from drop down and submit it to another page.
    Any ideas ? please help me.
    Thanks in advance

    Google coldfusion related selects and adjust the javascript
    so that you are using radio buttons instead of a select.
    I recently posted my own code. Look for the keyword
    etiologydetail.

  • What is the diffrence  between "Key to Select" and "Selected Key" while creating Radio  Buttons?

    While creating radio buttons there is a confusion regarding two properties "Key to Select" and "Selected Key".Can anybody explain it with example?
    Thanks,
    Vimal

    Hi Vimal,
    Please find my explanation as below
    Key to Select: This is the unique key for each radio button to identify which one is selected
    Selected Key: This holds the "KEY" of selected radio button
    Example:
       Let us say we have 2 radio buttons : Male & Female
         Create a context attribute SELECTED_KEY of type STRING.
         Create an action ON_SELECT for radio button select event
         Now,
         the properties for "MALE" radio button as below
              KEY_TO_SELECT = 'M'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
         The properties for 'Female" radio button as below
              KEY_TO_SELECT = 'F'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
    If we select radio button 'Male', we get the key as 'M' and for 'Female' radio button 'F'.
    check inside the event handler method ONACTIONON_SELECT, you get the 'KEY' of selected radio button.
    So, the context attribute 'SELECTED_KEY'  gets filled with the key of selected radio button
    Hope this helps you in distinguishing the 'KEY TO SELECT' & 'SELECTED KEY' .
    Regards,
    Rama

  • How to use Radio buttons in WAD to select different condition in a query

    Hi Guru,
    I am new to WAD, I want to use radio buttons in selection screen of query for different selections based on selection criteria. I am aware of executing different queries using different radio buttons. but i want to use single queries for different radio button selections.
    I have found some relevant topic to it but not got exact solution. Please guide me.

    Hi Avinash,
    Drag a DropDown webitem into your template. Under DropDown webitem properties, Data Binding -> Fixed List of Options.
    Fixed Option -> Action -> Command via Command Wizard, Command -> Commands for Data Providers -> Data Provider Commands for Filter Values -> SET_SELECTION_STATE_SIMPLE. Data Provider Affected -> choose the main DP Query here. Characteristic -> choose Employee Group characteristic here as present in your DP Query. Sign -> INCLUDING, Operator -> EQUAL_SELECTION, Equals -> MEMBER_NAME, Member Name -> specify the value here i.e. Employee1 etc.
    Repeat above Fixed Option step for Employee2, Employee3 etc. selections. For 'All' option choose Command CLEAR_SELECTION_STATE with Data Provider Affected as the main DP Query & Characteristic as Employee Group.
    --Priya

  • Restriction on length of the name given to a radio button in selection scr

    Hi,
    Is there any length restriction for the name given to a radio button in SELECTION SCREEN?
    I need to display a 35 char name for a radio button.

    It can be upto 8 characters long. But here is a solution to your problem:
    selection-screen begin of line.
    parameters: rb_opt1 radiobutton group mygrp.
    selection-screen comment 5(35) text-s01 for field rb_opt1.
    selection-screen end of line.
    selection-screen begin of line.
    parameters: rb_opt2 radiobutton group mygrp.
    selection-screen comment 5(35) text-s02 for field rb_opt2.
    selection-screen end of line.
    and then just double click on the text objects to write your own texts.
    Hope it helps.

  • How to get  current row(Based on Radio button check)  submit button Click

    Hi i hava Query Region Search(Based On Auto Customization Criteria).
    For Showing Results iam Using Table Region.
    Using Radio button How we get the row reference value using Submit button Click.
    Please Help on this .
    Thanks & Regards
    San

    Hi san ,
    Try this
    if ("EventID".equals(pageContext.getParameter(EVENT_PARAM)))
    String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    OARow row = (OARow)am.findRowByRef(rowRef);
    VORowImpl lineRow = (YourVORowImpl)findRowByRef(rowRef); // Replace your vo name .
    Please refer this link , Let me know if its not clear .
    Single Selection in table Region in OAF .
    Keerthi

  • WD ABAP: How to get the contents of selected table lines?

    Hi,
    I'm trying to figure out how to get the contents of table lines back from the UI. I display a table with several lines of data. The user selects some rows. I want to move the contents of the selected rows to another table. I have a context attribute, say DATA, with attributes FIELD1... FIELDn, using a DDIC structure. These are bound to the table UI element and the corresponding table columns. To get the selected rows, I use wd_context->get_selected_elements(). This works, but what I get from this method is references to if_wd_context_element. How do I know which row (row number = ?) this corresponds to? And how do I get the actual data? I want a structure with FIELD1 = value1 FIELD2 = value2 etc. My context attributes FIELD refer to table columns, but I'm looking for the table line...
    Can somebody help me?
    Thanks,
    Ira

    Hi Ira,
    wd_context->get_selected_elements() returns WDR_CONTEXT_ELEMENT_SET which is a table type of IF_WD_CONTEXT_ELEMENT. You can loop through the WDR_CONTEXT_ELEMENT_SET, get into variable say node_elelement which is of type ref to If_Wd_Context_Element. Then you could use the method GET_STATIC_ATTRIBUTES of If_Wd_Context_Element which returns a structure with values of all the attributes in the selected row.
    If you need the row number, while populating the node you could have an additional attribute called rowno and populate it correctly. When you select the data using method GET_STATIC_ATTRIBUTES, you would get the appropriate row number.
    Regards,
    Srini.

  • How to get the value of Selected Dimension in a Pie Chart ?

    Hi All,
    Here is an example i'm working on ,
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    I'm using selectData event to fire when any data is selected in the chart. How to get the value of dimension, in my case country which has been selected ?
    Thanks & Regards
    Sakthivel

    Hi,
    I added below code
    var oSelectData = oEvent.getParameter("data");
    // let the dataset convert the event coordinates back to a UI5 model context
    var oContext = this.getDataset().findContext(oSelectData[0].data[0].ctx.path);
                   console.log(oContext);
    in console  I am able to get the path of selected dimention.
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    you can figure out how to get the data from this information.
    Regards,
    Chandra

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • How to get the dialog of select ODBC source

    how to get the dialog of select ODBC source which system provide.

    JNI.
    Or buy/find a library that does it for you (using JNI.)

  • In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    Hmmm, I wonder if that window is hidden or off screen? Have you moved the pic window around to look under it?
    Might try this...
    Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions.
    Then move these files to the Desktop for now...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.bookmarks.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.

Maybe you are looking for

  • Wireless network report says that the wireless radio is not fuctioning

    I have a C309a HP printer.  When I updated my laptop from Vista to windows 7 and try to connect to the wireless printer,  it will not connect wirelessly.  When I print the Wireless network Test Report the report says that the Wireless radio in the pr

  • Why is the text in the resume template invisible?

    using macbookpr laptop and iWork '08 pages professional resume template with a pic, why is the text invisible? I can't get the font to be black....when I preview in print , everything looks normal

  • Settings not saved since latest SB upda

    Hello all, I've got a problem namely when I turn the settings on speaker volume the way I want em (also some options in THX console) and reboot, the settings are returned to default. It's quite annoying and it has happend since I've installed the lat

  • IPad1 iOS5 custom music not playing

    After upgrading to iOS 5 on my iPad1, songs i recorded myself using Garage band no longer play on the iPad. they still play on the iMac. Is this a DRM issue or a bug or something? When I play them on the ipad, the iPad starts a totally different song

  • Putting home burned dvd's on ipod

    i have TiVo connected to my TV and i have a DVD burner, so I like to burn TV shows and sports. when i try to decrypt those dvd's it doesn't read. does anyone know of a free dcryper that works.