-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am trying to replicate some existing ZK test-case. When I try to run the example: it gives an error "fellow component not found". Below is the Fiddle file:
zkfiddle. org/sample/3ks9ssn/1-fellow-component-not-found)
Error occurs when I click on "check equal selection". What am I doing wrong?
PS: Sorry for broken link because it doesn't let me post it.
I am sorry to post a comment for my own question because forum doesn't let me reply to Darksu or post anything.
Thanks for your detailed answer. I am sorry for my limited (zero) knowledge in ZK framework. I tried to follow your instructions. Now, it gives the error:
"can't cast from textbox to listbox"
Following line is causing the error:
Listbox lbOne = self.getFellow("win1").getFellow(idOne);
I have updated the fiddle so you might have a look. Would it possible for you to directly edit Fiddle?
I also didn't get where to put following code:
Textbox textBox1 = self.getFellow("win").getFellow(idOne);
If it put it inside the function then again the casting error would occur.
I also tried the following:
I changed the code to:
Listbox lbOne = (Listbox)Path.getComponent("/win1/idOne");
Listbox lbTwo = (Listbox)Path.getComponent("/win1/idTwo");
I think, its alternate to getFellow. It gives the following error:
Null Pointer in Method Invocation
Hello agazerboy,
You have to change a little the code, so that you can get the component.
In detail you have to perform the following:
<button id="btnOne" label="check equal selection" onclick="checkEqualSelection(tbOne.getId(), tbTwo.getId());"/>
Textbox textBox1 = self.getFellow("win").getFellow(idOne);
Hope you found the information helpfull.
Best Regards,
Darksu
Asked: 2014-08-24 16:45:13 +0800
Seen: 38 times
Last updated: Aug 25 '14