-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I have an abstract component "CompInput" that extends Div. Another component "Compdatebox" that extends "CompInput".
I want to create a generic component "compGenericRow" that extends Row
@wire("label")
private Label label;
@Wire("compinput")
private CompInput comp;
the zul is
<zk>
<label/>
<compdatebox/>
</zk>
When initialize the component "compGenericRow" the label is created but not the generic input component. Else modifing the "compGenericRow"
@wire("label")
private Label label;
@Wire("compdatebox")
private CompInput comp;
the "CompInput" is created.
How can I initialize the generic component?
Yes this will not work as the type selector in @Wire
do not work as in Java superclass/subclass relationship. The type selector needs to be exact type i.e. compdatebox in your case for SelectorComposer to be able to wire it correctly. Note that your <compdatebox />
will still create an instance of Compdatebox on server-side. It is just not wired if you use @Wire("compinput")
for the reason stated above.
Asked: 2013-04-12 15:20:38 +0800
Seen: 16 times
Last updated: Apr 16 '13