-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I've configure the zk.xml with the new config, as of 3.6.1, to use selenium more easily. I want the generated id to be the component id prefixed with _zid_:
<desktop-config> <id-to-uuid-prefix>_zid_</id-to-uuid-prefix> </desktop-config>
After I did this configuration when I try to access any page that have my macro component I get this error and the page is not loaded:
org.zkoss.zk.ui.UiException: Replicated UUID is not allowed for class org.zkoss.zul.Bandbox: _zid_sbbText
This is the macro component:
<bandbox id="sbbText" ctrlKeys="#up#down" autodrop="${empty arg.autodrop ? true : arg.autodrop}" cols="${empty arg.cols ? 10 : arg.cols}"> <bandpopup width="${empty arg.listWidth ? '200px' : arg.listWidth}"> <listbox id="sbbListBox" oddRowSclass="${arg.oddRowSclass}"/> </bandpopup> </bandbox> <textbox id="sbbSelectedBox" readonly="true" width="${empty arg.selectedBoxWidth ? '100px' : arg.selectedBoxWidth}" value="${arg.selectedText}" constraint="${empty arg.constraint ? '' : arg.constraint}"/>
Why it doesn't work? How could I solve this?
Regards,
Felipe Cypriano
if you have the macro instances on different pages, you could configure your zk.xml to prefix the id with the used page id, like this:
<desktop-config> <id-to-uuid-prefix>_zid_${page}_</id-to-uuid-prefix> </desktop-config>
but if you have the more than one instance of the macro on the same page, then you'll bump into the same problem.
I believe that this should be a feature request to improve the id-to-uuid to be able to prefix with the root component id, or something like that.
Let's see what zk team says about it.
Madruga
Yes, I've more than one instance of the macro component on the same page.
And the ${page} doesn't solve the problem either because the components are create dynamically on the same page using Execute.createComponents().
Prefix the component name with the parent's id is a good idea and should solve all problems related to it.
Felipe Cypriano
I've created a feature request ID 2815777
Asked: 2009-07-01 19:58:14 +0800
Seen: 697 times
Last updated: Apr 25 '22