-
FEATURED COMPONENTS
First time here? Check out the FAQ!
For all who need databinding in pure java i have made a sample for downloading.
4 Files:
SampleDatabindingDialog.java (the data binded dialog with listbox and detail fields)
Person.java (The model class)
PersonDAOImpl.java (The CRUD methods for person, simulates the database )
MyBeanUtils.java ( for storing/resetting the bean values by onCancel; needs org.apache.commons.beanutils.BeanUtils )
Put all 4 files in a package, correct the imports and start with
SampleDatabindingDialog.show(parentComponent);
where parentComponent should be the parent for the dialog window.
Many thanks to Todd ('twiegand') for helping me with the binder.
best
Stephan
Many thanks stephan. Can we use this for any type master CRUD not only for person ?
Sure.
What i have seen by adapting the skeleton to productive mode:
If you have working with more than one model type it's easier to create a Databinder for each type:
binderCustomer = new Databinder();
binderPerson = new Databinder();
best
Stephan
PS: Have you get my email?
So this is a kind of "template/pattern" to natively support CRUD funcionality for generic items in plain java!?
Cool...
@Steva I have some little CRUD dialogs where i will not have zul files. So this sample is a fast copy and paste skeleton ( where i used an extended version with db paging).
@Senthil yes this is exactly the email address to which i have send. I will send again.
best
Stephan
Hi Stephen the above example have issue with the Zk6.0.3 jar If you will get time please update your example
thanks
Asked: 2012-10-30 14:04:59 +0800
Seen: 190 times
Last updated: Dec 05 '12