0

One zul Include same zul,shows repeated uuid error

asked 2015-07-28 01:13:09 +0800

yu95274 gravatar image yu95274
1

updated 2015-07-28 05:04:30 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

test_id.zul:

<?page title="IdTest" contentType="text/html;charset=UTF-8"?>
<zk xmlns:h="http:www.w3.org1999xhtml">
<window height="100%" width="100%">
    <div>
        <include src="/test/btn_add.zul"></include>
        <include src="/test/btn_add.zul"></include>
    </div>
</window>
</zk>

btn_add.zul:

<?page title="测试ID唯一" contentType="text/html;charset=UTF-8"?>
<zk xmlns:h="http:www.w3.org1999xhtml">
<window height="100%" width="100%">
    <div>
        <h:input id="btnAdd" type="button" value="add"></h:input>
    </div>
</window>
</zk>

error: Replicated UUID is not allowed for class org.zkoss.zhtml.Input: btnAdd

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-07-28 05:08:26 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

Hi there,

I created a fiddle, but I'm unable to reproduce your problem.

What I did notice is that your xmlns:h is not correct, so I corrected it to native.

This error may not be happening because include implements the IdSpace interface, what means every id under that components can have same id as some component above that.

If you still have that error, can it be that you use your own implementation of the IdGenerator?
If yes, you have to correct some things there.

Otherwise, can you alter the fiddle so your problem is showing there?

Greetz Chill.

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: 2015-07-28 01:13:09 +0800

Seen: 19 times

Last updated: Jul 28 '15

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