ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Zul Visual Editor "Fail to render"

ninekays
31 Jan 2012 01:04:25 GMT
31 Jan 2012 01:04:25 GMT

Hello all,


I've got a simple ZUL to edit, and the Zul Visual Editor displays the following message:

Fail to render: org/springframework/beans/factory/BeanNotOfRequiredTypeException

My zul is as simple as follow:

<?xml version="1.0" encoding="UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<zk xmlns="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">

    <include src="/users/user-list.zul"/>
</zk>

The file "/users/user-list.zul" can be previewed by Zul Visual Editor without problem. The code is as follow

<?xml version="1.0" encoding="UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<zk xmlns="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">

	<window title="User List" width="300px" border="normal">
		<panel id="pnlUserList" apply="${userListController}"
			width="100p%" >
			<panelchildren>
				<listbox id="lbxUserList"
					model="@{userListController.allUsers}" multiple="true">
					<listhead>
						<listheader label="Username" width="45%" />
						<listheader label="Last login" width="55%" />
					</listhead>
					<listitem self="@{each='user'}" value="@{user}">
						<listcell label="@{user.username}"  />
						<listcell label="@{user.lastLogin}" />
					</listitem>
				</listbox>
			</panelchildren>
		</panel>

		<panel id="pnlButtons">
			<panelchildren style="float: right;">
				<hlayout>
					<button id="btnAddUser" label="Add"
						href="/users/add-user.zul" />
					<button id="btnDeleteUser" label="Delete" />
				</hlayout>
			</panelchildren>
		</panel>

	</window>

</zk>

As you can see, I use Zk Spring and the Fail to Render error message refers to Spring libraries. If I run the app on tomcat, it works ok without problems.

So, my question is: is this a bug?