0

Fellow component not found

asked 2014-08-24 16:45:13 +0800

agazerboy gravatar image agazerboy
1 1

updated 2014-08-25 17:08:38 +0800

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
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-25 09:11:18 +0800

Darksu gravatar image Darksu
1991 1 4

updated 2014-08-25 09:52:07 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

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:

  • Create a window and set an id
  • Change the button as shown below by passing the id's of the components:

<button id="btnOne" label="check equal selection" onclick="checkEqualSelection(tbOne.getId(), tbTwo.getId());"/>

  • Use the following code in order to get the component:

Textbox textBox1 = self.getFellow("win").getFellow(idOne);

  • Update the remaining code as you see fit

Hope you found the information helpfull.

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-08-24 16:45:13 +0800

Seen: 38 times

Last updated: Aug 25 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More