Radio button in data table

Hi,
In continuation to my previous post, i have another requisite.
I have a pop and get my data from a data table.for each of my row in datatable i need to get a radio button.
presently am using f:selectoneradio.
At a time only one radio has to be selected.I understand jsf radio button does not support this.
Is there anyway that i can achieve this?
Does tomohawk tags support this feature?or shud i have to go only for some custom component?

Here is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
Private Sub RSWVBAPage_afterPlay()
Dim tbl As HTMLTable
Dim tblRow As HTMLTableRow
Dim tblCell As HTMLTableCell
Dim strValue As String
Dim rButton As HTMLInputElement
' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
' Strip out the ; for inner text comparison
strValue = Replace(strValue, ";", "")
' This will get the table but can be modifoed to be more specific
Set tbl = RSWApp.om.FindElement(, "TABLE")
' This loops through all the rows in the table until a match to the strValue is found
' then clicks the radio button. Findelements allows you to specify a root element
' once the correct root row is found, FindElemets can get the correct radio button
For Each tblRow In tbl.rows
  If tblRow.innerText = strValue Then
    Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
     rButton.click
   End If
Next
End Sub
I also uploaded the script I created. You should be able to run it and see how it works.
This should get you going.

Similar Messages

  • Radio Button in a table

    Hi ,
    My requirement is to have a radio button in a table .
    scenerio : i have 3 coloumns in a table as shown below
    From Date      To Date            Select
    Select coloumn is a radio button . i made that coloumn to a radio button in table not in SALV .
    Now , data will be fetched from the DB for first two coloumns and where the difference of FROMDATE AND TODATE will be greater or equal to 5 only those rows should have a active radio button which can be clicked .
    Other rows should have disabled radio button.
    Moreover , User can select only one radio button at a time .
    if it can be possible with SALV , suggest me that option as well.
    Thanks.

    Hello,
    find the steps to achieve your requirement with normal table UI element. I'm not sure whether the same will work for alv. I expect it to work
    1. Create one boolean attribute in the Table Context node to indicate whether the radio button should be enabled or not (Attribute name : say RB_ENABLED). Populate the value of this attribute based on your From_Date DIF TO_DATE >= 5.
    2. Create a string attribute in the table context node to indicate the value for the radio button (Attribute Name: say RB_VALUE)
    Populate the Value of this attribute like for first record say FIRST and second record say SECOND. Or if you have unique Id for each row then you populate the same here.
    This attribute is required to identiy which radio button is selected by the user
    3. Create a context node (say RB_SELECTED) of cardinality 1..1 and an attribute of type string (say RB_SELECTED)
    4. In the table ui element, create a Radio button column and bind the following
    enabled property to RB_ENABLED attribute
    KeyToSElect to RB_VALUE attribute
    SElectedKEy to RB_SELECTED.
    So at runtime whenever the user selects a radio button, the correpsonding value will be set in the RB_SELECTED attribute. example if the user selects the radio button in the first row, the value 'FIRST' will be populated in the RB_SELECTED attribute.
    BR, Saravanan

  • Calling a method in a bean when i clcked on the radio button of a table

    Hi,
    I need to call a method in the bean when i clicked on the radio button of a table
    I tried it , by callling the method in selectionListener..
    I can able to execute only System.out.prinln method,
    rather than that i am unable to execute any other expression..
    like setting rendering property to a component.
    Thanks in advance,

    Hi,
    what you say is not true. You can execute any code within a selection listener you want. If you can print then it shows the method s called and you can execute whatever you want within this method
    Frank

  • Radio button in a Table -Only one row/radio button selection to be possible

    Hi experts,
    I have a requirement from customer to have a radio button inside a table of a WebDynpro ABAP application. For example, a table containing list of mobile numbers.
    The columns has
    Mobile Model, Cost, Company name, and a radio button named choice.
    Only one record and hence one radio button can be chosen at a given time.
    When the user clicks on the radio button choice corresponding to the row of the mobile of his choice, the row should get lead selected .
    When the user chooses a different choice radio button (corresponding to another mobile) the old radio button choice should get deselected, new row and its radio button should be lead selected.
    Can you give me the code how to deselect the remaining radio buttons when a user selects on one Radio button

    Hi Sandeep ,
    Have a look at the events of table UI element and its paramaters , Here's the link.
    [Link|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/content.htm]
    The event 'Onselect' or 'OnLeadSelect' provides 4 standard paramaters , out of which , OLD_LEAD_SELECTION/OLD_ROW_ELEMENT is one of them.
    So you could use this element and set the attribute value (Which is bound to the radio button) to abap_false.
    Although I am not sure as to which event ight trigger ( ON_LEAD_SELECT / ON_SELECT ).:)
    Thanks,
    Aditya.

  • How to eliminate  select message  after Radio button in ADF tables

    how to eliminate select message after Radio button in ADF tables
    example <f:facet name="selection">
    <af:tableSelectOne>
    </af:tableSelectOne>
    </f:facet>
    output:
    radobutton select
    radiobutton select
    please help me regarding this issue.

    Hi,
    this usually has a text String in the header saying "Select and .." which can be changed through the property inspector for the TableSelectOne component
    Frank

  • How to deselect the Radio button from htmlb.table.TableView

    Hi Experts,
    Could you please help me, how to seselect the Radio button from htmlb.table.TableView?
    <hbj:tableView
                                       id="tbvCustomer"
                                       model="mcBean.csModel"
                                       design="ALTERNATING"
                                       headerVisible="TRUE"
                                       footerVisible="TRUE"
                                       navigationMode="BYPAGE"
                                       selectionMode="SINGLESELECT"                               
                                       fillUpEmptyRows="FALSE"
                                       headerText="Searchresults"
                                       visibleRowCount="10"
                                       onNavigate="CustomerSearchNavigate"
                                       visibleFirstRow="<%=mcBean.getCsVisibleFirstRow() %>">
    Problem: After searching and selecting the Customer in the table, then again we are searching for another customer. After that the searched customer is displaying in the Table. By default the table Radio button is selected. Because for first Customer we have selected the Radio button. How we can deselect the FRadio button while searching for another Customer.
    Thanks In Advance.
    Regards,
    Vijay.

    I think it is <2095>.
    In SmartForms, go to your text window. 
    Use the icon on the top left of the text window to switch to the old editor.
    INSERT -> CHARACTERS -> SAP ICONS. 
    Do a FIND on "radio".  It's called ICON_WD_RADIO_BUTTON_EMPTY.

  • How can I select a radio button in a table regarding the data in the cells?

    Hi everyone
    This is the issue: I need to select the RadioButton which is in a table with data related to transfers in the cells next to it, so I need to select the correct radio regarding the data next to it.
    This is the whole process: First I go to the Add Recurring Transfer section and select the parameters of the transfer (Accounts, date, amount, months etc), then with VB code I capture those parameters from the page and store them into Global variables for further usage on my E-tester script.
    Right after that I need to select the radiobutton regarding the data of the transfer that I already created in order to delete it or modify it (Please see Attachment selectradio1.jpg)
    So How can I move along the table and compare each cell with the variables that I created with the transfer information, so when I finish comparing a row cell by cell and if all the comparison match well in that row, I could select the radiobutton of the row.
    Note: Second Attachment selectradio2.jpg shows the source code of the table...If you need more info please let me know
    Could you please help me with this problem?? I'm Kind of frustrated with this issue jejeje

    Here is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
    Private Sub RSWVBAPage_afterPlay()
    Dim tbl As HTMLTable
    Dim tblRow As HTMLTableRow
    Dim tblCell As HTMLTableCell
    Dim strValue As String
    Dim rButton As HTMLInputElement
    ' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
    strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
    ' Strip out the ; for inner text comparison
    strValue = Replace(strValue, ";", "")
    ' This will get the table but can be modifoed to be more specific
    Set tbl = RSWApp.om.FindElement(, "TABLE")
    ' This loops through all the rows in the table until a match to the strValue is found
    ' then clicks the radio button. Findelements allows you to specify a root element
    ' once the correct root row is found, FindElemets can get the correct radio button
    For Each tblRow In tbl.rows
      If tblRow.innerText = strValue Then
        Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
         rButton.click
       End If
    Next
    End Sub
    I also uploaded the script I created. You should be able to run it and see how it works.
    This should get you going.

  • Replacing SAP Object Selector with Radio Button in ALV table in WD ABAP

    Hi All,
    I have a view in Webdynpro ABAP which displays data in an ALV table view (using SALV_WD_TABLE component).
    By default we have the SAP Object Selector for selecting a particular row of the table. This has to be replaced with radio buttons.
    I mean instead of using the SAP Object Selector, I need radio buttons at the start of each row.
    What I have thought of is to make the SAP Object Selector Invisible and create another attribute for the radio button in the node which contains ALV output data.
    Can you please let me know how to remove the SAP Object Selector from ALV output table and also how to include a column with radio button in the ALV output table.
    Thanks and Regards,
    Sayan Ghosh

    Hi Lekha,
    I am working with HRASR00_PROCESS_EXECUTE WD component of MSS application. In order to generate the data, this in turn calls another component called DATAOBJECTPROVIDER. I need to make the table selection as none and replace the SAP Object Selector with the radio button.
    Do you know under which method in DATAOBJECTPROVIDER do we need make the changes. I tried to search all the methods but couldnt understand a suitable one.
    Thanks and Regards,
    Sayan Ghosh

  • Create Radio button dynamically in Table column.

    HI All
       I have used following code to create radio button dynamically. but it's getting dump saying that Could not find attribute STATUS. 
    Here STATUS is the attribute of the node in View context. But why this dump is coming. 
    Please correct me if any thing worng.
      DATA: lr_radio TYPE REF TO cl_wd_radiobutton.
      DATA: lr_containr TYPE REF TO cl_wd_transparent_container.
      DATA: lr_data TYPE REF TO cl_wd_flow_data.
      IF first_time = abap_true.
        lr_containr ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_radio = cl_wd_radiobutton=>new_radiobutton(
        view = view
        id = 'RADIO'
        text = 'Enroll'
        bind_selected_key = 'STATUS'
        key_to_select = 'STATUS' ).
        lr_data = cl_wd_flow_data=>new_flow_data( element = lr_radio ).
        lr_radio->set_layout_data( lr_data ).
        lr_containr->add_child( lr_radio ).
      ENDIF.
    Thank you very much
    Ram

    Hi Rama,
    I solved it.check this code.
    i think u did mistake in creating radio button you are not passing the 
    BIND_KEY_TO_SELECT
      instead you are passing KEY_TO_SELECT.
    data:lr_column2 type ref to cl_wd_table_column,
         lr_radio type ref to cl_wd_radiobutton.
       lr_column2 = obj_table->get_column(
                   id         = 'TABLE1_PLANETYPE'
    *              INDEX      = INDEX
    lr_radio = cl_wd_radiobutton=>new_radiobutton(
    *      BIND_ENABLED        = BIND_ENABLED
           BIND_KEY_TO_SELECT  = 'STATUS'
    *      BIND_KEY_VISIBLE    = BIND_KEY_VISIBLE
    *      BIND_READ_ONLY      = BIND_READ_ONLY
           bind_selected_key   = 'STATUS'
    *      BIND_STATE          = BIND_STATE
    *      BIND_TEXT           = BIND_TEXT
    *      BIND_TEXT_DIRECTION = BIND_TEXT_DIRECTION
    *      BIND_TOOLTIP        = BIND_TOOLTIP
    *      BIND_VISIBLE        = BIND_VISIBLE
    *      ENABLED             = ABAP_TRUE
    *      EXPLANATION         = EXPLANATION
           ID                  = 'RAD1'
    *      KEY_TO_SELECT       = KEY_TO_SELECT
    *      KEY_VISIBLE         = KEY_VISIBLE
    *      ON_SELECT           = ON_SELECT
    *      READ_ONLY           = READ_ONLY
    *      STATE               = E_STATE-NORMAL
           TEXT                = 'Test'
    *      TEXT_DIRECTION      = E_TEXT_DIRECTION-INHERIT
    *      TOOLTIP             = TOOLTIP
    *      VIEW                = VIEW
    *      VISIBLE             = E_VISIBLE-VISIBLE
    lr_column2->set_table_cell_editor( the_table_cell_editor = lr_radio  ).
    Thanks,
    Suman

  • Radio button in report table

    Hi,
    I have a table with two columns: NAME and PRIMARY
    Only one name should be the Primary name (PRIMARY='Y') all the others are secondary (PRIMARY='N').
    I have created an updateable report on that table and it's working fine... except the PRIMARY field returns as text boxes so there's nothing (on the surface) to stop a user trying to set two names with PRIMARY=Y.
    A nice way around this would be to have that field display as a radio button where only one row in the report can have it selected.
    Is that possible and, if so, can you give me a pointer in the right direction to make it work?
    Thanks,
    Joseph

    Thanks (again) Andy.
    That looks like it's exactly what I'm after... but reading through the thread I see you've said that it can't be used with the standard mutli-row updates/deletes that I have in my report.
    Since this is my first App (throwing myself in at the deep end to try and learn it) I'm nowhere near confident enough to replace the standard functionality with my own (yet). Think I'll stick this in the list of features to come in version 2 and revisit this thread as soon as I understand it ;)
    Thanks again (again).
    Joseph

  • Adding Radio Button in a Table

    Hi
    I need to create a table in which there has to be a column for radio button.
    The radio button will be used to set one row as default row (row corresponds to template in application) i.e i need to set 1 template as default.
    I feel that this cannot be done using SingleSelection of table since i also need to set initial value of radio from database (which will be the radio selected previously)
    Now how can this be implemented using RadioGroup.
    If it is possible in any other way please advice
    Thanks
    Husain

    You should be able ti use the SingleSelection feature. In your CO processRequest, identify the Row which need to be selected based on your business logic, and set the value of the Attribute mapped to Select Field to 'Y'.
    The Radio button select/unselect is controlled by the value of the mapped to Selection field('Y' - Select, N - unselect).
    Hope this helps.
    Srini

  • Default selection of radio buttons in  a table

    Hi
    I have a table which has 3 columns of radio buttons. I want to set one as the default selected one. The radio buttons selected kye property is linked to the sub node of model node. its cardinality is 1:1.I tried doing it through the supply functions, but it throws an error for the cardinality.
    I wrote the following piece of code in the wdModifyView(), but again the same error is displayed
    if (firstTime)
        int size = wdContext.nodeCmpNode_UserRights().size();
        IPrivateAssign_AuthenticationView.ICmpNode_UserRightsNode userright_node = wdContext.nodeCmpNode_UserRights();
         IPrivateAssign_AuthenticationView.INode_AuthorizationNode node = null;
         IPrivateAssign_AuthenticationView.INode_AuthorizationElement element = null;
        for(int i = 0;i<size;i++)
             node = userright_node.nodeNode_Authorization();
              element = node.createNode_AuthorizationElement();
         element.setAuthorization("Read");
         node.addElement(element);
    I changed the cardinality to 0..n, but in this case only the first row comes as enabled with default radio button marked. For 1..n all the rows are enabled but no radio buttons are marked default.
    Can someone please suggest in this regard.
    Thanks & regards,
    Anupreet

    Hello,
    Set the singleton property of the Sub Node (Value Node) to <b>false</b> and cardinality to 1:1.
    Under the Sub Node, create a value attribute "SetRadio" (datatype: String) and bind it to the <i><b>selectedKey
    </b></i> property of the radio button <i>column1</i>.
    Similarly, create a value attribute "DontSetRadio" (datatype: String) and bind it to the <i><b>selectedKey
    </b></i> property of the radio button <i>column2</i>.
    Then write the supply function to set the default selection for a specific column.
    A pointer code is shown below.
    public void supplyRadio(IPrivateTable_OVSCompView.IRadioNode node, 
    IPrivateTable_OVSCompView.IUserListElement parentElement)
        //@@begin supplyRadio(IWDNode,IWDNodeElement)
         IPrivateTable_OVSCompView.IRadioElement
                       radioElem = node.createRadioElement();
             * Set the default radio button column to be selected
            radioElem.setSetRadio(null);
             * Blank out other radio button columns
            radioElem.setDontSetRadio("gbhjd");
         parentElement.nodeRadio().addElement(radioElem);
        //@@end
    Bala

  • Putting radio buttons in a table

    I am creating an employment application form.
    The application contains a table for education information, and I want Yes and No radio buttons in each row of the table. I want Yes and No to be an exclusion group in each row, but not with the other rows.
    Can someone tell me how to do this?
    Thanks!
    Cindy

    I tried doing that - albeit by accident - but had trouble getting the buttons aligned properly in the table. I kept getting a subtable or subform in there, which wasn't what I wanted.
    Also, what do you mean by moving the objects around in the hierarchy? If I have a hierarchy in the form, it's nothing I did intentionally.
    I'm sorry - I need more information.

  • Composite clients:  include command button inside data table

    Directly placing the command button into the datatable does work. However, I'd like to move it outside to another file and then include it. What's the best approach, to use ui:include? Is there a better approach?
    I'd like to have datatable.xhmtl and deletebutton.xhtml
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    template="./beatlesTemplate.xhtml">
        <ui:define name="content">
            <h:dataTable value="#{beatles.list}"  var="beatle">
                <h:column>
                    <ui:include src="deleteButton.xhtml"/>
                </h:column>
                <h:column>
                     <h:commandButton id = "btnn" value="new row" actionListener="#{pc_Test.newRow}" />
                </h:column>
                <h:column>
                    <h:outputText value="#{beatle.title}"/>
                </h:column>
                <h:column>
                    <h:outputText value="#{beatle.comments}"/>
                </h:column>
            </h:dataTable>
        </ui:define>
    </ui:composition>
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    template="./beatlesTemplate.xhtml">
        <ui:define name="deleteButton">
            <h:commandButton id = "btnn" value="new row" actionListener="#{pc_Test.newRow}" />
        </ui:define>
    </ui:composition>

    RaymondDeCampo wrote:
    Your approach seems reasonable, did it work when you tried it?No, it didn't. Pardon, I don't have more information on that, but will come back to the topic later (probably on the mailing list, which I prefer.)

  • Radio buttons default data

    Hi,
    Anyone can help me on the below requirement
    I have 2 queries to develop a report in design studio, when I open the report 2 queries data will be loaded at a time.
    But when open the report the I want default data will be load.
    Regards
    RSR

    Look at setting up background processing How to set up Background Processing in Design Studio

Maybe you are looking for

  • Convert text file to table on Import

    We have a lot of tables, that we'd like to maintain outside of FrameMaker (we're using FM9).  I've been trying to figure out the best way to do it, and using the Import>File>Convert option seems like the best. However, my question is what is best pra

  • HP B8850 Page Size Error Printing from Aperture 2 (or iPhoto)

    I am trying to print on 13x19 (B+) size paper to an HP Photosmart Pro B8850 printer. I get this error when printing from Aperture --> "Page Size Error: Paper size selected in the print driver does not match the paper loaded in the printer IN tray." A

  • Issues with downloading a PDF Portfolio

    I have been trying to open a PDF portfolio from a website for work documents, and for a couple of days now I have not been able to get Adobe to work the way it should. When I open the document on the website it tells me "For the best experience, open

  • Error in ME6G

    Hi gurus, I am doing ME6G for vendor evaluation The system is performing the vendor evaluation in the background perfectly but in the job log it is showing the following message.I have maintained the calculation schema in the settings  and the system

  • CP-7925G keeps rebooting

    Hello everyone. We have a CP-7925G that has a problem of "infinite loop". When I turn it on, it keeps "resetting forever". Is there a procedure that can be done? Thanks in advance.