Skip to main content

Table/Form Example from JavaOne

2 replies [Last post]
Anonymous

I promised this ions ago, but finally I've checked in the
demo we showed at JavaOne (with the misleading title of
"Master/Detail"):

jdnc_api/src/demos/TableFormDemo.java

This produces the rough equivelent of the JDNC markup
version which is located in:

jdnc_markup/demo/masterDetail_j1.jdnc

Our apis had changed enough since June that I did have to
port the example. It definitely highlights some rough
areas in JDNC's highlevel components, most notably:

- configuring/binding table columns to data columns
- adding conditional cell display based on cell value
(enumMap)

To run the Java API version from a cvs respository:
% cd jdnc_api\make
% ant -Ddemo.class=TableFormDemo run-demo

I would post the code directly here, except that the forum
software seems to fiddle with the whitespace such that the
indenting is eliminated, making it a futile effort. :-(

Aim

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Rinaldo DiGiorgio

Hello,

I would like to use the JDNC table component with
Mysql using a next generation web server. So I can't
use servlets, or apache modules etc. Are there some
examples/explanation of how to return TSV values to
JDNC components. Did I miss early access to the
JDBC/Rowset code?

Rinaldo

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Amy Fowler

Rinaldo DiGiorgio wrote:

> Hello,
>
> I would like to use the JDNC table component with
> Mysql using a next generation web server. So I can't
> use servlets, or apache modules etc. Are there some
> examples/explanation of how to return TSV values to
> JDNC components. Did I miss early access to the
> JDBC/Rowset code?

You didn't miss anything - it's not there yet. Our plan is to base JDNC's
rowset support on JSR114, which includes support for disconnected rowsets.
Unfortunately the RowSet interface in 1.4 is almost useless - there isn't
even api to get the total number of records in the set.

Since the reference implementation of JSR114 isn't included in 1.4, we're
working out how to handle that dependency gracefully. (if we moved to
tiger, the issue would go away, since disconnected rowsets are in tiger).

In the meantime, if you have a way to convert the result of your query
to a tsv file, then JDNC *does* support that using TabularDataModel's
API:

TabularDataModel data = null;
try {
data = new TabularDataModel("http://myapp/foo.tsv");
data.startLoading();
catch (Exception e) {
}
JNTable table = new JNTable(data);

Aim

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net