-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm a very newbie in ZK and Java. But I do love the technology by now.
After a lot of trial (and more error) I bumped into the following problem.
I've created a composite component following this smalltalk: Define Composite Component using Java Annotation in ZK6
@Composite(name="testcomposite") public class TestComposite extends Textbox implements IdSpace { private String someProp; public TestComposite() { } public String getSomeProp() { return this.getValue(someProp); } public void setSomeProp(String someProp) { this.setValue(someProp) } }
<testcomposite someProp="@bind(vm.selected.website)" />
I'm doing stupid things? Am I forgetting something?
jaan
hi,
you need addition information(annotation) to support save-binding in composite or other custom component.
please follow this feature request. http://tracker.zkoss.org/browse/ZK-833
Hi Dennis,
I have the same troubles with composite component.
I did getter and setter for Date value (in my case).
I send event onChange, when internal component is updated.
Events.postEvent(Events.ON_CHANGE,this,null);
Different is only in my annotations:
<testcomposite someProp="@{vm.selected.website,save-when='self.onChange'}" self="@action(recalculate,when='onChange')"/>
Action "recalculate" works fine, but data binding works only for setter.
When can I expect solution for this issue?
pmq
@jaan
this feature was resolved by http://tracker.zkoss.org/browse/ZK-883 already,
following is the example to enable binding for imagelabel in the smalltalk http://books.zkoss.org/wiki/Small_Talks/2011/December/Define_Composite_Component_using_Java_Annotation_in_ZK6.
@ComponentAnnotation({"description:@ZKBIND(ACCESS=both,SAVE_EVENT=onAfterEdit)","title:@ZKBIND(ACCESS=both,SAVE_EVENT=onAfterEdit)"})
public class ImageLabel extends Div implements IdSpace {..}
@pmq
form the syntax, you are trying zkbind1
did you try zkbind2 ? it is more powerful and easier than zkbind1
you can read document here. http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/MVVM
Hi Dennis,
Where can I find package for Componentannotation?
I cannot find library with org.zkoss.zk.ui.annotation.ComponentAnnotation
pmq
it is after zk 6.0.1, it is freshly now. try here, http://www.zkoss.org/download/freshly/
Adding to this. Is there any support for child components? Like the one I describe in ZK 6 Composite Feature
Hi,
I follow the small talk to composite a component and and it making an error to deploy:
Caused by: java.lang.IncompatibleClassChangeError: Found class org.objectweb.asm.AnnotationVisitor, but interface was expected
It seems that the 3 jars added + zk 6.0.1 make this error. (in the original version 6.0 also).
thanks in advance
Hi,
I have been trying to deploy your example and it was impossible. I have been learning how to make the composite components with the example that is found in the demo components: ListBox:DualListBox. It was impossible that this component updated the status populating the input listbox in MVVM, bumping into the same problem
<emailDualListbox id="dualLBox" candidateModel="@init(initEmailDualBox)"/>
thank in advance
I think you have multiple asm jars in the project and they conflict.
Asked: 2012-01-14 13:42:54 +0800
Seen: 1,526 times
Last updated: Aug 27 '12