0

Problem with include

asked 2011-09-15 02:53:56 +0800

chw gravatar image chw
24 1

Hey folks,

I try to include the following file

FILE: taskBoardPanels.zul

<zk:zk xmlns="http://www.zkoss.org/2005/zk/native"
	xmlns:zul="http://www.zkoss.org/2005/zul"
    xmlns:zk="http://www.zkoss.org/2005/zk">
    
	<zul:panel height="120px" id="${arg.task.id}" title="${arg.task.titel}" border="normal"
		collapsible="true" closable="true" maximizable="false" apply="${taskBoardPanelCtrl}"
		style="margin-bottom:10px" draggable="true">
	         
	    <zul:panelchildren>
	    	<zul:textbox multiline="true" width="100%" style="margin:0px" value="${arg.task.description}" readonly="true"/>
		</zul:panelchildren>
	</zul:panel>
</zk:zk>


in my page. Here the code snippet where I call include.

FILE: taskBoardView.zul

...
<zul:div onClick="" apply="${taskBoardCtrl}" 
	self="@{action(value='addNewTask', when='onClick')}" droppable="true">
	<zul:grid unless="${empty notStartedTasks}">
		<zul:columns>
			<zul:column></zul:column>
		</zul:columns>
		<zul:rows>
			<zul:row forEach="${notStartedTasks}" value="${each}">
				<include mode="instant" src="~./taskBoardPanels.zul" task="${each}"/>
			</zul:row>
		</zul:rows>
	</zul:grid>
</zul:div>
...

If I deploy my app and open the page taskBoardView.zul I see with the help of firebug for each "notStartedTasks" a HTML row tag

<tr id="aUxP70" class="z-row">
<tr id="aUxP90" class="z-row z-grid-odd">
<tr id="aUxPb0" class="z-row">

But unfortunatelly the includes inside are not resolved

<tr id="aUxP70" class="z-row">
<td id="aUxP80-chdextr" class="z-row-inner">
<div id="aUxP80-cell" class="z-row-cnt z-overflow-hidden">
<include task="de.ppi.domain.Task@3d4817" src="~./taskBoardPanels.zul" mode="instant"></include>
</div>
</td>
</tr>

No panel is displayed. Could anybody help me with this little problem?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-09-15 04:53:20 +0800

chw gravatar image chw
24 1

I've found the answer myself. I forgot to set the namespace in front of the include.

...
<zul:include mode="instant" src="~./taskBoardPanels.zul" task="${each}"/>
...

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-09-15 02:53:56 +0800

Seen: 171 times

Last updated: Sep 15 '11

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