0

Replicated UUID is not allowed

asked 2022-04-21 18:41:05 +0800

Omcsesz gravatar image Omcsesz
1

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?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-25 16:33:29 +0800

MDuchemin gravatar image MDuchemin
2146 1 5
ZK Team

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.

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2022-04-21 18:41:05 +0800

Seen: 5 times

Last updated: Apr 25

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