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

Similar Messages

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

  • SharePoint Online default selection on Radio Button not displaying

    I am building a form in InfoPath and setting a default value on a choice field.  In the InfoPath preview, the default value selection is present and visible but when I publish the form and go to the actual list, the default selections are not visible.
    The properties of the button have the "This button is selected by default" option active.
    Thoughts?
    I am using the same browser for both, IE9.

    Hi,
    According to your description, I have done a test and I can't reproduced your issue.
    When I make "This button is selected by default" option active. the default value selection is present and visible in the actual list.
    Whether the issue exists in other list, I suggest done a test to compare the results.
    Whether the issue exists in other browser, done a test in chrome ,hotfix, IE10... compare the results.
    Besides, if I misunderstanding your issue, Please offer a screenshot about your issue, I will better help you.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Change default selection of radio buttom

    Hi Experts,i want to enhance standard component in webdynpro.in that i want to change default selection of radio button in 1 view.please help out..
    Thanks & Regards
    Prasad

    Hi durga prasad,
    Radio Button Group By Key will get the values from domain of the data element used in attribute which is binded to Radio Button Group By Key property 'selectedKey' .
    That is why we don't have any code in wd_do_init method.
    So you need to go to the domain and check the domain value of the data element used, and then set the default value of your interest in existing standard program using WDDOINIT---> Post Exit method as said by Naveen and Abhijeet.
    You have to set the attribute binded to Radio Button Group By Key property 'selectedKey' with same domain value you want to set as default.
    The following link will help you to understand how 'Radio Button Group By Key' works.
    Radio Button Group By Key | Team ABAP
    Please reply if any doubt.
    cheers,
    vidyasagar

  • Default value of radio button on first row in table

    Hi,
    I have created a custom page which includes a table ("SuppliersTable"), the table has a singleSelection table component (radio button) linked to a transient attribute ("SelectFlag") in a VO ("ApSuppliersVO"). The table is populated from a Query region.
    I would like to 'select' the radio button on the first row of the table by default when a query is executed (when a user clicks "Go"), I have tried the following but its not setting the value:
    In CO:
            if (pageContext.getParameter(go) != null) {
                System.out.println("The GO button was pressed");
                am.invokeMethod("handleFirstRows");
            }In AMImpl:
        public void handleFirstRows() {
            System.out.println("1");
            OAViewObject suppliersVO =
                (OAViewObject)findViewObject("ApSuppliersVO");
            if (suppliersVO != null) {
                System.out.println("2");
                int rowcnt = suppliersVO.getRowCount();
                System.out.println("RowCount:" + rowcnt);
                if (suppliersVO.getFetchedRowCount() != 0) {
                    System.out.println("3");
                    //OARow supplierRow = (OARow)suppliersVO.first();
                    Row supplierRow1 = suppliersVO.first();
                    supplierRow1.setAttribute("SelectFlag", "Y");
        }Based on the debug messages I can see that it is calling the procedure, but either not setting the value, or not setting it in a way that renders it on the page and forces the event that goes with it.
    Am I missing something/doing it completely wrong? How can I best achieve this?
    JDEV 10.1.3.3.0
    EBS 12.1.3
    Kind Regards
    Carl

    Hey hi Carl,
    Its pretty much correct , well , can you try the below code .
    OAViewObject localOAViewObject1 = (OAViewObject)am.findViewObject("ProjectDatesVO");
    if(localOAViewObject1!=null) {
    Row DateVoROw = localOAViewObject1.first();
    RowSetIterator iterator = localOAViewObject1.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(localOAViewObject1.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    DateVoROw=iterator.getRowAtRangeIndex(1); // represents first row
    if(DateVoROw!=null)
    // set the value here .
    Kindly Let me know the update .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

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

  • 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

    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

  • File name should change by selecting the radio buttons

    Hi all,
    PARAMETERs: p_file LIKE rlgrap-filename.
    PARAMETERS: p_app RADIOBUTTON GROUP rg DEFAULT 'X',
                             p_pre RADIOBUTTON GROUP rg.
    this is to download the ITAB data to presentation and application servers depending upon the radio button selected.
    if i select p_pre , then default download path is : 'C:/ download.txt'.
    if i select P_app , default download path is : '\usr\sap\EBG\SYS\profile\DOWN.TXT'.
    how the file name should change by selecting the radio buttons ?
    Thanks
    KR

    Hi,
    DATA: c_x VALUE 'X'.
    selection-screen begin of block input with frame title text-000.
    parameters :desktop     radiobutton group rg_f user-command rg_f,
                       in_file type ibipparms-path modif id ps DEFAULT 'C:/ download.txt',
                menu     radiobutton group rg_f ,
                       sys_file type ibipparms-path modif id as default  '\usr\sap\EBG\SYS\profile\DOWN.TXT' .
    selection-screen end of block input.
    at selection-screen output.
      if desktop is initial and menu is initial.
        desktop = c_x.
      endif.
      perform f_toggle_finputs.
    form f_toggle_finputs.
    loop at screen.
        if screen-group1 = 'PS'.
          if desktop = c_x.
            screen-input    = 1.
    *         sys_file = c_server_path.
          else.
            screen-input    = 0.
          endif.
        endif.
        if screen-group1 = 'AS'.
          if menu = c_x.
            screen-input    = 1.
    *        clear: in_file.
          else.
            screen-input    = 0.
          endif.
        endif.
        modify screen.
      endloop.
    endform. "f_toggle_finputs
    Hope this helps u.
    Thanks.

  • Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Yes, one needs to use some custom JavaScript code to control the other fields' properties.
    Disabling (graying-out) Form Fields by Thom Parker

  • Dynamic Select List / Radio Buttons triggering conditional display of field

    Hi HTMLDB Team,
    I wanted to mimic this very nice and useful HTMLDB 'select list feature' at the HTMLDB "Create Application ... from Application Export file " ... option .
    ie when you hit the form that asks you to "install the application", i,e
    Builder - Application >Export Import>Export Repository>Install Application
    you have the the following radio Options :
    Install As Application
    X Reuse Application ID 401 From Export File
    X Auto Assign New Application ID
    X Change Application ID
    New Application
    The "New Application ID" field appears only when I select "Change Application ID" radio option. That great and that's exactly what I want.
    How do you do that ?
    I am currently using a select list instead of radio list. It's the same thing ... I
    I tried " many options of the "select list with redirect .... with submit .... but I was not successfful. All I am trying to achieve is to offer a list of departments ... but when the user select "other", I want to show a text field for the user to type in the "other Department" ... without losing what I had already entered in the form previously and without actually Submitting the form . I still have other fields to enter after the select list .
    Is that possible with pure HTMLDB ?
    Or do I have to craft up some Javascript .
    I'd prefer pure HTMLDB .. I do not want to use javascript, to avoin a maintenance nightmare once I submit the code to other developers ...
    Can you pls help ?
    Thanks a lot.

    Hello,
    Take a look at these built in javascript function
    they should give you what you want.
    http://htmldb.oracle.com/pls/otn/f?p=11933:39
    CarlCarl,
    if I understand it right, these functions are already built in Apex 2.2.1.
    I need to show an item with label when user selects certain radio button. This sounds like the opposite to f_Hide_On_Value_Item_Row function.
    Can this task be done with apex built-in javascript functionality at this moment?
    Thanks

  • ADF 10.1.3 -  Default value for radio button

    Hi
    How to set the default value for Radio button?
    I have Yes and No fixed values for a radio button, and couldn't find any option to set the default value.
    How can I set Yes as default value?
    Appreciate your help.

    FrameworkSpl,
    What are you using for the model layer? If you are using ADF Business Components, simply set the default value for the attribute upon which you are basing the radio buttons.
    John

  • How to set a default pre-select for radio buttons?

    Hi
    I have some text form fields that I've set up to display some paired variables stored in a .txt file.  When the swf loads, the form fields are populated with the text.
    I've also set it up so that if you change the text and hit a submit button, the .txt file gets updated.
    I'm now tryng to set it up so that I can store radio button selections in the .txt file too.
    I've started doing it a certain way, but am wondering if there is a more straightforward way of doing ?
    Here's what I've done...
    I've set up the butttons to spit out "on" or "off" depending on the selection, and apply that to the variable that gets stored.
    Now, in the same way I loaded the variables into the text form fields when the swf is refreshed, I want to load the on/off variable, and then somehow apply it to the radio buttons so that one of them is pre-selected.
    So my questions are a) how do I take that loaded variable, and use an if statement to make it pre-select the button, and b) is there a simpler way to pre-select a button based on an external variable?
    Thanks
    Shaun

    Nevermind guys - I did it using the 'rb_on.selected' command on the "on" radio button if the .txt file variable was "on", else the "off" radio button is selected.
    Thanks for taking a look though!
    Shaun

Maybe you are looking for