lol just saw the casting, that isn't needed also because ListModelList is implementation of ListModel.
chillworld ( 2015-11-23 09:08:52 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all. i have a tutorial about Z. i did show data to textbox.i did update inline but not save to database .here is code
@Command
@NotifyChange("Edit")
public void Edit(@BindingParam("Dep") Department myDepartment) {
getDepartmentDao().Update(myDepartment);
departmentModel = (ListModel<Department>) new ListModelList<>(departmentService.listDepartment());
}
@Override
public void Update(Department department) {
openSession();
beginTransaction();
update(department);
commitTransaction();
closeSession();
}
pls help me.
Thank you so much
Oke let's start with the beginning.
Please do not start method names with a capital letter.
This is preserved for classes only.
Now it's time to debug.
First of all, check if your command is triggered.
Simple way is Clients.showNotification("command edit triggered");
If you have a real logger implemented, use that instead.
I have a good feeling your command isn't triggered (and if it's triggered I'm sure the notifychange will not work unless you remove the capital).
Chill.
Hello smileinheavenn,
First of all you can remove the following line of code and add a notify change to the model:
departmentModel = (ListModel<Department>) new ListModelList<>(departmentService.listDepartment());
Furthermore hibernate produces detailed log files regarding it's transactions. Could you please post the logs so that we can examine them in detail?
Best Regards,
Darksu
lol just saw the casting, that isn't needed also because ListModelList is implementation of ListModel.
chillworld ( 2015-11-23 09:08:52 +0800 )editAsked: 2015-11-23 04:06:55 +0800
Seen: 26 times
Last updated: Nov 23 '15
Your notifychanged is wrong. Start edit with lower case and do you have a getEdit()?
chillworld ( 2015-11-23 05:19:27 +0800 )edityes. i have a getEdit here is code @Override public void Update(Department department) { openSession(); beginTransaction(); update(department); commitTransaction(); closeSession();
smileinheavenn ( 2015-11-23 06:08:32 +0800 )editCan you give me account skype or gmail
smileinheavenn ( 2015-11-23 09:15:44 +0800 )edit