-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm trying to follow the example provided for updating only necessary part of a page instead of reloading the whole page and I cannot make it work. I got the following error:
org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: file:///apps/t...webapps/myapp/index.zul:10:37: Component definition not found: apply in [LanguageDefinition: xul/html] org.zkoss.zk.ui.metainfo.Parser.parseItem(Parser.java:916) org.zkoss.zk.ui.metainfo.Parser.parseItems(Parser.java:682) org.zkoss.zk.ui.metainfo.Parser.parseItem(Parser.java:1078) org.zkoss.zk.ui.metainfo.Parser.parseItems(Parser.java:682) org.zkoss.zk.ui.metainfo.Parser.parseItem(Parser.java:1078) org.zkoss.zk.ui.metainfo.Parser.parseItems(Parser.java:682) org.zkoss.zk.ui.metainfo.Parser.parseItem(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:243) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:120) org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:213) org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:200) org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:94) org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:34) org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:227) org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:202) org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:134) org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:123) org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java:141) org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java:193) org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:205) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:137) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
I'm using the following zul files to call the BookmarkChangeController java file:
index.zul: //<zk> // <borderlayout hflex="1" vflex="1" apply="BookmarkChangeController"> // <north height="100px" border="none"> // <apply templateuri="banner.zul"/> // </north> // <west width="260px" border="none" collapsible="true" splittable="true" minsize="300"> // <apply templateuri="sidebar.zul"/> // </west> //
mainContent.zul: // <zk> // <include id="mainInclude" src="main_login.zul"/> // </zk>
main_login: // <hbox vflex="1" hflex="1" align="center" pack="center" spacing="20px"> // <vlayout> // <window id="loginWin" title="Login with your name" border="normal" hflex="1"> // <vbox hflex="1" align="center"> // <grid hflex="min"> // <columns> // <column hflex="min" align="right"/> // <column/> // </columns> // <rows> // <row> // Account : // <textbox id="account" width="200px"/> // </row> // <row> // Password : // <textbox id="password" type="password" width="200px"/> // </row> // </rows> // </grid> // <button id="login" label="Login"/> // </vbox> // <vbox hflex="1" align="center"> // </vbox> // </window> // <window id="RegisterWin" title="If you have not registered" border="normal" hflex="1"> // <hbox hflex="1" pack="center" align="end"> // <button id="register" label="Register" href="http://localhost:8090/myapp/register.zul"/> // </hbox> // </window> // </vlayout> // </hbox>
I found that there are several BookmarkChangeController.java files in the web; I've tried several of those but none so far had worked. Unfortunately the web page does not contain a link to all the codes (zul and java) required to test this idea. If there is a place where to find those files, I'd very much appreciate if you could share the location. I've invested several days in trying this to work without any success so far..
Best,
Gabriel
Hi Gabriel.
Component definition not found: apply in [LanguageDefinition: xul/html] org.zkoss.zk.ui.metainfo.Parser.parseItem(Parser.java:916)
The parser didn't find the apply component in your application's component definition. Sounds like you are missing the zuti.jar library containing the shadow components. Are you using maven or adding jars manually to your java project classpath? Can you check if zuti.jar exist in your project with the same version as your ZK jar?
Asked: 2017-08-31 02:16:58 +0800
Seen: 11 times
Last updated: Aug 31 '17