Author: phuong_vu
Date: 2010-09-29 06:32:25 -0400 (Wed, 29 Sep 2010)
New Revision: 4429
Added:
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/java/org/exoplatform/portal/config/serialize/JibxStringSerialize.java
Modified:
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/resources/binding.xml
Log:
GTNPORTAL-1469 content of page-reference element in navigation.xml should be trimmed when
read in
Added:
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/java/org/exoplatform/portal/config/serialize/JibxStringSerialize.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/java/org/exoplatform/portal/config/serialize/JibxStringSerialize.java
(rev 0)
+++
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/java/org/exoplatform/portal/config/serialize/JibxStringSerialize.java 2010-09-29
10:32:25 UTC (rev 4429)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,
see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.portal.config.serialize;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : Vu Viet Phuong
+ * phuong_vu(a)exoplatform.com
+ * Sep 29, 2010
+ */
+public class JibxStringSerialize
+{
+ public static String deserializeString(String untrimmed)
+ {
+ if (untrimmed == null)
+ {
+ return null;
+ }
+ return untrimmed.trim();
+ }
+}
Modified:
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/resources/binding.xml
===================================================================
---
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/resources/binding.xml 2010-09-29
10:16:38 UTC (rev 4428)
+++
portal/branches/branch-GTNPORTAL-1493/component/portal/src/main/resources/binding.xml 2010-09-29
10:32:25 UTC (rev 4429)
@@ -97,7 +97,8 @@
<value name="start-publication-date"
field="startPublicationDate" usage="optional"/>
<value name="end-publication-date" field="endPublicationDate"
usage="optional"/>
<value name="visibility" field="visibility"
usage="optional" default="DISPLAYED"/>
- <value name="page-reference" field="pageReference"
usage="optional"/>
+ <value name="page-reference" field="pageReference"
usage="optional"
+
deserializer="org.exoplatform.portal.config.serialize.JibxStringSerialize.deserializeString"/>
<collection field="children" usage="optional"
item-type="org.exoplatform.portal.config.model.PageNode"/>
</mapping>
@@ -146,6 +147,5 @@
<collection field="preferences"
item-type="org.exoplatform.portal.application.Preference"/>
<structure name="preferences-validator" usage="optional"/>
- </mapping>
-
+ </mapping>
</binding>