-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4787840
By: paran0rmal
I'm trying to use an HTML form, according to the smalltalk
(http://www.zkoss.org/smalltalks/legacy-form/legacy-form.html)
However, as soon as I add the following to my zul:
<h:form id="updateForm" action="/updateProfile"
xmlns:h="http://www.w3.org/1999/xhtml">
</h:form>
I get the following error:
org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Language not found:
http://www.w3.org/1999/xhtml
org.zkoss.zk.ui.metainfo.LanguageDefinition.lookup(LanguageDefinition.java:173)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:669)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:566)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:759)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:209)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:100)
org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:19
6)
org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:94)
org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:224)
org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:198)
org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:139)
org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:131)
org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java
:142)
org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java
:115)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:219)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:167)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInte
rnal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:75)
Please help? I'm using version 3.0.2, if that matters
Thanks
Andre
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4788338
By: jebberwocky
Dear Andre
I test it with a extension .zul. It works!
More info?
By the way, I test it by most recent freshly release
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4788617
By: paran0rmal
Thanks for the reply. What additional information do you require? My setup is quite simple, it's just a window tag with the above snippet in it, and it causes the above error. All my other pages work 100%.
I will also try it with 3.0.3, I was using 3.0.2 since its on Maven.
Thanks,
Andre
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4793447
By: paran0rmal
I've upgraded to 3.0.3, and I'm still getting the same problem. I'm using JDK1.6 and Tomcat 6 so everything is the latest version.
The full code of my zul is (I've reduced it from a full login page to this, which is the simplest page causing error):
<?xml version="1.0" encoding="UTF-8"?>
<?page id="toc"?>
<?variable-resolver
class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window id="root">
<h:form id="updateForm" action="/updateProfile"
xmlns:h="http://www.w3.org/1999/xhtml">
</h:form>
</window>
The full stack trace is:
org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Language not found:
http://www.w3.org/1999/xhtml
org.zkoss.zk.ui.metainfo.LanguageDefinition.lookup(LanguageDefinition.java:173)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:669)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:566)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:759)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:209)
org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:100)
org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:19
6)
org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:94)
org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:228)
org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:202)
org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:143)
org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:131)
org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java
:142)
org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java
:115)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:219)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:167)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInte
rnal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:75)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:264)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurity
Interceptor.java:107)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecuri
tyInterceptor.java:72)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:274)
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFi
lter.java:110)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:274)
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(Anonym
ousProcessingFilter.java:125)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:274)
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter
.java:217)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:274)
org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:274)
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSess
ionContextIntegrationFilter.java:229)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain
Proxy.java:274)
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
Please let me know if I can post anything else that would be of help, I'm completely stuck here
Thanks,
Andre
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4795552
By: henrichen
Andre,
Do your tomcat has internet access?
Also, can you check your tomcat log, see if any message related.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4795678
By: paran0rmal
Yes, it has internet access. I don't see anything else in the logs.
Could this be a configuration issue, that I have to declare the language / namespace in a config file somewhere?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4795714
By: paran0rmal
Hi,
Thank you for helping. I am now working around the problem by using zhtml components, which I did not know about since I'm still new to ZK. By the way Henri thanks for the smalltalks they are super helpful, I found the answer in this one http://www.zkoss.org/smalltalks/paypal1/paypal1.html
Here is the code I'm now using if anyone else can benefit from it, hopefully I don't need html for anything else
ZUL:
<window id="win" use="com.twinstorm.property.ui.login.LoginWindow">
<groupbox mold="3d" width="100%">
<caption label="Login"/>
<vbox>
<grid id="gb">
<rows>
<row>
Username:
<textbox id="username" constraint="no empty"/>
</row>
<row>
Pssword:
<textbox id="password" constraint="no empty"/>
</row>
</rows>
</grid>
<hbox align="end">
<button label="Login" onClick="win.doLogin(username.getValue(),
password.getValue())"/>
</hbox>
</vbox>
</groupbox>
</window>
Window:
public class LoginWindow extends Window {
public void doLogin(String username, String password) {
Form form = new Form();
form.setDynamicProperty("action", "/j_acegi_security_check");
form.setDynamicProperty("method", "post");
form.setPage(this.getPage());
createInput(form, "hidden", "j_username", username);
createInput(form, "hidden", "j_password", password);
Clients.submitForm(form);
}
private void createInput(Form form, String type, String name, String value) {
Input input = new Input();
input.setParent(form);
input.setDynamicProperty("type", type);
input.setDynamicProperty("name", name);
input.setValue(value);
}
}
Thanks,
Andre
I've been struggling with the same problem. I was by adopting Andre's cool solution but I've tried to include language namespace attribute to the tag zk instead of h:form and it worked!
before:
<zk>
after:
<zk xmlns:h="http://www.w3.org/1999/xhtml">
before:
<h:form id="f" name="f" action="j_spring_security_check" method="POST" xmlns:h="http://www.w3.org/1999/xhtml">
after:
<h:form id="f" name="f" action="j_spring_security_check" method="POST" >
I hope someone may still find it useful!
Greetings!
Miguel
I got the same problem, so I did what miguelius suggested: moving the namespace declaration from the <h:form> element to <zk>. However, the namespace xmlns:h="http://www.w3.org/1999/xhtml" didn't work, I had to use xmlns:h="http://www.zkoss.org/2005/zk/native" instead. For instance,
<zk xmlns:h="http://www.zkoss.org/2005/zk/native"> <h:h1 style="text-align: center"> Hello world! </h:h1> </zk>
Hi dpino
I have try below sample on ZK demo
<zk xmlns:h="http://www.w3.org/1999/xhtml"> <h:h1 style="text-align: center"> Hello world! </h:h1> </zk>
Asked: 2008-02-19 20:17:25 +0800
Seen: 1,489 times
Last updated: Oct 27 '11