Hi, I included the menu in a page that is within a library, and the menu thrown javascript errors. I've taken a look at the resulting javascript code, and the problem appears to be the unique id generated by the menu, because it includes a ':' character between the library id and the page id. I'm going to import the source code and modify it, but I'd like to see the problem fixed in an official release.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Of course as soon as you send me a patch I will make it a release, because it is a pretty disturbing bug.
Recently I learned that there is actually some (kind of well-hidden) little API in Tapestry of how to create unique ids and how to put them on the request cycle.
Tapestry learning curve never ends.
thank you very much for active helping
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made a formal bug report, made the changes in the code and I am going to release it now.
However I didn't test the changes you suggested.
Thanks again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I included the menu in a page that is within a library, and the menu thrown javascript errors. I've taken a look at the resulting javascript code, and the problem appears to be the unique id generated by the menu, because it includes a ':' character between the library id and the page id. I'm going to import the source code and modify it, but I'd like to see the problem fixed in an official release.
Of course as soon as you send me a patch I will make it a release, because it is a pretty disturbing bug.
Recently I learned that there is actually some (kind of well-hidden) little API in Tapestry of how to create unique ids and how to put them on the request cycle.
Tapestry learning curve never ends.
thank you very much for active helping
Hi, I'm posting the change I've made (they are marked in bold)
protected void renderComponent(IMarkupWriter wr, IRequestCycle cyc) {
if(trace){
startTime = System.currentTimeMillis();
}
String prefix = getPrefix();
String uniqueID = TapestryUtils.convertTapestryIdToNMToken(getExtendedId() + "/divId").replaceAll("[/\\.]", "_");
<b>uniqueID = uniqueID.replace(':', '_');</b>
String nodePropertiesUniqueID = "NP" + uniqueID;
I'm afraid it was not marked as bold at all, but its only the line with the following code:
uniqueID = uniqueID.replace(':', '_');
That's the solution, because the '_' character can be part of a valid javascript identifier and ':' couldn't.
I made a formal bug report, made the changes in the code and I am going to release it now.
However I didn't test the changes you suggested.
Thanks again.