This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add widgets to table cells.
Tree is a widget. So is a disclosure panel.

 
ivan stefko
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ivan stefko
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody?
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!