0

The shadow Ajax example does not work

asked 2017-08-31 02:16:58 +0800

gdelrio gravatar image gdelrio
11

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> //

// <apply templateuri="mainContent.zul"/> //
// <south height="50px" border="none"> // <apply templateuri="footer.zul"/> // </south> // </borderlayout> // </zk>

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

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-31 04:01:48 +0800

MDuchemin gravatar image MDuchemin
1261 1 3
ZK Team

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?

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
2 followers

RSS

Stats

Asked: 2017-08-31 02:16:58 +0800

Seen: 10 times

Last updated: Aug 31

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