From: <fg...@us...> - 2009-05-11 17:22:26
|
Revision: 1197 http://openutils.svn.sourceforge.net/openutils/?rev=1197&view=rev Author: fgiust Date: 2009-05-11 17:22:11 +0000 (Mon, 11 May 2009) Log Message: ----------- fix multivalues in ConfigurableFreemarkerDialog Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java trunk/openutils-mgnlcontrols/src/site/changes/changes.xml Modified: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2009-05-08 21:09:17 UTC (rev 1196) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2009-05-11 17:22:11 UTC (rev 1197) @@ -31,12 +31,10 @@ import java.io.IOException; import java.io.Writer; -import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; import javax.jcr.PathNotFoundException; @@ -68,39 +66,6 @@ private String uuid; /** - * {@inheritDoc} - */ - @Override - protected List readValues() - { - - List values = new ArrayList(); - - if (this.getStorageNode() != null) - { - try - { - // cycles on website content node to get multiple value - int size = this.getStorageNode().getContent(this.getName()).getNodeDataCollection().size(); - for (int i = 0; i < size; i++) - { - NodeData data = this.getStorageNode().getContent(this.getName()).getNodeData("" + i); - values.add(data.getString()); - } - } - catch (PathNotFoundException e) - { - // not yet existing: OK - } - catch (RepositoryException re) - { - log.error("can't set values", re); - } - } - return values; - } - - /** * Get a recursive map view of a content node * @param node content node * @return recursive map view on content node properties and children @@ -177,6 +142,8 @@ parameters.put("configuration", this.configuration); parameters.put("uuid", this.uuid); parameters.put("alreadyrendered", getRequest().getAttribute(alreadyRenderedKey) != null); + addToParameters(parameters); + this.drawHtmlPre(out); try @@ -199,6 +166,11 @@ getRequest().setAttribute(alreadyRenderedKey, Boolean.TRUE); } + protected void addToParameters(Map parameters) + { + // do nothing, can be user in subclasses + } + /** * @return ftl template path */ Modified: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2009-05-08 21:09:17 UTC (rev 1196) +++ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2009-05-11 17:22:11 UTC (rev 1197) @@ -8,13 +8,19 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> + <release version="4.0.1" date="in svn" description=""> + <action type="add" dev="fgiust">Added a new mehod addToParameters in ConfigurableFreemarkerDialog that can be + overridden to supply custom values to the freemarker template</action> + <action type="fix" dev="fgiust">Update handling of multi-value properties in ConfigurableFreemarkerDialog to + magnolia 4.0</action> + </release> <release version="4.0" date="2009-04-09" description=""> <action type="update" dev="fgiust">Update magnolia dependencies to version 4.0.</action> <action type="fix" dev="fgiust">Fixed bug for column size on ie6 (see http://extjs.com/forum/showthread.php?p=151624 )</action> - <action type="new" dev="fgiust">Added functionality to move rows in grid</action> - <action type="new" dev="fgiust">New "date" type in grid</action> - <action type="new" dev="fgiust">Misc fixes to "clear all" and "paste" features</action> + <action type="add" dev="fgiust">Added functionality to move rows in grid</action> + <action type="add" dev="fgiust">New "date" type in grid</action> + <action type="add" dev="fgiust">Misc fixes to "clear all" and "paste" features</action> </release> <release version="3.5.5" date="2008-07-29" description=""> <action type="fix" dev="fgiust">grid control now works properly also with fields containing non-standard chars in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |