-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello, people!
I want to run the following code:
<zk xmlns:h="xhtml">
<div viewModel="@id('jlm') @init('user.jobengine.zk.model.JobFlowChartModel')">
<h:div id="chart_container">
<h:div class="flowchart-example-container" id="flowchartworkspace" />
</h:div>
</div>
</zk>
, but I get a UiException:
org.zkoss.zk.ui.UiException: Replicated UUID is not allowed for class org.zkoss.zhtml.Div: chart_container
Can someone please support on this?
Hi there,
ZK components (default zul namespace) have both a UUID and a ID attribute. The ZK component ID is an internal value, which is not directly available on the DOM node at client-side.
The ZK Component UUID is an automatically generated value which acts as unique identifier for one instance of a component.
With the zhtml/xhtml namespace however, things are a little different. If you define a "ID" on a zhtml component, it will be added to the DOM node of the resulting object, as an id="foo" attribute. This means that while a ZK component ID can be repeated (as long as they are unique in their IDSpace), a xhtml component ID has to be unique page-wide.
Looks like you are creating more than one copy of that div:
<h:div id="chart_container">
It could be that you are instantiating more copies of the same template, or that you are creating duplicates in a different way.
Asked: 2022-04-21 18:41:05 +0800
Seen: 5 times
Last updated: Apr 25
ZK8 Features for MVC - Shadow Elements
The imageCaption of css is not work when open first time on Firefox
zk chart with JFreeChartEngine
Sync grid column visible state in client/server side when show/hide column through menupopup
A scrollbar error occurs when using the Listbox List Group
Render On Demand ROD how to catch event onRender from listitem