Author: hfnukal
Date: 2011-07-04 12:01:19 -0400 (Mon, 04 Jul 2011)
New Revision: 6813
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
Log:
JBEPP-631 Checkbox selection is lost with paginator when add gadget or portlet in
categories
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2011-07-04
15:47:37 UTC (rev 6812)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2011-07-04
16:01:19 UTC (rev 6813)
@@ -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:
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2011-07-04
15:47:37 UTC (rev 6812)
+++
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2011-07-04
16:01:19 UTC (rev 6813)
@@ -118,13 +118,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