GWT Table that supports sorting, scrolling and filtering - gwt

I have a project using GWT and it displays data in a table.
I need a Table for GWT that supports:
sorting by particular column
scrolling the data, while the header is immobile
filtering rows for data searched in the table
The project is being created for internal purpose of the company, so I look for a solution that does not require commercial licensing for such uses.

The standard CellTable supports sorting.
(Hopefully more features will come soon.)

Here is a table supporting sorting and filtering : http://code.google.com/p/gwt-advanced-table/
Google itself is working on it. Look at this example in the incubator which supports multi-column sorting and fixed header but unfortunately no filtering : http://code.google.com/p/google-web-toolkit-incubator/wiki/ScrollTable
Other grids and tables are available in the incubator at this address : http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=Tables
Ext GWT proposes a very nice table, but it is not free (in your case) : http://extjs.com/products/gxt/

There is also EXT GWT (not to be confused with GWT EXT), build entirely in Java. You may have the pay for the license though. I do not known if you have to pay if the application is of internal use.
The Grid widget will do exactly want you want.
The rest of their widgets are also quite impressive.

Just to keep this up to date:
CellTable now supports paging and single column sorting: https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCellTable?hl=de
You may want to adapt yout backend request for filtering, as this is usually more performant.

GWT Ext provides a table that meets these requirements.
It provides a wrapper around the Ext javascript library, so its best to commit to using either only GWT Ext widgets, or GWT widgests. They can be combined, but sometimes don't play well with each other.

Related

Lazy loading and scrollable table with Wicket 7

While migrating a Wicket 1.4 based web application which uses the DojoLazyLoadingListContainer from org.wicketstuff.dojo to newer Wicket 7 we identified major problems.
The migration of the lazy loading table itselfs seems not to be a feasible solution and we are looking for another table providing our functional requirements:
Infinite scrollable with lazy loading via the standard Wicket data provider concept.
No pageable table style like Wicket standard
Full AJAX support while replacing the loaded table for example in a
tabbed view panel or in multiple wizard steps.
Open source or commercial license for one web server and development
systems
We are looking for a Wicket data table implementation which is
available for current Wicket version (e.g., 7.2.0) and has a
future-proof on-going development.
Thanks for any help or hint in advance!
Kind regards,
Marc
Check https://github.com/wicketstuff/core/tree/master/datatables-parent.
It provides an integration with DataTables.net.
It has a demo of infinite scroll table at https://github.com/wicketstuff/core/tree/master/datatables-parent/datatables-examples/src/main/java/org/wicketstuff/datatables/demo/infiniteScroll.
Please use WicketStuff issues for bug reports!
You may also use the DataTable with infinite scroll from the Wicket Jquery/Kendo UI project. It works with both wicket 6 and 7.
www.7thweb.net/wicket-jquery-ui/kendo/datatable/InfiniteDataTablePage
Thanks for the link, I think it's a promising approach.
But I opend the InfiniteScrollDemoPage via a link and got this exception:
java.lang.UnsupportedOperationException: Called operation not supported for TokenBuffer
at com.fasterxml.jackson.databind.util.TokenBuffer._reportUnsupportedOperation(TokenBuffer.java:1031)
at com.fasterxml.jackson.databind.util.TokenBuffer.writeRawValue(TokenBuffer.java:694)
at de.agilecoders.wicket.jquery.util.serializer.ConfigSerializer.serialize(ConfigSerializer.java:18)
at de.agilecoders.wicket.jquery.util.serializer.ConfigSerializer.serialize(ConfigSerializer.java:15)
at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:467)
at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:388)
at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:27)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114)
at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:1837)
at com.fasterxml.jackson.databind.ObjectMapper.valueToTree(ObjectMapper.java:1965)
at de.agilecoders.wicket.jquery.util.Json.toJson(Json.java:73)
at de.agilecoders.wicket.jquery.util.Json.stringify(Json.java:140)
at de.agilecoders.wicket.jquery.AbstractConfig.toJsonString(AbstractConfig.java:35)
at de.agilecoders.wicket.jquery.function.ConfigurableFunction.<init>(ConfigurableFunction.java:38)
at de.agilecoders.wicket.jquery.JQuery.chain(JQuery.java:350)
at org.wicketstuff.datatables.DataTables.renderHead(DataTables.java:72)
at org.wicketstuff.datatables.demo.infiniteScroll.InfiniteScrollDemoPage$2.renderHead(InfiniteScrollDemoPage.java:75)

Forms / structured data feature in Plone 4

We are trying to make a document-managemnet / knowledge management portal using Plone 4. We would like a forms / structured data feature in our webapp with posibility of defining forms through the web, having workflows using these forms and being able to create reports from them (preferably in some format that facilitates simple and nice looking or skinnable printouts).
Any pointers to modules, documentation and/or literature would be great. Thanks.
Dexterity in combination with collections for reporting should get you what you need.
http://plone.org/products/dexterity
PloneFormGen is a good solution for through the web creation of standalone forms but as soon as you need your form to be workflowed, reviewed inside plone or later edited and updated then a "Content Type" is normally the most appropriate way to model this inside an CMS. Dexterity is the recommended way to build content types going forward. It has the ability to create and edit content types through the web.
For more indepth information of developing a Dexterity based solution see http://plone.org/products/dexterity/documentation/manual/developer-manual
Archetypes would be an alternative way to create content types.
Collections can be used for basic through the web reports. To make this work on the new fields in your content types you'd need to make the fields usable inside collections which I'll leave out of this explanation. For more advanced reports I'd suggest a simple BrowserView which lets you use any python you want to compose your report.
The add-on http://plone.org/products/uwosh.pfg.d2c product with PloneFormGen, is going to be the best fit for your situation.
uwosh.pfg.d2c creates content objects from your PloneFormGen form submissions. You can then use it with placeful workflows to give you a custom workflow on the submission.
If you'd rather not use placeful workflows, it also allows you to specify the content type it'll save the form to so you can have a different content type, with a different workflow on every form.
Dexterity would work too, but the TTW tool is not nearly where PloneFormGen is.
Simply: http://plone.org/products/ploneformgen

SmartGWT UI definition using XML

I have been using UIBinder on SmartGWT widgets rather successfully.
However, I have to extend each SmartGWT widget that I use to comply with UIBinder's requirement. Occasionally, I have to masquerade a SmartGWT widget into com.google.gwt namespace, or masquerade a non-GWT-widget as a GWT widget. I extend widgets on as-needed basis.
So, I am starting to wonder, may be SmartGWT already has a UI XML format and I might be doing all this UIBinder acclimatization just to reinvent SmartGWT's wheel.
I have read and reread source codes of the showcase and delved into some of the SmartGWT source code, as well as reading the javadocs.
All I found is XML or Json for communication between server and client.
Is there any UI def XML available for SmartGWT whether gwt-compiled to client-side javascript or like Vaadin's server-side generated UIDL?
And if you happen to be an Isomorphic agent, could you tell us if there are any plans to let SmartGWT play with UIBinder (to preclude me from having to massage SmartGWT widgets on my own anymore)?
Yes, there is a SmartGWT XML component definition - the one used by Visual Builder and Reify, and which you can also write directly. See these docs and this FAQ item:
http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/docs/ComponentXML.html
http://forums.smartclient.com/showthread.php?t=8159#loadVBScreen
As the FAQ clarifies, we recommend using this XML format for a set of use cases that heavily overlaps with what UIBinder is for, that is, keeping your layout and basic component definitions in a declarative format that designers can edit and which can be edited by visual tools, and having your actual Java event handling and other programmatic code separate.
However we strongly recommend against having that declarative format be HTML (as UIBinder does it) because that introduces lots and lots of cross-browser layout issues.
We are likely to eventually support UIBinder as well for the few use cases where it is not redundant with our own XML format. If you need that to happen sooner, consider Feature Sponsorship:
http://www.smartclient.com/services/index.jsp#features
For XML smartclient has the componentxml which is XML based ui design and use JavaScript to have client side logics. You need not compile your app every time in development environment and just reloading of the browser will have the change included and you can test it.

Developing a GUI Builder Application

I am looking for a nice framework for developing a GUI builder Application. We have an application where 100Os of custom data entry forms and their print formats are required and each client will need some modifications on these. We have a developed a product using java based open source templatnig frameworks so that the layout and field definition are stored in database and rendered dynamically to the user. We also have an appication to design these forms but cannot do visual design.
Now I am trying to make a Visual Form Designer application for generating these forms. Can any one suggest some open source frameworks than can be used? Can I use Eclipse Visual Editor? Or is it better to develop some kind of parser for HTML using AntLR and then parse the HTML output from already existing GUI builders like Dreamweaver to get the desired output?
Thanks and Regards,
-- Kannan
Oooh, great question!
I wouldn't know any readily availble framework that you can use. Depending on your needs however, I think rolling your own shouldn't be too hard.
First of all, you probably wouldn't want to give the users too much freedom. Freedom only gives them the opportunity to mess things up and make the resultant forms hard to use. I think from your description that the fields are pre-defined, so that the user only needs to customize which fields appear on a given form, and in what order. Order can be a simple thing like top-to-bottom. Some semi-intelligent automatic layouting could be used to conserve screen space. Adding a feature to group fields together would probably also be useful, and grouping would lead to some kind of standard "group" widget.
Accepting simplified functionality like this, you don't really need the flexibility of a full gui editor. A couple of listviews, maybe a property sheet and a preview window will be enough to give your users the functionality they need.
Of course, this only holds for screen forms. Print forms may be trickier to layout, as people may want to cram as many fields as possible into very little space so the entire form can fit on a single page or something. I really don't have any suggestions for you there, but maybe a similar "simplified" approach with some intelligent auto-layouting could work.
Overall, my advice would be: Keep It Simple! (S... ;)

Paging a GWT-EXT datagrid with GWT-RPC?

I need to display data coming from a GWT-RPC service in a paginated datagrid.
The gwt-ext showcase does not provide an example combining gwt-rpc calls and datagrids.
That is too bad because the original javascript Ext grid components offer paging and remote sorting. How to take advantage of these features with GWT ?
I too wanted to do this a few weeks ago, and searched long and hard and found nothing. In the end I wrote my own paged grid that supports RPC/Sorting/Editing/Etc.
It's intended to be generic, and is still a work in progress, but to use it you simply implement the TableSource and TableRenderer interfaces like so:
new PagedTable(new AssetTableSource(), new AssetTableRenderer(), 30);
I have posted the code here:
http://wiki.shiftyjelly.com/index.php/GWT#GWT_RPC_Paged_Table
Feel free to revert the buttons in the PagingControl.java back to normal GWT buttons.