Author: nbelaevski
Date: 2007-10-15 18:11:20 -0400 (Mon, 15 Oct 2007)
New Revision: 3386
Modified:
branches/3.1.x/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java
branches/3.1.x/samples/jQuery-sample/src/main/webapp/jQuery.xhtml
Log:
jQuery escapement for : in id selectors added
sample switched to h:form
Modified:
branches/3.1.x/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java
===================================================================
---
branches/3.1.x/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java 2007-10-15
21:57:50 UTC (rev 3385)
+++
branches/3.1.x/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java 2007-10-15
22:11:20 UTC (rev 3386)
@@ -70,7 +70,7 @@
if (target != null) {
matcher.appendReplacement(sb, "#"
- + target.getClientId(context));
+ + target.getClientId(context).replaceAll(":",
"\\\\\\\\\\\\\\\\:"));
}
}
}
Modified: branches/3.1.x/samples/jQuery-sample/src/main/webapp/jQuery.xhtml
===================================================================
--- branches/3.1.x/samples/jQuery-sample/src/main/webapp/jQuery.xhtml 2007-10-15 21:57:50
UTC (rev 3385)
+++ branches/3.1.x/samples/jQuery-sample/src/main/webapp/jQuery.xhtml 2007-10-15 22:11:20
UTC (rev 3386)
@@ -10,7 +10,7 @@
<f:view contentType="text/html" >
<body>
- <form id="form">
+ <h:form id="form">
<h:panelGrid id="menu" columns="1">
<h:graphicImage
value="http://images.businessweek.com/tc/reviews/icons/game_50x50.gi... />
@@ -25,7 +25,7 @@
<rich:jQuery selector="#menu img" timing="onload"
query="mouseover(function(){makeFat(this,{ewidth:'120px'});})" />
<rich:jQuery selector="#menu img" timing="onload"
query="mouseout(function(){makeThin(this);})" />
- </form>
+ </h:form>
</body>
</f:view>
</html>