0

getFellow Error

asked 2008-10-30 16:29:06 +0800

ibsolution gravatar image ibsolution
468 1 1 6

hai,

i got a problem using zk 3.0.8, i would like added a new Title in zul window

<?page title="Informatic Business Solution "?>
<?init class="ibs.admin.travel.TravelList" ?>

<window title="Travel List" id="identity" use="ibs.admin.travel.TravelList">
</window>

in java class i put the code like this

	public void doFinally() {
				Window a = (Window)getFellow("identity");
		a.setTitle("aaa");
}


org.zkoss.zk.ui.ComponentNotFoundException: Fellow component not found: identity
org.zkoss.zk.ui.AbstractComponent.getFellow(AbstractComponent.java:654)
ibs.admin.travel.TravelList.doFinally(TravelList.java:45)
org.zkoss.zk.ui.impl.RealInits.doFinally(Initiators.java:120)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:370)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:292)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:230)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:167)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


i am always get null object. What Happen ?

TIA,

Andy Susanto

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2008-10-30 17:34:42 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

updated 2008-10-30 17:36:05 +0800

I don't exactly remember how doFinally works, but you can
implement the AfterCompose interface in your TravelList class
and change the code block from doFinally to afterCompose
it will work as you described.

then you dont need the getFellow, you can do just

public void afterCompose()
{
  this.setTitle("new title");
}

/Madruga

link publish delete flag offensive edit

answered 2008-10-30 23:49:45 +0800

ibsolution gravatar image ibsolution
468 1 1 6

hai,

i need to use dofinally because i would like render the data for the first time.

so i just added <?init class="ibs.admin.travel.TravelList" ?>

and lot of my zul file using "getFellow" but now error exist

only in this file. but i do not know why ?


TIA,

Andy Susanto

link publish delete flag offensive edit

answered 2008-10-31 08:47:27 +0800

ziccardi gravatar image ziccardi
321 7

updated 2008-10-31 08:48:01 +0800

I'm not sure I've understood what you mean.

However, since you wrote:

<window title="Travel List" id="identity" use="ibs.admin.travel.TravelList">

Can't you just do:

public void doFinally()
{

this.setTitle("aaa");
}

Or, can't you use a composer?

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2008-10-30 16:29:06 +0800

Seen: 462 times

Last updated: Oct 31 '08

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