Hi,
Maybe at this forum there is any Wicket expert and will be able to point me.
I try to save changes in database but I have a problem with it.
Can you maybe please verify whether I do it in proper way.
In green color I describe all steps.
if(itemObject != objectPanelid ){
item.add(new Fragment("fkode","fk0").add(new Label("kode0",s.getkode())));
}else{
//1. In TextField the user edits displayed data.
item.add(new Fragment("fkode","fk1").add(new TextField
<String>("kode1",new PropertyModel<String>(s,"kode"))));
//2.Symbol- this is my class where all getters and setters are defined.
Below I get the model object.
final Symbol symb = item.getModelObject();
//In onClick in red color there is saveABC method. This is the method which is responsible for saving data in database.
The method is defined in ABC class.
I'm not the author of this method but I think that it is OK.
Fragment fragmentButton = new Fragment("buttons","button1");
item.add(fragmentButton);
fragmentButton.add(new Link("saveButton"){
@Override
public void onClick(){
abc.saveABC(symb);
setResponsePage(getPage());
Regards,
Rafal
--
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en