Creator Tip: How to create a Collapsible Group Table?
Another interesting feature of the Sun Java Studio Creator Table component,
which many users might not be aware of, is the ability to collapse the Table Row
Group. Interestingly the collapsing does not involve round trip to the server,
so it is fast and convenient. I've created a small project for this tip which you can download
from here.
Steps:
- Add a Table Component to the design surface
- Drag and drop a Table Row Group (child of Table in the palette) on
to the Table Component
Now you should see two groups of table rows in the table (see picture below)
- Drag and drop the Person table from Servers Tab (Data
Sources -> Travel -> Tables -> Person on to the first Table Row Group
Make sure the first Table Row group is highlighted to accept the drop, not
the Table. A dialog pops up to ask if the drop should go to the table1 or
tableRowgroup1. Select tableRowgroup1
- Drag and drop the Trip table from Servers Tab (Data Sources ->
Travel -> Tables -> Trip on to the second Table Row Group.
Make sure the second Table Row group is highlighted to accept the drop. A
dialog pops up to ask if the drop should go to the table1 or tableRowgroup2.
Select tableRowgroup2
- Select tableRowgroup1 from Outline window and in the property sheet,
enter the text"Person Row Group" to the property
headerText and select the checkbox for the
property groupToggleButton.
- Similarly, select tableRowgroup2 from Outline window and in the property
sheet, enter the text "Trip Row Group" to the property
headerText and select the checkbox for the
property groupToggleButton.
- Select and right click on tableRowgroup1 from Outline window and select
Table Layout menu item. In the options panel of
the dialog select pagination checkbox and set
number of rows to 3.
- Similarly, select and right click on tableRowgroup2 from Outline window
and select TableLayout menu item. In the options
panel of the dialog select pagination checkbox and set number of rows to 7.
Deploy and the page in the browser would look like the image below.
Now click on the down arrow in the Trip Row group, you would see the row group
collapsing immediately as shown in the image below.
Posted at 07:54AM Oct 24, 2006 |
Permanent link to this entry
Posted by jjones on October 24, 2006 at 02:57 PM PDT #
Posted by mickgiu on October 25, 2006 at 12:04 AM PDT #
Posted by sirkware on November 08, 2006 at 11:32 PM PST #
Mickgiu, after selecting the personid, if the page is submitted, then it may be possible to filter the second rowgroup. But I haven't tried it though.
Sirkware, looks like it is a bug, it should continue to display the rows in the rowgroups which still have data, and empty for the rowgroups that do not have any data. I will bring this up with the component team.
Posted by Winston Prakash on November 10, 2006 at 08:44 AM PST #
Posted by yossarian on November 28, 2006 at 09:51 AM PST #
Posted by IBeaumont on January 22, 2007 at 02:28 AM PST #
Posted by Daniele on June 05, 2007 at 12:36 PM PDT #
Posted by Dilip on July 23, 2007 at 08:41 PM PDT #
Posted by Vijay on August 06, 2007 at 03:46 AM PDT #
Hi Winston!!! I don't find examples about TableDataFilter's. I need to filter table component rows by some criterias. How I can do it? Please, if this question has been resolved, tell me a link to that solution. Thanks!!!
Posted by Santiago on October 11, 2007 at 04:57 AM PDT #
I'd like you to send me all the used in exmample libraries - if it's possible. Or show me the links where I can find them.
Posted by valiantsin on November 21, 2007 at 07:27 AM PST #
Hi,
Can anyone help.
I have table with Pagination.
I know there is method tablegrowgroup.getPage(). But how I can say in code that I want to go to Page 2 or 3. I have a situation where the user comes in the page and the table must be opened in page x. There is now method like setPage()
Posted by J on December 11, 2007 at 11:38 PM PST #
Hi,
1) I made use of "List<Names> myList;" variable in my Page and used this variable to table, by making use of table layout .
2) Also dropdown1 which contains firstnames which is a variable in Names class, but now i want my table to work like this . when i select dropdown1 ,depending on selected value a row should be created in a table with manually assigned valus (bcoz value comes from xml parser).
please can any one tell me how to solve this problem or even give me some hint to solve.
Posted by jaysonkn on October 13, 2008 at 04:37 AM PDT #
http://www.batteryfast.co.uk/nec/pc-vp-wp25.htm nec pc-vp-wp25 battery,
http://www.batteryfast.co.uk/nec/e400.htm nec e400 battery,
http://www.batteryfast.co.uk/samsung/p10.htm samsung p10 battery,
Posted by laptop batteries on October 24, 2008 at 12:01 AM PDT #
If you need (or want) a computer that’s easy to take along,you can see it from http://www.adapterlist.com/nec/pc-vp-wp25.htm nec pc-vp-wp25 battery whcih offer the longlife and consistently reliable performance you need to get the most out of your notebook .
Posted by laptop bettery on March 19, 2009 at 01:01 AM PDT #