How to set selected all rows in h:dataTable

hello, I want to selected all rows in a dataTable.
I use JS to got it:
the selectBooleanCheckbox in the header of row:
<t:selectBooleanCheckbox id="aa" value="#{list.checkbox}" />the JS code :
<script type="text/javascript" language="JavaScript1.2">
    function selectAll(obj, first, size) {
        for (var i = 0; i < size; i++) {
            var current = eval(first - 1 + i);
            var objs = document.getElementById("form:listbody:listtable:" + current + ":aa");
            obj.checked ? objs.checked = true : objs.checked = false;
</script>and the "selectall" code:
<h:selectBooleanCheckbox id="selectAll"
                              onclick="javascript:selectAll(this,#{firstRow},#{displayedRowsCount})"/>It run good in IE,but not it does not work in firefox.
Are there some method to do?
Or is there a method to select all rows just use JSF?
Needs you help!

Yes, the paging for <h:dataTable> works pretty good, it manages the task through four methods created in the java code -- DataTable1_firstPageAction(), DataTable1_previousPageAction(), DataTable1_nextPageAction(), DataTable1_lastPageAction() -- without adding any javascript in the jsp page.
Maybe I could test if a java script similar to the <ui:table>'s one fit also the dataTable...
thanks

Similar Messages

  • How to set selected all checkboxes in all dataTable's rows?

    Hi there,
    I'm trying to perform this simple task: having a dataTable with a column containing checkboxes, how can I allow (with a button, a "super" checkbox or so) to simultaneously set selected all checkboxes in all rows?
    And - is it possible to do so without calling the submit of the page?
    Thanks to everyone!

    Yes, the paging for <h:dataTable> works pretty good, it manages the task through four methods created in the java code -- DataTable1_firstPageAction(), DataTable1_previousPageAction(), DataTable1_nextPageAction(), DataTable1_lastPageAction() -- without adding any javascript in the jsp page.
    Maybe I could test if a java script similar to the <ui:table>'s one fit also the dataTable...
    thanks

  • Selecting a row of h:datatable with java

    hello
    Is there any way to set selected row in java bean for h:datatable ?
    in other words.
    how can I select a row of h:datatable with java ?
    regards

    If you have an UICommand component in a row, there are two ways:
    Bind h:dataTable to an UIData property in backing bean and use UIData#getRowData().
    Or wrap data list in an DataModel instance and use DataModel#getRowData().
    Alternatively you could also use f:setPropertyActionListener, but that isn't that efficient inside a h:dataTable.
    If you actually want to select rows using radiobuttons or checkboxes, then check the examples in this article: [http://balusc.blogspot.com/2006/06/using-datatables.html].

  • HOW TO SELECT ALL ROWS IN A MULTI SELECT TABLE!!!!!

    Hello
    I have a table with tableSelectMany component. how can I set the page to initially select all rows when first opened?????

    efffffttttttt? are you saying you will do an electronic funds funds funds funds funds transfer transfer transfer transfer transfer transfer to anyone who answers?
    What version of JDeveloper are you using - that is quite important in order to be able to give you an answer.
    What also might be useful is "please" and "thank you" instead of SHOUTING IN ALL CAPS THAT YOUR QUESTION IS IMPORTANT. Realizing that you asked this question over a weekend when most people dont sit and read the forum...
    You have a habit of saying all your questions are URGENT!!!!!! which is generally considered, um...., impolite.

  • How to select all rows in table automatically after refreshing?

    Hi,All
    After refreshing the table,I want to select all rows,like MultipleButton's function.
    How can I do?
    Thanks
    Smile.

    Hi,-Grif-
    * Set the selected state for the given row groups
    * displayed in the table.  This functionality requires
    * the 'selectId' of the tableColumn to be set.
    * @param rowGroupId HTML element id of the tableRowGroup component
    * @param selected Flag indicating whether components should be selected
    function selectGroupRows(rowGroupId, selected) {
      var table = document.getElementById("form1:table1");
      table.selectGroupRows(rowGroupId, selected);
    }I don't know that the parameter selected is a boolean,or the checkbox(radio button) id?
    Thanks
    Smile

  • I am unabel to select all rows in advance table using Select All option

    Hi all ,
    I am unable to select all the rows in advance table . Select All option in advance table selects all rows present in working page but doesnt select the rows which we get by clicking next button ... i am having a requirement to select all the rows with a single click on select all , is it possible ..
    Plz help
    Thanking you all

    Hi,
    I'm using an adf table but i don't want to have the "Select All" and "Select None" options above the table. Does someone know how i have to remove those links?
    Or is there indeed a solution to override the methodes of those links?
    Message was edited by:
    Alexander

  • Select ALL rows in ALV by an ACTION

    Hi All -
    Is possible to have a button with an Action "select all" and when the user trigger that action all the records in the ALV are selected?
    i.e ALV has 10 records (lines or rows) and user click on a button with text "SELECT ALL" and once they click that button all the rows/lines are selected.
    Thanks!
    Jason P-V

    Hi ,
    yes it can be done....
    here is the procedure to do it.....
    first we need to make the context node "selection" property equals to "0..n"  you can find this property at your component controller level.....where you set your "cardinality" as well...
    than create a button in your view layout where the alv is being displayed and write the following code for button action:
    DATA lo_nd_alv_table TYPE REF TO if_wd_context_node.
    navigate from <CONTEXT> to <alv_table> via lead selection
       lo_nd_alv_table = wd_context->get_child_node( name = wd_this->wdctx_alv_table ).
    DATA counter TYPE i.
      counter =   lo_nd_alv_table->get_element_count( ).
      DO counter TIMES.
          lo_nd_alv_table->set_selected(
        EXPORTING
        index = sy-index ).
      ENDDO.
    I just tested this...and it worked for me....
    Thanks...
    AS...
    Just forgot to mention....if you want to de-select them all...you can use the method:
    lo_nd_alv_table->CLEAR_SELECTION(
    the above code can be put in in the btn action method.....say you have two btns one to select all rows and one to de-select all....
    this code can go under de-select all btn action method.....
    Edited by: J Are on Dec 11, 2009 8:53 PM

  • Select All rows  in WebDybpro Tables

    Hi All ,
    I am working on NWCE 7.1 . i have table in my UI. and want to give slect all rows functionality in table. in NWCE is there
    any way to give select all rows in table with out using , button and writing action to iterate node bound to table.
    also i want to know about RowCreator ui element for table.(when we right click on table we get insert -> rowcreator). How this works
    Thanks in advance
    Regards
    Kavita

    Hi Kavita,
    The row creator Ui element is not visible in table itself you can see it only in outline window.
    and in its on create event you have to write the code which i have provided above. it will not be visible in table at design time but at run time when you will click on the last rows lead selection it will call the associated event and one row will be added to the table.
    Regards
    Jeetendra

  • Select all rows in af:table

    Hi,
    I need to select all rows in af:table, not only on current page.
    I have following code on custom select all action:
    getTable2().getSelectionState().addAll()and on button that needs to perform some action on selected rows I have this code
            Set selectedRowSet = getTable2().getSelectionState().getKeySet();
            if (!selectedRowSet.isEmpty()) {
                Iterator it = selectedRowSet.iterator();
                while(it.hasNext()) {
                    Key key = (Key)it.next();
           }selectedRowSet.iterator() method throws java.lang.ClassCastException: oracle.jbo.Key.
    When I select rows with af:tableSelectMany, which is inside selection facet and selects only rows on current page, this works fine.
    Any ideas?
    Thanks

    Hi,
    you can only access those data that is queried and part of the CollectionModel to the time you select all
       RichTable _table = employeesBackingBean.getEmployeeTable1();
       RowKeySet rks = new RowKeySetImpl();
      CollectionModel model = (CollectionModel)_table.getValue();
      int rowCount = model.getRowCount();
          for (int i = 0; i < rowCount; i++) {
               model.setRowIndex(i);
               //note that in the simple POJO case, the row key is the same
               //as the index. However, it would be wrong to just rely on this
               //because other models or custom table models my return a more
               //comples key. Therefore we iterate over the available rows to
               //obtain the keys.
               Object key = model.getRowKey();
               //add the row keys to the RowKeySet to mark selected
               rks.add(key);
       _table.setSelectedRowKeys(rks);
       AdfFacesContext.getCurrentInstance().addPartialTarget(_table);Frank
    Frank

  • How to set to display  rows no. in source program

    how to set to display  rows no. in source program ?

    Hi,
    If u r working in 4.5B or older then u ll get it automatically.
    If u want to get numbering in 4.7 or ECC u just do this.
    Utilities -> settings -> ABAP editor
    Then u can select new editor or lod and u can find lot of options there.
    Regards,
    Subbu

  • How do you selected all text boxes in a document

    Say you have 100 pages in a document and you have a threaded text box placed on pages 1 through 100. How do you selected all the text boxes at the same time? You might do this to change the size of the boxes, or lock all of the boxes, or apply an object style to all of the boxes.

    Depending upon how well your document is set up though, layout adjustment might work.
    If changing text box size is on your agenda, and every text box is lying exactly on guides, then layout adjustment might work.
    The only way I can think of to lock all frames in a story, or to change the size of all text frames in a story, would be to write a Javascript. And, even after years of practice, I know that it'd still be faster for me to just step through the document and make the changes by hand than it would be to bang my head against Javascript for n hours before I found a good solution.
    Barring these exceptions, I think that Bob's statement
    You don't because you can't.
    is actually pretty accurate. Terse, maybe, but accurate.

  • Using 12.0.1.26 Im trying to move photo's from an app on the pad to laptop but the select all in Edit is not hilighted, how to you select all?

    the select all under edit is not highlighted in 12.0.1.26, I need to move a large number of photos from pad app sharing area to laptop, how do I select all? Thanks

    the select all under edit is not highlighted in 12.0.1.26, I need to move a large number of photos from pad app sharing area to laptop, how do I select all? Thanks

  • How do you select all paragraphs using the same style in Pages 5.2?

    I'm trying to find how to select all paragraphs using the same style in Pages 5.2 without any success.  I writing a book and I need to able to adjust all my paragraph styles globally.  I see how upgrade my paragraph style when I do something new, but not how to revert back to the orginal template.
    For example, in my custom template for my book I have 12 font for a review questions paragraph style.  I changed the font size for all this paragraph style to 18 font.  Now I want to change it back to size 12 font.  But I have this paragraph style at the top and bottom of my document.  How to I select all of my review questions style so I can make the font change to all at the same time? 
    I just upgrade to Pages 5.2 from Pages '09. 
    Thanks for the help,
    Rob

    The Pages User Guide might help here.
    Better to post your topic in the Pages designated community > Pages: iWork: Apple Support Communities

  • HT201301 How do I "Select All" in a Pages document? I would like to copy and past more than one paragraph at a time.

    How do I "Select All" in a Pages document. I would like to copy and paste more than one paragraph at a time.

    I just tab and hold untill the loop shows then let go and I get the menu with select all in it

  • How do I select all instances of a clip in the timeline at once without manually shift clicking each instance?

    Title says it all!
    How do I select all instances of a clip in the timeline at once without manually shift+clicking each instance?
    The reason I want to do this is because I have a music video with MANY quick cuts. So clips are cut up and splattered all over the place. I am colour-correcting now and so I want to be able to select one clip everywhere it exists in the timeline so I can drag the effect onto all them at once, without having to find each instance of the clip in the timeline. This "batch select" would make it so I don't miss any instances of the clip and also saves a ton of time going through the timeline and shift clicking each time the clip turns up.
    I hope PP is smart enough to do this
    Thanks in advance!
    -- Tim

    Pick one instance of the clip, maybe even the first bit ... and use the new Master Clip feature ... here's first a written explanation and then a video tutorial on doing this ... it's a great feature.
    Adobe Premiere Pro Help | Master Clip Effects
    How to apply effects to all instances of a clip | Adobe Premiere Pro CC tutorials
    Neil

Maybe you are looking for

  • Value Mapping Tables are not updated in RWB cache

    Hi Friends, I am doing value mapping replication from SAP. I am following /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication 1) I didnt changed ABAP proxy of ValueMappingReplicationOut in SAP system. is anything to... its already in Ac

  • Fast entry

    I would like to create a new variant for fast entry function via transaction code O7E6. New template will be used for Asset postings. But when I test the template; regardless of the account type I choose "Account" field is always regarded as GL accou

  • Not working Lighttable,smart Album etc after Version 1.5.6

    Editing after update is much faster, but now I try create Light Table - Selected pictures are allocated in Panel but I cannot move picture to top as usual. I cannot also move picture to New Album ! What happened? OS Tiger 10.4.10 - last update. Thank

  • IPhone 5 purple smudge in Camera photos

    I recently bought the iPhone 5 and am loving it so far, but recently a purple smudge began to appear when using the camera.  I went to my wireless carrier since it was within the period of time to exchange and they said it is a software issue? The pr

  • Back in the days...

    Before we got this new version of this forum, when i clicked on "My Posts", below the posts i'd have a line indicating how many responses i had to my posts. I liked this feature alot, is there anyway to get it back?... If not, can you someone do some