File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes GWT and the fly likes Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows" Watch "Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows" New topic
Author

Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows

ivan stefko
Greenhorn

Joined: Jan 18, 2010
Posts: 12
Hi, I would like to create table in GWT 2.1.0 with expand/collapse rows (more than one column... ). Something like http://code.google.com/p/plechacik/updates/list but with more columns. Could you give me some advice how to?

thanks,
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10519
    
    9

You can add widgets to table cells.
Tree is a widget. So is a disclosure panel.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
ivan stefko
Greenhorn

Joined: Jan 18, 2010
Posts: 12
Maneesh Godbole wrote:You can add widgets to table cells.
Tree is a widget. So is a disclosure panel.


tree is a widget but represents only one column. i need table with 5 columns ... . I can use disclosurePanel and add this widget to table cells but there is another question: how can I assecurate that column width will be dynamical (according to context width) for each row??
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10519
    
    9

Im a bit confused in understanding what exactly you are trying to do here.
In the link you provided, I already see multiple columns.Date, ID, Some stuff, commiter, some other stuff.
ivan stefko
Greenhorn

Joined: Jan 18, 2010
Posts: 12
Maneesh Godbole wrote:Im a bit confused in understanding what exactly you are trying to do here.
In the link you provided, I already see multiple columns.Date, ID, Some stuff, commiter, some other stuff.

yeah.. may be bad example - this example should demonstrated collapse/expand rows. Is hard to say in this example if there are multiple columns or there are only one column because there isn't table header.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10519
    
    9

Looks like your requirement is like this:
1) You got data which has multiple attributes
2) These attributes need to be displayed as columns
3) Some of the attribute values can translate to heavy data.
4) You want to optimize the user experience so its fast.
5) One way of optimizing is fetching and displaying data only when required

Is this correct? If yes, my initial suggestion still holds true. You can display data in a tabular format with headers and all. To load and display heavy data at runtime, use a tree or a disclosure panel or even a lazy loading panel.

If this is not what you had in mind, please tell us what exactly you are trying to do.

PS. In the link you provided, incorporating headers is not that difficult. Just make them the first row of your table.
Nilesh Pat
Ranch Hand

Joined: Mar 01, 2010
Posts: 46
hi ivan,
try PagingScrollTable

use the link below
http://collectionofdemos.appspot.com/demo/com.google.gwt.gen2.demo.scrolltable.PagingScrollTableDemo/PagingScrollTableDemo.html


http://collectionofdemos.appspot.com/javadoc/index.html?com/google/gwt/gen2/table/client/PagingScrollTable.html

this table gives you a lot of functionality you might wanted to.

may be you have to use external library. com.google.gwt.gen2.table

It's little bit tricky library. But you can make your custom PagingScrollTable using it as you required.


Regards,
Nil
ivan stefko
Greenhorn

Joined: Jan 18, 2010
Posts: 12
Maneesh Godbole wrote:Looks like your requirement is like this:
1) You got data which has multiple attributes
2) These attributes need to be displayed as columns
3) Some of the attribute values can translate to heavy data.
4) You want to optimize the user experience so its fast.
5) One way of optimizing is fetching and displaying data only when required

Is this correct? If yes, my initial suggestion still holds true. You can display data in a tabular format with headers and all. To load and display heavy data at runtime, use a tree or a disclosure panel or even a lazy loading panel.

If this is not what you had in mind, please tell us what exactly you are trying to do.

PS. In the link you provided, incorporating headers is not that difficult. Just make them the first row of your table.


yeah.. requirements are OK. what i'm looking for is solution for fllowing... .

i have this simple example:


this is only table with data without expanded/colpased rows. So i need to add this functionality to this table and i don't know how.
I would like to use DisclosurePanel (if it is possible in this case) for it. So it means that i need define another column - which one/which kind of type?

Smth like this:



and next question is how can i achieve will be expanded throught all columns in table = colspan in HTML.

thanks

ivan stefko
Greenhorn

Joined: Jan 18, 2010
Posts: 12
or is there any possibility how can i use CellTree for it? CellTree is OK - because there is expand/collapse functionality, but there is only one 'column'...

for better demonstration this is what i exactly want:

http://dev.sencha.com/playpen/gxt/gridplugins/ - first table ... . In this case there is some external jar ... . I need to do it in GWT 2.1.0 (celltable, cellTree ... )

i.
ivan stefko
Greenhorn

Joined: Jan 18, 2010
Posts: 12
anybody?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows