free web page hit counter
Thursday Nov 03, 2005

Creating a Multi-Row Selectable CheckBox Table

Some Java Studio Creator users have asked in the forum, if it is possible to make the new Table component to behave like a multi column check box. The answer is - yes. The new table component bundled with Creator 2 is a very flexible component and you can easily write some code to make it work as desired above.  Read more at

http://winstonprakash.com/articles/jsf/multi_select_table

Comments:

Winston thanks for this blog.. I was getting frustrated trying to customize the look and feel of my table component .. we surely need a detailed tutorial on tables and data providers.

Posted by Saniya on December 28, 2005 at 06:13 PM PST #

Isn't the a small msitake, when you write: "set the following properties in the property sheet: selected="checkbox2" ". I can't find any property selected in the properties of the TableColumn in Creator 2 Update 1. There is only a selectId property... Is this what you mean? In the JSP is a selected property, but not in the properties section.

Posted by Max on August 15, 2006 at 05:18 AM PDT #

There is no way you can set the selected property on checkbox (selected="checkbox2") in my creator. How did you do it?

Posted by Jeje on September 18, 2006 at 08:28 AM PDT #

Hi Jeje, is selectId, no selected, I guess mistyping.

Posted by cavaliernino on September 25, 2006 at 09:11 PM PDT #

How would you approach the situation when 3 tables exist on a page and 2 have checkboxes. I understand now why one of the tables is working,id=table1.

Posted by Duane DeCouteau on September 26, 2006 at 03:29 PM PDT #

How to add the delete button on the action bar?

Posted by jack yang on March 19, 2007 at 07:08 AM PDT #

Hi Jack, it is explained in my other blog http://blogs.sun.com/winston/entry/multiple_buttons_header_table

Posted by Winston Prakash on March 19, 2007 at 07:58 AM PDT #

When putting result of a having arguments Ejb's method into table and add checkbox,There is no rows display when clicked checkbox.The checkbox has set auto-submit. In prerender() set Ejb's method argument values.After clicked checkbox,page running prerender()and the table refresh.Can you help me?

Posted by nsqsmile on May 16, 2007 at 02:29 AM PDT #

Hi Winston,i resolve the problem by putting property of checkbox into session bean.

Posted by 125.73.39.197 on May 17, 2007 at 08:18 AM PDT #

Hi Winston, I'm trying to display a DTO (its structure shown below) using the table component. I've bound the table to an ObjectListDataProvider that wraps a list of these DTOs. One of the column shows the listBox component for each row and binds to the "myList" member of the DTO (taken from currentRow as shown in the code snippet below). How can I populate the listbox from "myList" without requiring the "MyOtherDTO" class to inherit "xxx.rave.model.Options"? Or is there any other workaround to get the job done?
MyDTO
   -key:Integer
   -name:String
   -myList:List<MyOtherDTO>

<ui:listbox binding="#{Page1.listbox1}" id="listbox1" items="#{currentRow.value['myList']}"/>
Thanks!

Posted by bsodhi on May 23, 2007 at 02:32 PM PDT #

Good Day all Following the example above,how can i get the value of the selected name ?

Posted by John on June 01, 2007 at 01:18 AM PDT #

NOW how can i get the selected values?

Posted by Lorenzo on June 28, 2007 at 01:13 PM PDT #

http://blogs.sun.com/divas/entry/using_checkboxes_in_a_table#comment-1144083957000 here is how to check of the selected values but nothing happen

Posted by lorenzo on June 28, 2007 at 02:19 PM PDT #

Question?
how I can add two checkbox to the table?

I know to put one, but I do not know to put two to indicate different situations.

Thansk

Posted by Sandra on October 19, 2007 at 11:58 AM PDT #

http://www.batteryfast.co.uk/hp/hstnn-ib44.htm hp hstnn-ib44 battery,
http://www.batteryfast.co.uk/hp/nc4000.htm hp nc4000 battery,
http://www.batteryfast.co.uk/hp/nc4010.htm hp nc4010 battery,

Posted by laptop batteries on October 24, 2008 at 12:13 AM PDT #

Do you want to own some betteries which have more function , more economical and long life? Please visit the following Web site: http://www.adapterlist.com/hp/hstnn-ib44.htm hp hstnn-ib44 battery ,it will help you find the ideal battery.

Posted by laptop bettery on March 02, 2009 at 11:25 PM PST #

Do You Want a hp nc4000 battery?You can still get a brand new hp nc4000 battery from our company.Just tell your friends to buy, Details of products are posted here: http://www.adapterlist.com/hp/nc4000.htm hp nc4000 battery.

Posted by laptop bettery on March 04, 2009 at 07:09 PM PST #

hi winston .....my boss will surely kill me if i dont complete the following task in two days...i have been searching fo 10 days and try every logic that i can....please help me....
Problem is:when the user comes for update...table rows already checked corresponding to database values....for instance;database table A has values'1,3,5' in the field code then on update screen row no 2,row#3 and row #5 must be checked i wrote the code in prerender and set checkbox1.setselected(BigDecimal(1))..bt no use then i changed it into "int 1"...then true...bt still haven't completed the task,none of the row is checked when page is displayed.

and one more thing table is visible or invisivle on a dropdown values

plz help...i would be really obliged.........

Posted by sam mills on November 04, 2009 at 03:45 AM PST #

hola

Posted by 166.210.238.239 on November 07, 2009 at 01:24 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed