line selected in the table in jdev11

I have listener custom selection for table to do things according to the selected line, but when the table has a single row of this line is automatically selected my interlocutor of choice is not triggered, so my question is how to accomplish that, initially, no row is selected in the table?

Depends on the use case, but you can do this by deleting the attribute selectedRowKeys of the table.

Pedja

Tags: Java

Similar Questions

  • How to validate at least one line selected on the table?

    Hello world

    I have a requirement here to display a list of customers at a table "select unique" and a button to send the page. When the user clicks this button, I need to validate if there is a selected line in the table. What is the best approach tho do?
    I tried to validate it on actionListener in the click of a button, but even if I put adfFaces messages running, it does not appear on the screen and the page is still subject.

    Is the BPM 11 g context of the project, so I have to do this validation and 'Cancel' the submit, otherwise the data passes through the flow until the next activity.

    Maybe the real question is: how to undo a page submit during an actionListener?

    Thank you

    Hello

    Small correction to Vinod, tableBinidng.getSeelctedRowKeys () always returns non-null (returns empty set when nothing is selected), then use the tableBinidng.getSeelctedRowKeys () .getSize () to check if a line is selected or not (0-nothing selected).

    If you do not want to treat the action up to save if an option is selected, why don't you try disable the button until something is selected in the table?

    To disable a button when no rows selected, simply add after the disabled property of a button value update it based on the table (add partialTriggers to the table)

    
    
    

    Jean Lou

  • Lines left in the table LT after removal of the direct workspace and the removal of all workspaces

    I had a lot of data in a table enabled version that has been modified in some workspaces.  The LIVE workspace, I deleted all the rows in the table and I then drove back the workspaces (yes I probably should have done differently).  Once workspaces have been cancelled table LT empty, I would have expected, but it wasn't.

    I can reproduce this in the example below.  I insert two lines in the test table and allow it to version.  In a workspace I update a row in the table, which leads to 3 ranks in LT as expected.  Live, I delete the two lines of the table that translates into 5 lines of LT which is fine.  So I restore and delete the workspace I created for the update.  At this point, nothing should versioned LT lines, so I expect to go, but two lines remain.  In my real-world scenario, it is initially questions as the table LT is now much more it must be and requests on the versioned table are slow.

    Is this expected behavior?  Can I do anything to clean?

    Thank you

    John

    scott@JOHNOT> select * from v$version;
    
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    PL/SQL Release 11.2.0.4.0 - Production
    CORE    11.2.0.4.0      Production
    TNS for 64-bit Windows: Version 11.2.0.4.0 - Production
    NLSRTL Version 11.2.0.4.0 - Production
    
    
    scott@JOHNOT> create table test_wm_table (
      2    id number primary key,
      3    name varchar2(20));
    
    
    Table created.
    
    
    scott@JOHNOT> execute dbms_wm.enableVersioning('test_wm_table');
    
    
    PL/SQL procedure successfully completed.
    
    
    scott@JOHNOT> insert into test_wm_table (id, name) values (1, 'first value');
    
    
    1 row created.
    
    
    scott@JOHNOT> insert into test_wm_table (id, name) values (2, 'second value');
    
    
    1 row created.
    
    
    scott@JOHNOT> commit;
    
    
    Commit complete.
    
    
    scott@JOHNOT> select * from test_wm_table_lt;
    
    
            ID NAME                    VERSION NEXTVER     DELSTATUS LTLOCK
    ---------- -------------------- ---------- ---------- ---------- ------------------------
             1 first value                   0 -1                 10 *-1,-9,-1*$#SCOTT$#
             2 second value                  0 -1                 10 *-1,-9,-1*$#SCOTT$#
    
    
    scott@JOHNOT> execute dbms_wm.createWorkspace('test_workspace');
    
    
    PL/SQL procedure successfully completed.
    
    
    scott@JOHNOT> execute dbms_wm.goToWorkspace('test_workspace');
    
    
    PL/SQL procedure successfully completed.
    
    
    scott@JOHNOT> update test_wm_table set name = 'something else' where id = 1;
    
    
    1 row updated.
    
    
    scott@JOHNOT> commit;
    
    
    Commit complete.
    
    
    scott@JOHNOT> select * from test_wm_table_lt;
    
    
            ID NAME                    VERSION NEXTVER     DELSTATUS LTLOCK
    ---------- -------------------- ---------- ---------- ---------- ------------------------
             1 first value                   0 ,45,               10 *-1,-9,-1*$#SCOTT$#
             2 second value                  0 -1                 10 *-1,-9,-1*$#SCOTT$#
             1 something else               45 -1                 11 *0,10,0*$#SCOTT$#
    
    
    scott@JOHNOT> execute dbms_wm.gotoworkspace('LIVE');
    
    
    PL/SQL procedure successfully completed.
    
    
    scott@JOHNOT> delete test_wm_table;
    
    
    2 rows deleted.
    
    
    scott@JOHNOT> commit;
    
    
    Commit complete.
    
    
    scott@JOHNOT> select * from test_wm_table order by id;
    
    
    no rows selected
    
    
    scott@JOHNOT> select * from test_wm_table_lt order by id;
    
    
            ID NAME                    VERSION NEXTVER     DELSTATUS LTLOCK
    ---------- -------------------- ---------- ---------- ---------- ------------------------
             1 first value                   0 ,44,45,            10 *-1,-9,-1*$#SCOTT$#
             1 something else               45 -1                 11 *0,10,0*$#SCOTT$#
             1 first value                  44 -1                -11 *-1,-9,0*$#SCOTT$#
             2 second value                 44 -1                -11 *-1,-9,0*$#SCOTT$#
             2 second value                  0 ,44,               10 *-1,-9,-1*$#SCOTT$#
    
    
    scott@JOHNOT> execute dbms_wm.rollbackWorkspace('test_workspace');
    
    
    PL/SQL procedure successfully completed.
    
    
    scott@JOHNOT> execute dbms_wm.removeWorkspace('test_workspace');
    
    
    PL/SQL procedure successfully completed.
    
    
    scott@JOHNOT> select * from test_wm_table order by id;
    
    
    no rows selected
    
    
    scott@JOHNOT> select * from test_wm_table_lt order by id;
    
    
            ID NAME                    VERSION NEXTVER     DELSTATUS LTLOCK
    ---------- -------------------- ---------- ---------- ---------- ------------------------
             1 first value                   0 -1                -11 *-1,-9,0*$#SCOTT$#
             2 second value                  0 -1                -11 *-1,-9,0*$#SCOTT$#
    
    
    

    Post edited by: John OToole

    OK, I see.

    Options (depending on the structure of your current workspace if it is not as simple as in the example) are rollback, purgetable or compressworkspace.

    More information on when and how to use them can be found in this thread: https://community.oracle.com/message/4027735#4027735

    Rollback works in your example, certainly, but might not be applicable in a real scenario.

    Hope that helps.

    Kind regards

    Andreas

  • Retrieve child line selected a tree table

    Hi all

    I have a tree table which includes two levels and one of the data in the column of the child node has a command link. Clicking on it calls a support bean method that tries to get the line that contains the command link that was clicked. The problem is, trying to get the line clicked (selected), it always returns the row parent of the node. I searched and followed by some examples of code, but it does not work for me.

    For example, if the table tree looks like, where X expands to show the children X 1 and X 2 lines:

    X

    L X 1

    L X 2

    Then clicking on the link to X 1 or X 2 will call code that returns the line for X.

    Here is the code in my grain of support:

       public void viewInspectionRecord(ActionEvent actionEvent) {
    
          RowKeySet rks = treeTable.getSelectedRowKeys(); 
          
          Iterator rksIterator = rks.iterator(); 
          
          if (rksIterator.hasNext()){ 
             List key = (List) rksIterator.next(); 
        
             JUCtrlHierBinding treeTableBinding = (JUCtrlHierBinding) ((CollectionModel) treeTable.getValue()).getWrappedData();     
             JUCtrlHierNodeBinding nodeBinding =  treeTableBinding.findNodeByKeyPath(key);     
             
             Row rowData = nodeBinding.getRow();
            
             if (rowData == null) {
                 FacesMessage facesMessage = new FacesMessage("Please select an Inspection Record record to view details");
                 FacesContext.getCurrentInstance().addMessage(null, facesMessage);
                 
                 return;
             }   
             
             Object irId = rowData.getAttribute("QarsInspectionRecordId");
             
             ...
      }
    

    rowData.getAttribute("QarsInspectionRecordId") eventually throw a NullPointerException because it is an attribute defined with the parent node and any children.

    Any ideas what's happening?

    Thank you

    Bill

    Hello

    see this hope, it will help you to get the line selected on your link, click

    http://oracleadf-Java.blogspot.in/2013/08/tree-table-component-with-declarative.html

    If you use treeTable selection listener then see.

    http://oracleadf-Java.blogspot.in/2012/11/tree-table-component-in-Oracle.html

  • Get the first line selected on the CommandButton Click

    Hi guys,.
    My version of jdev is 11.1.1.5.0. I have table on my Page of Adf.

    < af:table value = "#{bindings." MyvwVO1.collectionModel}.

    var = "row" rows = "#{bindings." MyvwVO1.rangeSize}.

    emptyText = "#{bindings." MyvwVO1.viewable? "{'No data to display.': 'Access Denied.'}".

    filterModel = "#{bindings." MyvwVO1.queryDescriptor}.

    queryListener = ' #{bindings. " MyvwVO1.processQuery}.

    filterVisible = "true" varStatus = 'vs' rowBandingInterval = '1 '.

    columnSelection = 'single '.

    Summary = "Table of suppliers.

    selectionListener = "#{bindings." MyvwVO1.collectionModel.makeCurrent}.

    rowSelection = "single" id = "t2".

    "partialTriggers =": soc1: ctb2: cb22.

    fetchSize = "#{bindings." MyvwVO1.rangeSize}.

    Binding = "#{MyBN.supplierTableBinding}" >

    < af:column id = "c14" frozen = "true" align = "center" >

    < af:commandButton action = "viewNext" text = "Next view" id = "cb1" >

    < af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.

    to = "#{bindings." SupplierSiteID.inputValue} "/ >"

    < af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.

    to = "#{MyBN.supplier_site_id}" / >

    < / af:commandButton >

    < / af:column >


    When I'm clicking viewNext button. When debugging, I get first line provider site Id instead of the current line selected.

    I also removed the selectedRowKeys of af: table. Now his show is not first line select default, but still get the Site Id of first line supplier back Bean.

    {} public void setSupplier_site_id (number supplier_site_id)

    This.supplier_site_id = supplier_site_id;

    }

    public {getSupplier_site_id() number

    Return supplier_site_id;

    }

    No idea what I'm doing wrong.


    Thank you

    Raul

    you pass line value.right... so from value as link will not be work.try send as #{row.abc.value} go on setactionListener and so on. You pass the rank value.

  • How to get the number of the row selected in the table

    Hello

    I did the data binding for the table using an arrayList. On some lines of a column, the button appears. When the button is clicked I want to know which line is clicked on the buttonm and want the index to use in the java file. Please help on how to do it.

    Hello

    On your table, you can have

    varStatus="rowStatus"
    

    and in the button, set the attribute as follows

    
     
       
     
    
    

    In your managed bean, you can access the index of the selected button

    public void myActionListener(ActionEvent e){
     System.out.println("index :" + e.getComponent().getAttributes().get("index"));
    }
    

    I hope this helps...!

  • Problem with headphone selection if the table has only one row

    Hi all

    I have developed a table in which I use selection listener to perform a task when a line is selected.
    It works fine when I have more than 1 row in the table, but when I did that one line in the table, the listener of selection do not call the corresponding method in the bean.
    I understand this selection event is raised only when the line is changed, but in the case of use when only one line is there, what do I do to make the listener of selection work?

    The selection listener I wrote the code to make the line selected as current line and perform the required task.

    Please suggest a way out of this situation.

    Thanks in advance.

    Hello

    try to remove this table attr

    selectedRowKeys="#{bindings.xxx_VO1.collectionModel.selectedRow}"
    
  • How can single checkbox can be selected in the table with Boolean checkboxes?

    I have a table editable ADF where an attribute is a Boolean checkbox... and stores the value with Y or N.

    Is there a way where the single checkbox must be selected at time of posting?

    For example, in the case its a table of responses to a choice unique to an application of Questionnaire, Question by adding new responses to the table..., the user inserts 3 rows (answers)... then the Boolean checkbox for only one of these 3 rows can be verified.

    Thank you
    DJ

    Since you have an attribute that has the "Y" or "n" for each line.
    When the user selects a line, you must deselect the other lines using the value change listener pro-grammatically.
    If the number of rows is large, it could be performance intensive.

    Thank you
    Nini

  • Publish all by accessing the data in the row selected in the table of the ADF...

    Hello

    I try to get the data of the selected line in the bean on the change of SelectOneChoice in a column of table of the ADF.

    There are two definitions of node in the iterator. When I try to access the data in the row. I see that the first definition of node data.
    How to access the definition data another node?

    I'm trying to access the "sponsorId" of the iterator. I use the code below. But his return null pointer exception.

    The code I use to access the data in the row:

    DCBindingContainer links =
    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCIteratorBinding = dcItteratorBindings
    bindings.findIteratorBinding ("sponsorIterator");
    ViewObject voTableData = dcItteratorBindings.getViewObject ();
    Line rowSelected = voTableData.getCurrentRow ();
    System.out.println (":" + rowSelected.getAttribute ("sponsorId")); I am able to see the data correctly for sponsorCodeDesc, sponsorPercentage, sponsorStatusDesc

    This is the iterator used for the table (page def):

    < Tree IterBinding = "sponsorIterator" id = "sponsor1" >
    < nodeDefinition DefName = "org.ieee.internal.ws.proxy.conf.types.ConferenceType.Sponsors.Sponsor"
    Name = "sponsor10" >
    < AttrNames >
    < item Value = "sponsorCodeDesc" / >
    < item Value = "sponsorPercentage" / >
    < item Value = lie "sponsorStatusDesc" = "sponsorStatusDesc" / >
    < / AttrNames >
    < accessors >
    < item Value = "sponsorDetails" / >
    < / accessors >
    < / nodeDefinition >
    < nodeDefinition DefName = "org.ieee.internal.ws.proxy.conf.types.SponsorType"
    Name = "sponsor11" >
    < AttrNames >
    < item Value = "sponsorId" / >
    < item Value = "sponsorName" / >
    < item Value = "isIEEE" / >
    < item Value = "isNonProfit" / >
    < item Value = "sponsorAcronym" / >
    < item Value = "sponsorDesc" / >
    < item Value = "sponsorEmail" / >
    < item Value = "sponsorComment" / >
    < item Value = "sponsorTypeId" / >
    < item Value = "sponsorTypeDesc" / >
    < item Value = "sponsorActive" / >
    < item Value = "societyNumber" / >
    < item Value = "businessUnit" / >
    < item Value = "createdBy" / >
    < item Value = "updatedBy" / >
    < / AttrNames >
    < / nodeDefinition >
    < / tree >

    you have not yet a selectionlistener linked to the table... to make the currentrow as the selectedRow...
    Can u please add the selectedRowKeys and the selectionlistener in the table as

    selectedRowKeys = "#{bindings.sponsor1.collectionModel.selectedRow} '"
    selectionListener = "#{bindings.sponsor1.collectionModel.makeCurrent} '"

  • No default line selected in af:table

    Hello

    I don't need no line selected default differance on the rendering of the original of an af:table with a unique selection enabled.
    The reason is that the af: table has an associated selection listener. If a line is selected by default, the user cannot select the line again to perform an action on this subject.
    I don't want to.

    Is there a way to make a table with no rows selected by default?

    having an affair at the table in the bean managed... with getter and Setter... and in the Get accessor, make it like

    RicheTableau tableBidding;

    public richeTableau getTableBinding() {}
    If (tableBinding! = null) {}
    tableBinding.getSelectedRowKeys () .clear ();
    }
    tableBinding return;
    }

  • Selection of the table and clicks by only clicking on the row in the table

    My dilemma is that we create an interface that is a touch screen interface. It's base table. Currently, I have a button integrated in each row of the table when you click the button, it takes you to a selected line details window. What I want to happen is to completely remove the button and have the line to act as a button - you click on the line (anywhere in the line) and the action takes you to the details screen - the same model as the use of smart phones. I have the table selection listener in support of bean (hanging on a generic selection listener that I created) and selection of listener method calls the string that starts the movement of workflow. I there prints that tell me that these methods are called, but I don't get any action when I click on the row in the table.

    This is the code in the .jsff file:

    + < af:table value = "#{bindings.drives.collectionModel}" var = "row" + "
    + Rows = "#{Bindings.drives.rangeSize}" +.
    + EmptyText = "#{Bindings.drives.Viewable?" "{'No data to display.': 'Access Denied.'}". +
    + fetchSize = "#{Bindings.drives.rangeSize}" +.
    + rowBandingInterval = "1" id = "t1" rowSelection = 'single ' +.
    + width = '100% ' contentDelivery = 'immediate ' +.
    + columnResizing = 'disabled' autoHeightRows = '30 ' +.
    + columnStretching = "column: c7 ' disableColumnReordering = 'true ' +.
    + selectionListener = "#{DriveBean.onSelectionChange}" +.
    + partialTriggers =': t1 "> +"

    The 'onSelectionChange' method looks like this:

    + ' public void onSelectionChange (SelectionEvent selectionEvent) {+
    + GenericTableSelectionHandler.makeCurrent (selectionEvent); +
    + goToDriveProperties(); +
    +}+

    + public String goToDriveProperties() {+
    + return "gotoProperties"; +
    +}+

    The GenericTableSelectionHandler class looks like this:

    + public class GenericTableSelectionHandler {+
    + public GenericTableSelectionHandler() {+
    + super(); +
    +}+

    public static void makeCurrent (SelectionEvent selectionEvent) + {+
    + Table richeTableau = (RichTable) selectionEvent.getSource (); +
    + TableModel CollectionModel = (CollectionModel) table.getValue (); +
    + JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData (); +
    + DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding (); +
    + Object selectedRowDate = table.getSelectedRowData (); +
    + JUCtrlHierNodeBinding nodeBinding = selectedRowDate (JUCtrlHierNodeBinding); +
    + Key rwKey = nodeBinding.getRowKey (); +
    + tableIteratorBinding.setCurrentRowWithKey (rwKey.toStringFormat (true)); +
    +}+
    +}+

    I don't know what to do with that to initiate this movement of workflow. Can someone help me?

    The method used for navigation is NOT the navigation to the required page.

    public String goToDriveProperties() {}
    Return "gotoProperties";
    }

    Instead, call the navigation pro-grammatically Manager as follows:

    * public String goToDriveProperties() {*}
    FacesContext context = FacesContext.getCurrentInstance ();
    context.getApplication () .getNavigationHandler () .handleNavigation (context,
    NULL,
    * 'gotoProperties'); *
    }

  • makes a line selected on the command link click

    Hi all
    I have a table and in his facet of stamp of retail, there is a command link. When the link is clicked without selecting the particular line, I want to do this particular line as selected. Is this possible? Basically what I want is, without the user selects the particular line by clicking on the order link I want to do as the rank of the selected line. Help is appreciated.


    Thanks in advance.
    N

    Hi n,

    This is because you set the rowKey and not the line itself. Normally it is the best approach, and then you have the search for bean for the line that contains the specified key. However, if the bean is really short lived (application), you can inject the line directly using the #{line} instead of #{row.rowKeyStr}.

    Kind regards

    ~ Simon

  • A special selection of the table of Boolean

    I use Labview to prepare to use with AB CompactLogix PLC HMI. The problem for me is that I cannot select a bit special (for example to connect with a button, TRUE/FALSE) in an array of Boolean. What I can do is get a particular tag data (integer type Double) plc using OPC and convert these data into array of Boolean. The table can be represented by a series of 32 buttons (I use a card of entry type 32 PLC input fields). But I want to access only the bit 4 of table boolean and toggle an LED based on its output. How to do this? Help, please!

    Leave the data type as a U32 and use the following code:

    1 must be of type U32.

    That should do it.

    Play with this idea, also explore GOLD and XOR actions on U32.

    Tone

  • New line disappears in the table

    I add the new line at my table:

    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
             DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("PrfItemImageTempVO1Iterator");
             RowSetIterator rsi = dciter.getRowSetIterator()
             Row newRow = rsi.createRow();
             newRow.setNewRowState(Row.STATUS_INITIALIZED);
             rsi.insertRowAtRangeIndex(0, newRow);
             rsi.setCurrentRow(newRow);
    
    

    then add information on the same line, but the line "disappears." However if I commit it is recorded in the database.

    In other words, for each line of the table I can download files. When I download fill the line with the name, the address, the ID of the article to which has been added and its action (insert, update, delete).

    The point is that the line is added but quanho that you enter this information disappears. Although in my impressions, print the correct information.

    If you commit information is also stored in the database.

    I try to update the table, run the query, partial trigger and nothing works.

    2780557 wrote:

    After I clicked on the button DOWNLOAD and add a file on my server and add line information.

    I guess some of these activities is the "walk away" (refresh the table in the database where your changes are not validated)

    As attilas79 suggested, why not try the standard buttons/operations instead of creating the new line by programming?

  • Possible to turn off the legacy of line break in the table of contents?

    Hello

    Say I got a long title stupidly, that I need to address (and subtitle is not an option in this case):

    Lorem ipsum dolor sit amet, adipiscing elit computer. Integer nec odio.

    Due to wide-ish the font size of the header in the document, I want to break this header in two lines.

    However my OCD uses a smaller font size, and so he could sit happily on a single line.

    The problem is that the inDesign TOC seems to be ineriting the soft breakdown and therefore the line break appears in the table of contents too.

    Is it possible to disable / prevent this?

    Thank you!

    Try to use nonbreaking spaces, or without breaks (spaces are less problematic) the part of the topic that you want to wrap instead of the line break is forced.

Maybe you are looking for