Author: kien_nguyen
Date: 2010-11-29 20:51:11 -0500 (Mon, 29 Nov 2010)
New Revision: 5363
Modified:
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
Log:
GTNPORTAL-1654 Checkbox selection is lost with paginator when add gadget or portlet in
categories
Modified:
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
===================================================================
---
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2010-11-29
22:51:54 UTC (rev 5362)
+++
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2010-11-30
01:51:11 UTC (rev 5363)
@@ -144,6 +144,11 @@
break;
case "checkbox":
+ if(element.checked)
+ this.addField(element.name, "true");
+ else
+ this.addField(element.name, "false");
+ break;
case "radio":
if(element.checked) this.addField(element.name, element.value);
break;
Modified:
portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-11-29
22:51:54 UTC (rev 5362)
+++
portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-11-30
01:51:11 UTC (rev 5363)
@@ -114,13 +114,16 @@
{
if (!isEnable())
return;
- if (input == null)
- checked = false;
- else
- checked = true;
- if (typeValue_ == Boolean.class || typeValue_ == boolean.class)
- {
- value_ = typeValue_.cast(checked);
+
+ if (input != null) {
+ if(input.equals("true"))
+ checked = true;
+ else
+ checked = false;
+ if (typeValue_ == Boolean.class || typeValue_ == boolean.class)
+ {
+ value_ = typeValue_.cast(checked);
+ }
}
}
Show replies by date