Single Selection Problem in table

Dear All,
I am getting problems with single selection in a table. Although I have set the selection model to single, if I select a row int the table and then depress Ctrl/Shift multiple rows are selected.
The code for set single selection is :
ListSelectionModel seleModel = myTable.getSelectionModel();
seleModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
Any idea about this? Is this a bug in JAVA?
Thanks!

Look through your code and see if you've declared your table twice. Your single selection may not being applied where you intended.

Similar Messages

  • Single select option in table view as radio button without design

    Hi,
    When I use the Content design = "Design2002" or design = "Design2003" then I get a checkbox in table view by giving the single select option. But when I do not use any design for the Content then I get a radio button in the table view.
    How do I get a radio button in the table view with Content Design = "Design2002" or design = "Design2003"?
    Message was edited by: Brian McKellar
    Assume you are asking about design=2002 versus 2003? Updated question.

    Hallo Sachin,
    Later this afternoon I will check your question with a colleague for an answer. We are all offsite today.
    Until then, it would be good if you review your questions Tableview radio button event..
    ++bcm

  • How to set the first row as selected in single selection of table

    when the page renders how do we make the first row as selected for single selection in a table.
    Thansk a lot for your help

    set the selection Attribute's value to 'Y' for the first row. Thats enough.
    eg;
    Row row=vo.first();
    row.setAttribute("SelectionAttribute", "Y");
    --Prasanna                                                                                                                                                                                                                                                                                                                                           

  • UIX Sample code for Single Selection Radio Button PPR??

    Does any one have a sample UIX code/page that does PPR for a single selection in a table?
    e.g On the top of teh page there is a table with a radio button single selection. Depending upon the selection in the main table the bottom page will render another table.
    Please email the sample code at [email protected]
    Thanks,
    Akshay

    Does any one have a sample UIX code/page that does PPR for a single selection in a table?
    e.g On the top of teh page there is a table with a radio button single selection. Depending upon the selection in the main table the bottom page will render another table.
    Please email the sample code at [email protected]
    Thanks,
    Akshay

  • Selection in the table

    Hi,
    Our senerio is as follows:
    We need to capture the single selection in the table.
    There are three options:
    1. No element in the Table(no selection).
    2. single selection(one row selected).
    3. multiple selection(more than one row selected).
    How can we code to differentiate all these??
    regards
    Anumit

    Hi,
    I guess you need some thing as follows
    WDTableSelectionMode mode ; //An attribute which is buund to the table selection mode property
           if( mode.equals(WDTableSelectionMode.MULTI))
                //Do respective
           else if( mode.equals(WDTableSelectionMode.SINGLE))
              //Do respective
           else
              //Do respective
    Regards
    Ayyapparaj

  • How to select a row in a single-select table view?

    Hello folks,
    I have a table view with a 'details' button. When a row is selected and 'details' is pressed, the table view disappears and a form view is displayed (like the toggle button in PCUI). I have implemented this using a navigation link. When I press 'cancel' in the form view, another navigation link takes the user back to the table view.
    My problem is, when the table view reappears, there is no row selected (the row that was selected previously, is de-selected). How do I make sure that the row remains selected?
    I tried using the collection_wrapper->mark() method in the inbound plug of the table view, but it works only for multi-select table.

    Hi Masood,
    Thanks for your reply.
    I had already tried using MARK ( iv_index = lv_index ), but it did not work because the first statement in the MARK method is
      check ME->MULTI_SELECT = ABAP_TRUE.
    Mine is a single-select table. So, using the MARK of the iterator object, with either the IV_BO or the IV_INDEX parameter also does not work. Is there any other way for a table with single row selection?
    Thanks!!!
    Rohan.

  • 2 single selection tables on the same page

    I used the following great article:
    http://blogs.sun.com/roller/page/winston?entry=single_selectable_row_table_component
    to create a singlerow select table. But I want 2 of these tables on the same page of my tabset component.
    On my page i have:
    private TableSelectPhaseListener tablePhaseListener = new TableSelectPhaseListener();
    public void setSelected(Object object) {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    if (rowKey != null) {
    tablePhaseListener.setSelected(rowKey, object);
    public Object getSelected(){
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener.getSelected(rowKey);
    public Object getSelectedValue() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return (rowKey != null) ? rowKey.getRowId() : null;
    public boolean getSelectedState() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener.isSelected(rowKey);
    but when I added the second table, I had to add the duplicate the above 4 methods, changing currentRow to currentRow2 and tablePhaseListener to tablePhaseListener2, and changing the method names. I also had to make these updates in 2 other places---on the JSP code, as well as in the JavaScript!! For just 2 tables this isn't too bad, but with more tables having to synchronize everything could get real ugly real fast. Am I doing something wrong?
    Also,
    It seems to work, however my IE browser is still reporting some minor Javascript errors that I don't get when I had only 1 single-row select table
    Thanks,
    -DM

    I also went the route of duplicating all methods for the single-selectable row in a table.
    I have at most on my pages two tables with selectable rows and I have not run into any javascript issues.
    I have had a problem when I rename my tables from "table1" etc. The row selection does not work as well when I give my table objects meaningful names. I have not had the time to dig in and discover why.

  • Single Selection tables

    Hi all!
    I created a new UIX screen (based on an existing one) with a table that has a single selection column (radio button). This table is displaying child datasource set information. My goal is to select one row and then send the key of the selected row to a new page which will display the details of it. The thing is that I cannot get the selected row from the table. When debugging the index variable is empty as if no row was selected. The funny thing is that a javascript validation passes with no problems but when I try to interact with the JHeadstart classes I get this error.
    What should I do to pass the selected table row to JHeadstart?
    Please let me know if you need more information
    Regards
    Maxi

    Maxi,
    You can generate this by creating a group with table-form layout.
    If other parts of the system cannot be generated again, you could first create a separate application structure file with this group, and generate the required pages and entries in the service xml. You can then integrate the pages ans service content with the existing app.
    This saves you time to figure it out yourself.
    Steven Davelaar,
    JHeadstart Team.

  • How to get selected record details when single selection is used in a table

    Hi All,
    Inside a query region I have created a table using region wizard,for this table I have added a singleSelection Item. What I want is , on selection of a particular record i want to update or view that record in a new page , for this I have added update and view icons in each row.
    But I am unable to get the particular selected record
    OATableBean tableBean = (OATableBean)webBean.findChildRecursive("ResultTableRN");
    OASingleSelectionBean singleSelection = (OASingleSelectionBean)tableBean.getTableSelection();
    For this singleSelection object I was unable to find any method which will give the value of the view attribute associated with it.
    Anybody any suggestions regarding it ?
    Thanks in advance,
    Anant NImbalkar.

    Hi Anant,
    here is how you have to do it
    1) you need to enable PPR on that Singl selection , by changining the Action type =fireAction.
    2) define the envent , EVENT
    3) define paramters for that event. This is place that gives you handle to the Attribute of VO.
    So you can define paremters such
    Name = PARAM1
    value =${oa.EqxContactPrivEOVO1.ContactPrivilegeId}
    You can define as many paramters as you can for the vo field that u wanted to have.
    Now in the procesformRequest() , all you do it handle the event EVENT and get the parameters
    if ("EVENT".equals(pageContext.getParameter(EVENT_PARAM)))
    String accountid= pageContext.getParameter("PARAM1");
    You can refer developer guide for further details.

  • How to have both Single and Mutilple Selection in a table?

    Hi ,
    I have a page with an advanced, there is a multiple selection for the table for deleting row. Now I want to have a single selection column for other purpose. But it does not seem that we can have both in a table.
    If I implement SingleSelection myself by using OAMessageRadioButton, from dev guide, I need to programmatically assign radio btton all the same
    name by calling setName() for each radio button and also assign an identifying value for each bean. I can radio for radio button, but how can I assign value for each radio button bean when they are in a table? Will it possible to use View Attribute of radio button bean property?
    thanks
    Lei

    Lei, its possible to have both in ur table! You can add a single selection child to your table. Then u can add messagecheckbox as last column of table, which can be attached to a transient VO attribute.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • GetSelectedRowKeys() returns more than one on Single Selection Tree Table

    Hi,
    I found that this issue occurring after PS3 (I think.)
    I have a tree table component, which allows single row selection. There is a listener on a column of the tree table as follows:
    public void listenPackageUnit(ValueChangeEvent valueChangeEvent)
    Object oldKey = getTreeComponent().getRowKey();
    try
    * Retrieve index of selected package unit
    * NOTE: Subtract 1 to remove no selection value. This only
    * needs to be done if attached LOV has No Selection option set.
    if (valueChangeEvent.getNewValue() != null)
    Row row = null;
    String selectedPackageUnit = null;
    int packageUnitIndex = (Integer) valueChangeEvent.getNewValue();
    packageUnitIndex--;
    * Due to the no selection item, we need to prevent search of regular
    * iterator if index is < 0. In this case we know the user selected
    * the no selection (blank) value.
    if (packageUnitIndex >= 0)
    * Using index, determine the value of the selected package unit
    DCIteratorBinding packageUnitsIterator =
    (DCIteratorBinding) PasUiADFUtil.resolveExpression("#{bindings.PackageUnitsIterator}");
    Row newRow =
    packageUnitsIterator.getRowAtRangeIndex(packageUnitIndex);
    selectedPackageUnit = (String) newRow.getAttribute("LookupCode");
    RowKeySet selection = this.getTreeComponent().getSelectedRowKeys();
    if (selection != null && selection.getSize() > 0)
    for (Object facesTreeRowKey: selection)
    this.getTreeComponent().setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding) this.getTreeComponent().getRowData();
    row = rowData.getRow();
    setSelectedLabel((String) row.getAttribute("Label"));
    setSelectedLabelType((String) row.getAttribute("LabelType"));
    row.setAttribute("PackageUnit", selectedPackageUnit);
    getTreeComponent().setRowKey(oldKey);
    finally
    getTreeComponent().setRowKey(oldKey);
    The issue is that getSelectedRowKeys() returns more than one when the user selects a child row in the tree table.
    It seems to be returning the total number counting from the top parent through the child.
    (For example, if the child is the second generation, it returns 2, and if the third generation, it returns 3.)
    This is causing the issue that the method tries to update the attribute of the parent row with a value for the child row. (And it fails, because the attribute is updateable only while new.)
    I remember getSelectedRowKeys() always returned one, the selected child itself, when I coded this around October, 2010.
    Is this a design change after PS3? Why does it return more than one though the tree table is for single selection?
    How can I get around this issue?
    It would be truly appreciated if we can get any quick help, since we are at final testing phase of our product.
    Thank you,
    Tomo

    Hi Vinod,
    I found the solution. Thank you very much for your suggestions. :)
    Now my listenSelection (custom listener of the tree table) looks like below:
    public void listenSelection(SelectionEvent selectionEvent)
    Row currentRow;
    PasUiADFUtil.invokeEL("#{bindings.TransactionLabelTopLevelVO1.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    Object oldKey = getTreeComponent().getRowKey();
    try
    if (this.getTreeComponent() != null)
    RowKeySet rks = this.getTreeComponent().getSelectedRowKeys();
    Iterator keys = rks.iterator();
    while (keys.hasNext())
    List key = (List) keys.next();
    this.getTreeComponent().setRowKey(key);
    JUCtrlHierNodeBinding node =
    (JUCtrlHierNodeBinding) this.getTreeComponent().getRowData();
    if (node != null)
    currentRow = node.getRow();
    if (currentRow != null)
    this.setSelectedRow(currentRow);
    setSelectedLabel((String) currentRow.getAttribute("Label"));
    setSelectedLabelType((String) currentRow.getAttribute("LabelType"));
    String shippedItemFlag =
    (String) currentRow.getAttribute("ShippedItemFlagValue");
    if (shippedItemFlag != null && shippedItemFlag.equals("1"))
    setDisableAdd(true);
    else
    setDisableAdd(false);
    finally
    getTreeComponent().setRowKey(oldKey);
    /* Refresh Action menu and buttons */
    RequestContext.getCurrentInstance().addPartialTarget(this.getActionMenu());
    RequestContext.getCurrentInstance().addPartialTarget(this.getToolbar());
    And my tree table is like below:
    <af:treeTable value="#{bindings.TransactionLabelTopLevelVO1.treeModel}"
    var="node" rowSelection="single" id="tt1"
    contentDelivery="immediate" fetchSize="25"
    emptyText="#{bindings.TransactionLabelTopLevelVO1.viewable ? commonFoundationMsgBundle.NO_DATA_TO_DISPLAY : commonFoundationMsgBundle.ACCESS_DENIED}"
    selectionListener="#{pageFlowScope.MaintainTransactionSerialAssociationBean.listenSelection}"
    binding="#{pageFlowScope.MaintainTransactionSerialAssociationBean.treeComponent}"
    summary="#{maintainAssociationUiBundle.CONTAINER_SERIAL_HIERARCHY}">
    <!-- Row Header -->
    The listener is now always getting the currently selected row only.
    Tomo

  • Toggling between single and multiple selection in a table

    I am working on ADF faces. I need to switch between single and multiple selection in <af:table based on a button I select.
    I cannot use switcher or rendered property inside <af:table. Only the first one is rendering the second one is not rendering based on the switch
    <f:facet name="selection">
    <af:tableSelectMany autoSubmit="true"
    rendered="#{treeBean.multipleRows}"/>
    </f:facet>
    <f:facet name="selection">
    <af:tableSelectOne autoSubmit="true"
    rendered="#{treeBean.singleRows}"/>
    </f:facet>
    When I use inside the switcher, it doesn't like the parent.
    Any ideas would be greatly appreciated.
    Thanks,
    Vijay.

    I have probably misunderstood what your issue is. I do not know what your version of ADF faces is. Here is some sample code working with my version. Please check if your jdev has "rowSelection" attribute. If it has, please try my sampe code
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    <jsp:directive.page contentType="text/html;charset=utf-8"/>
    <f:view>
    <af:document title="tableSelectMany Demo">
    <af:form>
    <af:panelGroup layout="vertical">
    <af:messages/>
    <af:selectOneChoice value="#{sessionScope.tableSelection}"
    autoSubmit="true"
    id="selType"
    label="Selection Type">
    <af:selectItem label="Single" value="#{null}"/>
    <af:selectItem label="Multiple" value="#{true}"/>
    </af:selectOneChoice>
    <af:table summary="Periodic table"
    binding="#{tableActions.table}"
    partialTriggers="selType"
    rowSelection="#{sessionScope.tableSelection ? 'multiple' : 'single'}"
    value="#{periodicTable.tableData}" var="row" rows="10">
    <af:column>
    <f:facet name="header">
    <af:outputText value="Name"/>
    </f:facet>
    <af:outputText value="#{row.name}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Symbol"/>
    </f:facet>
    <af:outputText value="#{row.symbol}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Action Column"/>
    </f:facet>
    <af:commandButton immediate="true" text="Action"
    action="#{row.action}"/>
    </af:column>
    </af:table>
    </af:panelGroup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    Hi Arun ,
    Can you explain little bit more ??
    what is account doc no? 
    what are the transactions should be displayed in your output??
    -Rajesh N

  • Select from nested table in a nested table security problem

    please help
    running Oracle 9.2.0.3.0 on RH AS 2.1
    I can select the inner most nested table as the creator, but can't use the same select statement as USER2.
    ORA-00942: table or view does not exist
    -- begin make of objects and tables
    create or replace type mydata_t as object ( x float, y float);
    create or replace type mydata_tab_t as table of mydata_t;
    create or replace type mid_t as object (
         graphname varchar2(12),
         datapoints mydata_tab_t );
    create or replace type mid_tab_t as table of mid_t;
    create or replace type top_t as object (
         someinfo int,
         more_mid     mid_tab_t );
    create table xyz (
         xyzPK int,
         mainstuff     top_t )
         nested table mainstuff.more_mid store as mid_nt_tab
              (nested table datapoints store as mydata_nt_tab)
    -- grants
    grant all on mydata_t to user2;
    grant all on mydata_tab_t to user2;
    grant all on mid_t to user2;
    grant all on mid_tab_t to user2;
    grant all on top_t to user2;
    grant all on xyz to user2;
    -- insert
    insert into xyz values (1, top_t(22,mid_tab_t(mid_t('line1',mydata_tab_t(
    mydata_t(0,0),
    mydata_t(15,15),
    mydata_t(30,30))))));
    commit;
    -- select fails as user2
    select * from table(select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1') Z;
    -- select works as user2, but i need individual lines
    select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1';

    Thank you for your reply.
    I have tried
    select value(t) from table t;
    but it is still not working. I got almost the same answer as before.
    Anyway thank you very much again.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MARCELO OCHOA ([email protected]):
    Originally posted by meimei wu ([email protected]):
    [b]I created a nested object-relational table using REF type in oracle8i. when I tried to select * from the table, I got lots of number as the ref type values, but actually, the value in ref type should be of type varchar2 and number. The number I got looked like following code:
    JARTICLE_REF_TYPE(000022020876108427C2FE0D00E0340800208FD71F76103B99B12009C0E0340800208FD71F,
    Does anyone know how I can get the actual value that I inserted into the nested table?
    your help is appreciated.<HR></BLOCKQUOTE>
    Try this:
    select value(t) from table t;
    Best regards, Marcelo.
    null

  • CREATE TABLE AS SELECT PROBLEM

    Dear members,
    I created a table whose definition is a select query.
    for ex: I created a table xx_customer as :
    create table xx_customer as
    select customer_name,customer_number
    from xx_ar_customer
    where org_id = '87'when i run the query
    select  count(*)
    from xx_customer;The count was 120 records.
    This was done as part of performance tunning.
    Now few days after the table xx_customer was created few records were inserted into table xx_ar_customer for org_id = '87' .
    So ideally the count should be more than 120 but its not.
    when i run the same query again
    select  count(*)
    from xx_customer;I get count as 120 Records which is wrong.
    It looks like it not refreshing data. If i run the table definition query i am getting count as more than 120 but if i do a select on the table count is still 120.
    Any ideas?
    Thanks
    Sandeep

    Hi,
    795291 wrote:
    I cant create view. I tried that before. If i use view then my query runs for a very long time and if i create a table then the run time is reduced by half :)
    So if we create Table as a select statement, then will it give data at the point of time it was created? Exactly!
    Will it not give latest data?Not unless the latest data happens to be the same as the data at the time it was created.
    CREATE TABLE AS is kind of like putting a photograph of yourself on your web site. If you smile, that doesn't mean the picture smiles.
    CREATE VIEW is kind of like hanging a video camea from your hat, and streaming the output to your web page. As soon as you smile, the picture smiles. It's more expensive than a still picture.
    A compromise apprioach is a Materialized View , which is really a type of table. Like any other table, it occupies space, and is relatively fast to use. You can define a materialized view to be refreshed at regular intervals (once a day, once an hour, once a week, ...) or whenever there is a change in the base table(s).

Maybe you are looking for

  • "Browse", "open", and "save as" often broken.

    Often when I'm in an application and I choose to browse for a file, no finder window comes up. This also happens sometimes when attempting to "save as". This behaviour persists until I quit or force quit the program. I can save already open documents

  • [SOLVED] check pacman source sign failed on sh4 CPU

    I've build 'base' packages on sh4 CPU. (Some base library still use the original linux distributions. eg. gcc,glibc,...) I followed Pacman-key to setup key rings. pacman-key --init pacman-key --populate archlinux pacman-key --refresh-keys I run previ

  • MacBook Pro USB Hotspot

    Good Afternoon, for first i'm sorry for my bad english and my grammatilac error, I'm Italian! I've one question, with my MacBook Pro, connected by WiFi connection, is possible to share my network to my iPhone 5, using USB cable? I've no possibility t

  • I have had to re-install my operating system and have lost all of my library. How can I download it from Itunes?

    I have had to re-install my operating system and have lost my itunes library. How can I get it back from the itunes server? There is no contact us available. The link they say is in purchases does not exist!!

  • Add emailadress to PO in ABAP.

    Hi, If I update vendor address through PO (ME22N), it will update table ADR6 (and all the other ADR* talbes) and add a new address number to the data in EKKO. so the connection changes from EKKO-LiFNR --> LFA1-LIFNR/ADRNR --> ADR6-ADRESSNUMBER  to EK