0

org.zkoss.zk.ui.UiException: Html must be the root component, not ...

asked 2011-08-23 13:38:20 +0800

soumaya gravatar image soumaya
99 1

updated 2011-08-23 13:39:35 +0800

Hi,

I am trying to migrate my application from zk3.6 to zk5.0 but I am getting the following error:org.zkoss.zk.ui.UiException: Html must be the root component, not <LegendeWindow LastpositionWindow>.
Below is a piece of my code.

Thanks for any help


<zk>
<?link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"?>
<?link rel="stylesheet" href="css/zkmenu.css"?>
<window id="LastWindow" use="mypack.LegendeWindow" >

<div align="left">	
	<groupbox id="gb" mold="3d" width="200px" closable="true" open="false" draggable="true">
	<caption label="Légende" sclass="mycap1"/>
	<hbox>
	<listbox id="legende"  onCreate="LastWindow.showLegende()" multiple="true"  sclass="mylist">   
            <listhead sclass="mylist" >            
                  
					<listheader label="Machines" width="30%" sort="auto" sclass="mylist"/>
				
			
            </listhead>            
             
     </listbox>
	</hbox>

	</groupbox>
</div>
		<html xmlns="http://www.w3.org/1999/xhtml">
		
			<![CDATA[
				
				<head>
				<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 
	

				</head>
				<body onload="Init()" id="dt_example">
				
			
			
		</html>


	</window>
</zk>

delete flag offensive retag edit

5 Replies

Sort by » oldest newest

answered 2011-08-25 19:47:41 +0800

samchuang gravatar image samchuang
4084 4

Hi

I don't think you can put meta using "html" tag, try to use header and meta

also refer to Processing Instructions

link publish delete flag offensive edit

answered 2011-11-21 14:51:21 +0800

priya gravatar image priya
12

Hi,

Even i am facing the same issue when tried to migrate from Zk 3 to Zk 5 .Please any body lets us know how to resolve it.

link publish delete flag offensive edit

answered 2011-11-21 20:50:52 +0800

soumaya gravatar image soumaya
99 1

Hi Priya,

Try your code just with the tag <html> without declaring the namespace.

link publish delete flag offensive edit

answered 2011-11-22 07:35:29 +0800

priya gravatar image priya
12

The Test zul page is as below.When tried with ZK 5 its giving
org.zkoss.zk.ui.UiException: Html must be the root component, not <Window win>
org.zkoss.zhtml.Html.beforeParentChanged(Html.java:70)

I replaced zcommon.jar,zcommons-el.jar,zhtml.jar,zk.jar,zkplus.jar,zul.jar,zuljsp.jar,zweb.jar,bsh.jar

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>
<?page id = "pagid" title = "New page"?>
<html>
<zk>
<style src = "/css/styleSheet_New.css"/>

<p:window id = "win" xmlns = "http://www.w3.org/1999/xhtml"
                             xmlns:p="http://www.zkoss.org/2005/zul"
                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd " use = "">


<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta http-equiv="pragma" content="no-cache" />
<title>Zk page</title>
</head>
<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h2>Test Page</h2></td>
  </tr>
  <tr>
   <p:textbox/>
 </tr> 
</table>
</body>
</html>
</p:window>
</zk>
</html>

link publish delete flag offensive edit

answered 2011-11-30 00:48:20 +0800

samchuang gravatar image samchuang
4084 4

Hi

you shall use native component

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: 2011-08-23 13:38:20 +0800

Seen: 855 times

Last updated: Nov 30 '11

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