How to select one row in a table with radio button

Hi all.
I have a VO where there is an attribute (isDefault [String]) that identifies the default record in the view. The possible values are 'Y' for yes and 'N' for no. Obviously only one record can have the 'Y' value.
In my page I have created an ADF Table (with the usual data control drag & drop). I would to transform the default inputText of "isDefault" field with a selectOneRadio component in order to permit the user to select (and save contextually in the DB) the default row of this table.
Can you explain me how? I'm using JDeveloper 11.1.1.4.
Thanks in advance.
Baduel

Baduel wrote:
Cvele,
thanks for your responses. Yes, it's easier to use af:selectBooleanCheckbox but I need that the selection is mutually exclusive (only one row can be selected). >If this is possible also with the boolean checkbox please tell me how.- Let's try with CheckBox :
1. At the ViewObjectImpl level (for example, YourViewObjectImpl), add the following code:
  private oracle.jbo.Key currSelectedRowKey = null;
  public void doRowSelection(Key newKey) {
      // de-select old one
      if (currSelectedRowKey != null) {
          Row[] rows = findByKey(currSelectedRowKey,  1);
          if (rows != null && rows.length > 0)
               rows[0].setStatusAsBoolean(Boolean.FALSE); // cast to the appropriate row Impl class if need !
     // remember a new selected row key:
    currSelectedRowKey = newKey;
  }In the ViewRowImpl, in the transient attr settter, do as follows:
  public void setStatusAsBoolean(Boolean value) {
     setStatus(value.booleanValue() ? ONE : ZERO);
     if (value.booleanValue()) {
         YourViewObjectImpl vo = (YourViewObjectImpl)getViewObject();
         vo.doRowSelection(getKey());
   }   P.S. The above was not tested at all, but should give you an idea

Similar Messages

  • How to compare two rows from two table with different data

    how to compare two rows from two table with different data
    e.g.
    Table 1
    ID   DESC
    1     aaa
    2     bbb
    3     ccc
    Table 2
    ID   DESC
    1     aaa
    2     xxx
    3     ccc
    Result
    2

    Create
    table tab1(ID
    int ,DE char(10))
    Create
    table tab2(ID
    int ,DE char(10))
    Insert
    into tab1 Values
    (1,'aaa')
    Insert
    into tab1  Values
    (2,'bbb')
    Insert
    into tab1 Values(3,'ccc')
    Insert
    into tab1 Values(4,'dfe')
    Insert
    into tab2 Values
    (1,'aaa')
    Insert
    into tab2  Values
    (2,'xx')
    Insert
    into tab2 Values(3,'ccc')
    Insert
    into tab2 Values(6,'wdr')
    SELECT 
    tab1.ID,tab2.ID
    As T2 from tab1
    FULL
    join tab2 on tab1.ID
    = tab2.ID  
    WHERE
    BINARY_CHECKSUM(tab1.ID,tab1.DE)
    <> BINARY_CHECKSUM(tab2.ID,tab2.DE)
    OR tab1.ID
    IS NULL
    OR 
    tab2.ID IS
    NULL
    ID column considered as a primary Key
    Apart from different record,Above query populate missing record in both tables.
    Result Set
    ID ID 
    2  2
    4 NULL
    NULL 6
    ganeshk

  • How do I move a table with radio buttons to another page?

    I created a document in Word, converted to PDF, added a page (which was created in Adobe Forms Central, only way to get a table with radio buttons - see below for example).
    The issue I have is whilst using the Trial of Adobe XI Pro I was able to move this table up a page and place it under the header.  Now that the trial has run out I cannot complete this task with other documents.
    I started to edit using LiveCycle but it won't let me move the table.
    We have Acrobat X Pro but when I go to edit, it directs me to edit in LiveCycle.  I have tried moving the table using all of these programs.  Can anyone help/guide please? 

    Thank you for your reply.  I am new to editing a pdf and using these programs. I have subscribed to Acrobat XI Pro.  When I try to edit the document it directs me to LiveCycle.  I cannot move the table in LiveCycle.  It won't let me, and I cannot make changes in XI Pro as I did in the trial as it directs me to edit in LiveCycle.  Am going in circles.

  • Dynamic table with radio buttons

    I need to load a dynamic table with radio buttons that allow
    the user to select an item in the table. I need to have it add a
    radio button with a unique identifier for each table item.
    For example: the table will load all of the seminars
    locations available in a certain state, the radio button will allow
    the user to select the city in which they would like to attend and
    that value will get passed to the registration page. The value of
    each radio button would be equal to the location_id in the database
    for each of the locations in the table (The table includes the
    date, day, venue, address, hotel info, etc. details for each city.)
    When I add dynamic radio buttons and set the value to the
    location_id in the database, it allows the user to select multiple
    radio buttons. I cannot find any information on how to
    resolve.....??
    Any help is appreciated.

    beanieboo wrote:
    > I need to load a dynamic table with radio buttons that
    allow the user to select
    > an item in the table. I need to have it add a radio
    button with a unique
    > identifier for each table item.
    >
    > For example: the table will load all of the seminars
    locations available in a
    > certain state, the radio button will allow the user to
    select the city in which
    > they would like to attend and that value will get passed
    to the registration
    > page. The value of each radio button would be equal to
    the location_id in the
    > database for each of the locations in the table (The
    table includes the date,
    > day, venue, address, hotel info, etc. details for each
    city.)
    >
    > When I add dynamic radio buttons and set the value to
    the location_id in the
    > database, it allows the user to select multiple radio
    buttons. I cannot find
    > any information on how to resolve.....??
    > Any help is appreciated.
    Give each radio button the same name
    <input type="radio" name=theLocation" value="<?php
    $recordset['location_id'] ?>">
    Mick

  • ADF 11g Row Selection in a Table with radio button

    Hi there,
    I need to select one row with a radio button and then take some action on those rows via command buttons.
    I need to use a Radio Button and not the table property rowSelection provided with the latest features of ADF 11g.
    In ADF 10g you can use tableSelectOne component that missing in 11g. How you can implement that with ADF 11g?
    Regards, Alex

    Well, ADF 11g doesn't have that capability, so you have to build it yourself. If don't want to build it yourself, you could use the Trinidad components instead of ADF 11g. If you don't want either of those options, then sorry :)
    John

  • How to get current row of Advanced table with no submit

    I have an advanced table with an 'Add another button'. When an empty row is created by clicking this button, LOV is used on the first column to populate other fields of the row. The rows of the table carry a button called "Add dependencies" whose functionality is to take the user to a different table to add rows to a different VO. This button is just a button and not a submitButton. I am passing the row's primary key as part of the URI as Vo attribute FdTaskId={@FdTaskId}
    The button works perfectly fine for database fetched rows (rows already present in the database), but, for the rows created using 'Add Another button', though LOV populates all fields including the primary key, the URI parameter passes null to the next page. That means, the VO attribute is not set. This works fine only when a 'submit' happens in the first page. For example, if I click Add another row again, then the previously inserted row passes the primary key fine as part of {@FdTaskId}.
    Could you please help me how I can resolve this issue?
    Thanks,
    Datta

    I am doing exactly that. My issues is that, VO attribute is passed correct for the table rows which are fetched from the database. For the table rows which got created through 'Add Another button', the VO attribute passed through URI as {@FdTaskId} is returning null. The VO attribute sets only when a form submit happens. For example, after adding a row through 'Add another row' button, click the same button again to add one more row and now go back to previously added row and now you can see that its VO attribute is set ({@FdTaskId} carries value )

  • Select discontiguous rows in a table with the keyboard

    I am using jdk 1.3.1 and have tried this on 1.4 as well. I don't seem to be able to select discontiguous rows in a table using the keyboard. I can Ctrl-click with the mouse to do this but can't find a way to do this with the keyboard. I searched and found somebody asked this same question before and the reply was it works in 1.3.1. I am not seeing this. What could I be missing? The Ctrl-Up and Ctrl-Down keys don't do anything and neither does the spacebar.

    I'm pretty sure you can't do this using the standard JTable interface.
    You might be able to write your own keyboard listener and fake focus events for up&down arrow, but making this work seamlessly with JTable seemss like it would not be trivial.

  • How to append new rows in a table with Javascript ?

    Hi ,
    I'd like to append new rows in a table dynamically using javascript?
    Do some of you have already done this before ?

    Rui's answer will create copies of the entire table.  There may be times where thsi is what you want, but you asked about creating new rows.  If your new row is a copy of one of your existing rows, then you could use
    _RowName.addInstance(1);
    (the underscore at the beginning invokes the instance manager).  Is this what you're looking for?

  • Only one row show in table with tablepopin

    Hi,
    I've a table with a tablecolum with a tablepopintogglecell, and a tablepopin.
    I want that only one row show (when i press the togglelink if there is other row open, automatically close that row)

    Hi,
    you should implement the on toggle event,
    you will have the importing context_element, so you know which one is triggered,
    form your node, get_elements().
    loop over the table where ne to context_element, clear the popin attribute,
    grtz,
    Koen

  • How do I set up an "interactive" table? radio buttons?

    Hi,
    I'm trying to create an "interactive" chart where each row has say 3 options, each of which is assigned a column value (so, first row here has a value of 1 and second row 2), which is then multiplied by the weighted value and put in the Total column.  Ultimately total column would be tallied at the bottom, as well.
    I'd like to have a way to select a cell (maybe by a radio button?) and adobe stick the total in.  Is this possible in adobe?  If so, how would I do it?
    Value 1
    Value 2
    Value 3
    Weight
    Total
    "Selected"
    1
    1
    "Selected"
    2
    4
    "Selected"
    3
    6
    "Selected"
    4
    12
    "Selected"
    1
    1
    "Selected"
    2
    2
    "Selected"
    1
    3
    "Selected"
    2
    4
    Thanks for any help!!
    Mel

    On a Mac, choose Apple menu > System Preferences, click iCloud, select Mail, then follow the onscreen instructions.
    After you set up your @icloud.com email address, you can use it to sign in to iCloud. You can also sign in using the Apple ID you used to create your iCloud account.

  • How to select one row from the datatable

    hi,
    I have a data table which displays the employee list .the table contains 4 columns which represents the employee code,address,status like that.
    when we click on particular row,the row must be selected and the total details of the employee will be displayed on the same page below the datatable.
    how to write the code for this.

    Hi
    Jsp Page
    <h:dataTable value="#{bean.list}" var="role" binding="#{bean.table}">
    binding- attribute need to include in dataTable tag
    Bean
    1> private UIData _table; as variable
    2>Getter and setter Methods
    public void setTable(UIData table) {
    _table = table;
    public UIData getTable() {
    return _table;
    3> Object objectName=(Object)_table.getRowData();; -- include the code in the method u wanna fetch the row data.
    It'll work

  • How to select every row in a table in case there is no user input ?

    My control block is : DUMMY_BLK . It has field : RPTNO.
    My base Block is : T_UNLDLD_BLK .
    In the property palette, the where clause is : ULD_RPTNO = :DUMMY_BLK.RPTNO
    When the user presses the search button , he gets results according to the report no keyed in . My when-button-pressed trigger contains the following code:
    go_block('T_UNLDLD_BLK');
    execute_query;
    If the RPTNO is null , I should get displayed all records from T_UNLDLD table .
    How can I do that , what do I need to add to the where clause please?
    Thanks.

    I think using same trick will work in this case also.
    Modify your where clause as:
    ULD_SHP_AGCODE LIKE NVL(:DUMMY_BLK.SA_NAME,'%') AND TRUNC(ULD_ETA) BETWEEN nvl(:DUMMY_BLK.ETA,'15-aug-1947') AND nvl(:DUMMY_BLK.ETA_TO,'15-aug-2050').
    Please note, i've taken from date as a value in the past and to date as value in future if they are NULL.
    I am sure, your ULD_ETA will fall between those two default dates.
    Hope it helps.
    Please mark answer as helpful / correct, if it helps you
    Navnit
    Edited by: Navnit Punj on 29-Jun-2009 04:10

  • How to select one row with such sql

    hi , everyone
    I got a headache about this sql:
    select * from E_VPN_pbxlink where ((SPILOTNUM ='1234' ) or (SPILOTNUM ='123')) order by SPILOTNUM desc ;
    it retruns 2 records.
    I need to get the record with SPILOTNUM ='1234' , how can I reform this sql
    tks

    Hi,
    I think I see:
    You want the longest spilotnum that starts with the same charachters as the parameter.
    You can do a Top-N Query like this:
    WITH  got_rnum     AS
         select  e.*
         ,     RANK () OVER (ORDER BY  LENGTH (spilotnum DESC)     AS rnum
         from      E_VPN_pbxlink
         where      '123456'     LIKE SPILOTNUM || '%'
    SELECT     *     -- or list all columns except rnum
    FROM     got_rnum
    WHERE     rnum     = 1
    ;There is a slightly simplerr way, using the ROWNUM pseudo-column, but its only slightly easier, and it won't help if, say, you want to pass two or more targets such as '123456' in the same query.

  • How to select and field from an table with similar value

    Hi Gurus,
          I got an requirement where i need to capture some values from an table whose value start with "vmr*"
    could anyone tell me the syntax to be used with this?
    My table contains valies like "lrt", "vmr'" nut i need only  values starting with "vmr"*
    Ravi

    Hi,
    In where clause, you can write,
    where field  like 'vmr%'.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Deleting rows in a table with a button

    Good Day All;
    I seemed to have run into a snag with trying to add a delete button in a table that will delete a row. Let me expain.
    The form has 1 table that has 7 cells made up of text fields and drop downs. This table is in its own subform.
    There is a button to add rows as the user requires. The code I am using to add rows: psl_list_subform.instanceManager.addInstance(1);
    I have been asked to add a delete button so a user can delete rows. I have added this to the end of the table. SO each time a row gets repeated, there is a delete button. The code I am “trying” to use is;
    Table4.Row1.instanceManager.removeInstance(this.parent.index);
    When I click on the button to delete, nothing happens. I brought up the JavaScript debugger, there are no errors.
    Any ideas what I missed.
    Thanks All
    Chomp

    Hi,
    from my understanding of your form, you adding new instances of the subform "psl_list_subform" which contains a single table row.
    The hierarchy that will look like "psl_list_subform.Table4.Row1.RemoveButton".
    To remove an instance of the subform, from a button within the table row the script needs to refer to the 3rd parent of the remove button.
    this.parent.parent.parent.instanceManager.removeInstance(this.parent.parent.parent.index);
    Explaination: this = RemoveButton, 1st parent = Row1, 2nd parent = Table4, 3rd parent = psl_list_subform

Maybe you are looking for

  • Automatic creation of InfoObjects

    Hi, In order to develop a test scenario, i have a need to create around 3000 InfoObjects following our naming conventions. So is there a way to do this automatically? for example like batch job? what is the normal procedure for the QA guys? waiting f

  • My 33.03 home page has a large flame instead of the normal logo, is this correct

    the correct logo will appear upon start up and then it quickly changes to a different logo quickly... the same original with a much larger flame ... i did make a snapshot of it... but i don't know how to paste it to this message.. I'm concerned that

  • Aperture3, Lion, and the cloud: Where did my Mobile Me Galleries go?

    How do I share my photo galleries from Mobile Me? Not photostream but specific galleries. I am using Aperture 3, OS 10.7.2 and Mobile Me. When I migrated to iCloud my galleries seem to have disappeared but Aperture is still uploading galleries to som

  • Mac OS 9 Client and Oracle 9i

    We have some Mac Clients with OS 9. They are actually connected via Oracle Products for Macintosh (SQL*Net 2.3) on an Oracle 8i Instance. Now we want to migrate to Oracle 9iR2. Can we use the same client configuration? Is there any newer client softw

  • AME Error - Name   lacks a supervisor, so AME cannot complete the chain

    Hi, If any one aware of this Issue, Please lets help & Guide me While i do the Run Test Case (2) in AME .Its giving a below error message. Error: <Name> lacks a supervisor, so AME cannot complete the chain of authority for the transaction Regards, se