Author: nbelaevski
Date: 2010-12-20 15:43:19 -0500 (Mon, 20 Dec 2010)
New Revision: 20701
Modified:
branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java
branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
Log:
Merged fixes for:
-
https://issues.jboss.org/browse/RF-10057
- 'unload' event caused exception in message.js
Modified:
branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java
===================================================================
---
branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java 2010-12-20
18:13:50 UTC (rev 20700)
+++
branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java 2010-12-20
20:43:19 UTC (rev 20701)
@@ -33,7 +33,7 @@
Map<String, String> requestParamMap =
facesContext.getExternalContext().getRequestParameterMap();
String dragSourceId = (String) requestParamMap.get("dragSource");
- if(!"".equals(dragSourceId)) {
+ if(dragSourceId !=null && !"".equals(dragSourceId)) {
DragSourceContextCallBack dragSourceContextCallBack = new
DragSourceContextCallBack();
facesContext.getViewRoot().invokeOnComponent(facesContext, dragSourceId,
dragSourceContextCallBack);
Modified:
branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
===================================================================
---
branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2010-12-20
18:13:50 UTC (rev 20700)
+++
branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2010-12-20
20:43:19 UTC (rev 20701)
@@ -22,7 +22,7 @@
__bindEventHandlers: function () {
},
destroy: function () {
- rf.Event.unbind(this.id, this.namespace);
+ rf.Event.unbindById(this.id, this.namespace);
$super.destroy.call(this);
}
});
Modified:
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
===================================================================
---
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20
18:13:50 UTC (rev 20700)
+++
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20
20:43:19 UTC (rev 20701)
@@ -34,13 +34,13 @@
protected Builder createQunitPage() {
return
Qunit.builder().emulate(BrowserVersion.FIREFOX_3_6).loadJsfResource("jquery.js").loadJsfResource("richfaces.js")
.loadJsfResource("richfaces-event.js").loadJsfResource("richfaces-base-component.js").
- loadJsfResource("csv.js",
"org.richfaces").loadJsfResource("message.js",
"org.richfaces").content(/*"<form id=\"form\"
name=\"form\" method=\"post\" action=\"/client-test.jsf\"
enctype=\"application/x-www-form-urlencoded\">\n" + */
+ loadJsfResource("csv.js",
"org.richfaces").loadJsfResource("message.js",
"org.richfaces").content("<form id=\"form\"
name=\"form\" method=\"post\" action=\"/client-test.jsf\"
enctype=\"application/x-www-form-urlencoded\">\n" +
" <input type=\"hidden\" name=\"form\"
value=\"form\"/>\n" +
" <input id=\"form:text\" type=\"text\"
name=\"form:text\" value=\"fooValue\"
onblur=\"form_3Atext_3Av("form:text",this,event)\"/>\n"
+
" <span id=\"form:out\">\n" +
" fooValue\n" +
" </span><div id=\"foo\" ><ul
id=\"" + MY_MESSAGE +
"\">"+getMessageContent()+"</ul></div><input
type=\"hidden\" name=\"javax.faces.ViewState\"
id=\"javax.faces.ViewState\"
value=\"4262028796446907996:-2607792463910755035\"
autocomplete=\"off\"/>\n"
- /*+ " </form>"*/);
+ + " </form>");
}