Hi Simon,

In ULC, the models behind the views (controls) can be populated with the
data from a database. This is similar to  Swing and you will find any number
of examples of this (binding list or table model to the data from a
database) on the internet.

For your example, where you have a list, you could populate the list's model
with the data from your FoxPro database. When using DefaultListModel for
ULCList, your code could be as follows (just a simple example):

Object [] customerDataList = YourCOMObjectsJavaWrapper.getAllCustomers();
DefaultListModel customerListModel = new DefaultListModel(customerDataList);
ULCList customerList = new ULCList();
customerList.setModel(customerListModel);

For sample code on Master-Detail kind of GUI, please see the source code of
TeamMembers sample application that is part of the ULC release. Samples can
be found in "ULC Installation Dir/sample" directory.

I hope this helps.

Thanks and regards,

Janak

PS:

Thank you for contacting the ULC Developer mailing list.
Please consider purchasing ULC Licenses and the Professional Support Package
for a guaranteed
response time. See http://www.canoo.com/ulc/products/support.html for
details.

While we will make every effort to continue providing free support, we
strongly recommend purchasing support.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Simon White
Sent: Friday, April 28, 2006 2:10 AM
To: [EMAIL PROTECTED]
Subject: [ULC-developer] How do I bind a table/widgets to data from a
Database?


Hi

I have gone through the MyToDoList sample project and it works fine.  So now
I want to try a more advanced test project.  I want to build a form with a
list of customers on the left side and the customer detail on the right.
When I click on a customer in the list I want to see the details on the
right side.

I have created the ui class using the VE and run it and everything looks
fine.  Now I need to learn how to bind the controls to data from a database.
It would be helpful if there were samples of this kind of thing in the
documentation.

Any instructions or code samples would be appreciated.

The next step will be learn how to get the data from a COM object.

Thanks,
Simon White

_______________________________________________
ULC-developer mailing list
[EMAIL PROTECTED]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to