-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
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
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
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?
Asked: 2008-10-30 16:29:06 +0800
Seen: 462 times
Last updated: Oct 31 '08