|
From: <fg...@us...> - 2008-05-05 23:13:35
|
Revision: 809
http://openutils.svn.sourceforge.net/openutils/?rev=809&view=rev
Author: fgiust
Date: 2008-05-05 16:11:37 -0700 (Mon, 05 May 2008)
Log Message:
-----------
[maven-release-plugin] copy for tag openutils-mgnlstripes-3.5
Added Paths:
-----------
tags/openutils-mgnlstripes-3.5/
tags/openutils-mgnlstripes-3.5/pom.xml
tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java
tags/openutils-mgnlstripes-3.5/src/main/resources/META-INF/mgnlstripes.tld
tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt
tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml
Removed Paths:
-------------
tags/openutils-mgnlstripes-3.5/pom.xml
tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java
tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedLabelTag.java
tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedMessagesTag.java
tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt
tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml
Copied: tags/openutils-mgnlstripes-3.5 (from rev 806, trunk/openutils-mgnlstripes)
Deleted: tags/openutils-mgnlstripes-3.5/pom.xml
===================================================================
--- trunk/openutils-mgnlstripes/pom.xml 2008-04-29 12:54:36 UTC (rev 806)
+++ tags/openutils-mgnlstripes-3.5/pom.xml 2008-05-05 23:11:37 UTC (rev 809)
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils</artifactId>
- <version>8</version>
- <relativePath>..</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
- <artifactId>openutils-mgnlstripes</artifactId>
- <name>openutils-mgnlstripes</name>
- <version>3.5-SNAPSHOT</version>
- <licenses>
- <license>
- <name>GPLv3</name>
- <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
- </license>
- </licenses>
- <build>
- <resources>
- <resource>
- <filtering>false</filtering>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <filtering>true</filtering>
- <directory>src/main/resources</directory>
- <includes>
- <include>META-INF/magnolia/*</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.stripes</groupId>
- <artifactId>stripes</artifactId>
- <version>1.4.3</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>info.magnolia</groupId>
- <artifactId>magnolia-core</artifactId>
- <version>3.5.4</version>
- </dependency>
- <dependency>
- <groupId>info.magnolia</groupId>
- <artifactId>magnolia-module-admininterface</artifactId>
- <version>3.5.4</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- <version>5.7</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <repositories>
- <repository>
- <id>repository.magnolia.info</id>
- <name>magnolia repository</name>
- <url>http://repo.magnolia.info/m2</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-</project>
Copied: tags/openutils-mgnlstripes-3.5/pom.xml (from rev 808, trunk/openutils-mgnlstripes/pom.xml)
===================================================================
--- tags/openutils-mgnlstripes-3.5/pom.xml (rev 0)
+++ tags/openutils-mgnlstripes-3.5/pom.xml 2008-05-05 23:11:37 UTC (rev 809)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>8</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+ <artifactId>openutils-mgnlstripes</artifactId>
+ <name>openutils-mgnlstripes</name>
+ <version>3.5</version>
+ <licenses>
+ <license>
+ <name>GPLv3</name>
+ <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
+ </license>
+ </licenses>
+ <build>
+ <resources>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>META-INF/magnolia/*</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.stripes</groupId>
+ <artifactId>stripes</artifactId>
+ <version>1.4.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-core</artifactId>
+ <version>3.5.4</version>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-module-admininterface</artifactId>
+ <version>3.5.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.7</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>repository.magnolia.info</id>
+ <name>magnolia repository</name>
+ <url>http://repo.magnolia.info/m2</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <scm>
+ <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-3.5</connection>
+ <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-3.5</developerConnection>
+ <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-3.5</url>
+ </scm>
+</project>
Deleted: tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java 2008-04-29 12:54:36 UTC (rev 806)
+++ tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java 2008-05-05 23:11:37 UTC (rev 809)
@@ -1,63 +0,0 @@
-/**
- * Copyright Openmind http://www.openmindonline.it
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 it.openutils.magnoliastripes.tag;
-
-import net.sourceforge.stripes.exception.StripesJspException;
-import net.sourceforge.stripes.tag.FormTag;
-
-
-/**
- * @author fgiust
- * @version $Id: $
- */
-public class ExtendedFormTag extends FormTag
-{
-
- /**
- * Sets the 'action' attribute by inspecting the bean class provided and asking the current ActionResolver what the
- * appropriate URL is.
- * @param beanclass the Strin FQN of the class, or a Class representing the class
- * @throws StripesJspException if the URL cannot be determined for any reason, most likely because of a mis-spelled
- * class name, or a class that's not an ActionBean
- */
- @Override
- public void setBeanclass(Object beanclass) throws StripesJspException
- {
- String url = getActionBeanUrl(beanclass);
- if (url == null)
- {
- throw new StripesJspException("Could not determine action from 'beanclass' supplied. "
- + "The value supplied was '"
- + beanclass
- + "'. Please ensure that this bean type "
- + "exists and is in the classpath. If you are developing a page and the ActionBean "
- + "does not yet exist, consider using the 'action' attribute instead for now.");
- }
- else
- {
- String currentAction = get("action");
-
- setAction(url);
-
- if (currentAction != null)
- {
- set("action", currentAction);
- }
- }
- }
-}
Copied: tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java (from rev 807, trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java)
===================================================================
--- tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java (rev 0)
+++ tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedFormTag.java 2008-05-05 23:11:37 UTC (rev 809)
@@ -0,0 +1,67 @@
+/**
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 it.openutils.magnoliastripes.tag;
+
+import net.sourceforge.stripes.exception.StripesJspException;
+import net.sourceforge.stripes.tag.FormTag;
+
+
+/**
+ * <p>
+ * workaround needed to create a form tag with an "url" attribute different from the actionbean mapped uri. Could be
+ * solved more cleanly by http://mc4j.org/jira/browse/STS-349, which will be available in stripes 1.5
+ * </p>
+ * @author fgiust
+ * @version $Id: $
+ */
+public class ExtendedFormTag extends FormTag
+{
+
+ /**
+ * Sets the 'action' attribute by inspecting the bean class provided and asking the current ActionResolver what the
+ * appropriate URL is.
+ * @param beanclass the Strin FQN of the class, or a Class representing the class
+ * @throws StripesJspException if the URL cannot be determined for any reason, most likely because of a mis-spelled
+ * class name, or a class that's not an ActionBean
+ */
+ @Override
+ public void setBeanclass(Object beanclass) throws StripesJspException
+ {
+ String url = getActionBeanUrl(beanclass);
+ if (url == null)
+ {
+ throw new StripesJspException("Could not determine action from 'beanclass' supplied. "
+ + "The value supplied was '"
+ + beanclass
+ + "'. Please ensure that this bean type "
+ + "exists and is in the classpath. If you are developing a page and the ActionBean "
+ + "does not yet exist, consider using the 'action' attribute instead for now.");
+ }
+ else
+ {
+ String currentAction = get("action");
+
+ setAction(url);
+
+ if (currentAction != null)
+ {
+ set("action", currentAction);
+ }
+ }
+ }
+}
Deleted: tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedLabelTag.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/tag/ExtendedLabelTag.java 2008-04-29 12:54:36 UTC (rev 806)
+++ tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedLabelTag.java 2008-05-05 23:11:37 UTC (rev 809)
@@ -1,276 +0,0 @@
-/**
- * Copyright Openmind http://www.openmindonline.it
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 it.openutils.magnoliastripes.tag;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.jsp.JspException;
-
-import net.sourceforge.stripes.action.ActionBean;
-import net.sourceforge.stripes.controller.ParameterName;
-import net.sourceforge.stripes.exception.StripesJspException;
-import net.sourceforge.stripes.tag.InputLabelTag;
-import net.sourceforge.stripes.validation.Validate;
-import net.sourceforge.stripes.validation.ValidateNestedProperties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * @author molaschi
- * @version $Id: $
- */
-public class ExtendedLabelTag extends InputLabelTag
-{
-
- /**
- * Logger.
- */
- private Logger log = LoggerFactory.getLogger(ExtendedLabelTag.class);
-
- boolean nameSet = false;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setName(String name)
- {
- // TODO Auto-generated method stub
- super.setName(name);
- this.nameSet = true;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int doEndInputTag() throws JspException
- {
- try
- {
- String label = getLocalizedFieldName();
- String fieldName = getAttributes().remove("name");
-
- if (label == null)
- {
- label = getBodyContentAsString();
- }
-
- if (label == null)
- {
- label = "Label could not find localized field name and had no body.";
- }
-
- if (isRequiredField(this.getActionBean(), fieldName))
- {
- String cssClass = get("class");
- if (cssClass != null)
- {
- set("class", cssClass + " required");
- }
- else
- {
- set("class","required");
- }
- }
-
- // Write out the tag
- writeOpenTag(getPageContext().getOut(), "label");
- getPageContext().getOut().write(label);
- writeCloseTag(getPageContext().getOut(), "label");
-
- // Reset the field name so as to not screw up tag pooling
- if (this.nameSet)
- {
- super.setName(fieldName);
- }
-
- set("class", null);
-
- return EVAL_PAGE;
- }
- catch (IOException ioe)
- {
- throw new StripesJspException("Encountered an exception while trying to write to "
- + "the output from the stripes:label tag handler class, InputLabelTag.", ioe);
- }
- }
-
- protected boolean isRequiredField(ActionBean bean, String name)
- {
-
- ParameterName param = new ParameterName(name);
- boolean isIndexed = param.isIndexed();
-
- Map<String, Validate> validationInfos = getValidations(bean.getClass());
-
- if (validationInfos != null)
- {
-
- for (Map.Entry<String, Validate> entry : validationInfos.entrySet())
- {
- String propertyName = entry.getKey();
- Validate validationInfo = entry.getValue();
-
- if (name.equals(propertyName) && validationInfo.required() && !isIndexed)
- {
- return true;
- }
- }
- }
-
- if (isIndexed)
- {
-
- Validate validationInfo = validationInfos.get(param.getStrippedName());
-
- if (validationInfo != null && validationInfo.required())
- {
- return true;
- }
- }
- return false;
- }
-
- @SuppressWarnings("unchecked")
- protected Map<String, Validate> getValidations(Class< ? extends ActionBean> clazz)
- {
- if (this.pageContext.getAttribute("validationInfos") != null)
- {
- Map<String, Map<String, Validate>> validationInfos = (Map<String, Map<String, Validate>>) this.pageContext
- .getAttribute("validationInfos");
- if (validationInfos.containsKey(clazz.getName()))
- {
- return validationInfos.get(clazz.getName());
- }
- else
- {
- Map<String, Validate> fieldValidations = new HashMap<String, Validate>();
- processClassAnnotations(clazz, fieldValidations);
- validationInfos.put(clazz.getName(), fieldValidations);
- return fieldValidations;
- }
- }
- else
- {
- Map<String, Map<String, Validate>> validationInfos = new HashMap<String, Map<String, Validate>>();
- Map<String, Validate> fieldValidations = new HashMap<String, Validate>();
- processClassAnnotations(clazz, fieldValidations);
- validationInfos.put(clazz.getName(), fieldValidations);
- this.pageContext.setAttribute("validationInfos", validationInfos);
- return fieldValidations;
- }
- }
-
- @SuppressWarnings("unchecked")
- protected void processClassAnnotations(Class clazz, Map<String, Validate> fieldValidations)
- {
- Class superclass = clazz.getSuperclass();
- if (superclass != null)
- {
- processClassAnnotations(superclass, fieldValidations);
- }
-
- // Process the methods on the class
- Method[] methods = clazz.getDeclaredMethods();
- for (Method method : methods)
- {
- if (!Modifier.isPublic(method.getModifiers()))
- {
- continue; // only public methods!
- }
-
- Validate validation = method.getAnnotation(Validate.class);
- if (validation != null && validation.required())
- {
- String fieldName = getPropertyName(method.getName());
- fieldValidations.put(fieldName, validation);
- }
-
- ValidateNestedProperties nested = method.getAnnotation(ValidateNestedProperties.class);
- if (nested != null)
- {
- String fieldName = getPropertyName(method.getName());
- Validate[] validations = nested.value();
- for (Validate nestedValidate : validations)
- {
- if ("".equals(nestedValidate.field()))
- {
- log.warn("Nested validation used without field name: ", validation);
- }
- else
- {
- if (nestedValidate.required())
- {
- fieldValidations.put(fieldName + "." + nestedValidate.field(), nestedValidate);
- }
- }
- }
- }
- }
-
- // Process the fields for validation annotations
- Field[] fields = clazz.getDeclaredFields();
- for (Field field : fields)
- {
- Validate validation = field.getAnnotation(Validate.class);
- if (validation != null && validation.required())
- {
- fieldValidations.put(field.getName(), validation);
- }
-
- ValidateNestedProperties nested = field.getAnnotation(ValidateNestedProperties.class);
- if (nested != null)
- {
- Validate[] validations = nested.value();
- for (Validate nestedValidate : validations)
- {
- if ("".equals(nestedValidate.field()))
- {
- log.warn("Nested validation used without field name: ", validation);
- }
- else
- {
- if (nestedValidate.required())
- {
- fieldValidations.put(field.getName() + "." + nestedValidate.field(), nestedValidate);
- }
- }
- }
- }
- }
- }
-
- /**
- * Helper method that returns the name of the property when supplied with the corresponding get or set method. Does
- * not do anything particularly intelligent, just drops the first three characters and makes the next character
- * lower case.
- */
- protected String getPropertyName(String methodName)
- {
- return methodName.substring(3, 4).toLowerCase() + methodName.substring(4);
- }
-
-}
Deleted: tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedMessagesTag.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/tag/ExtendedMessagesTag.java 2008-04-29 12:54:36 UTC (rev 806)
+++ tags/openutils-mgnlstripes-3.5/src/main/java/it/openutils/magnoliastripes/tag/ExtendedMessagesTag.java 2008-05-05 23:11:37 UTC (rev 809)
@@ -1,276 +0,0 @@
-/**
- * Copyright Openmind http://www.openmindonline.it
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 it.openutils.magnoliastripes.tag;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.jsp.JspException;
-
-import net.sourceforge.stripes.action.ActionBean;
-import net.sourceforge.stripes.controller.ParameterName;
-import net.sourceforge.stripes.exception.StripesJspException;
-import net.sourceforge.stripes.tag.InputLabelTag;
-import net.sourceforge.stripes.validation.Validate;
-import net.sourceforge.stripes.validation.ValidateNestedProperties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * @author luca boati
- * @version $Id$
- */
-public class ExtendedMessagesTag extends InputLabelTag
-{
-
- /**
- * Logger.
- */
- private Logger log = LoggerFactory.getLogger(ExtendedMessagesTag.class);
-
- boolean nameSet = false;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setName(String name)
- {
- // TODO Auto-generated method stub
- super.setName(name);
- this.nameSet = true;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int doEndInputTag() throws JspException
- {
- try
- {
- String label = getLocalizedFieldName();
- String fieldName = getAttributes().remove("name");
-
- if (label == null)
- {
- label = getBodyContentAsString();
- }
-
- if (label == null)
- {
- label = "Label could not find localized field name and had no body.";
- }
-
- // if (isRequiredField(this.getActionBean(), fieldName))
- // {
- // String cssClass = get("class");
- // if (cssClass != null)
- // {
- // set("class", cssClass + " required");
- // }
- // else
- // {
- // set("class", "required");
- // }
- // }
-
- // Write out the tag
- // writeOpenTag(getPageContext().getOut(), "label");
- getPageContext().getOut().write(label);
- // writeCloseTag(getPageContext().getOut(), "label");
-
- // Reset the field name so as to not screw up tag pooling
- if (this.nameSet)
- {
- super.setName(fieldName);
- }
-
- // set("class", null);
-
- return EVAL_PAGE;
- }
- catch (IOException ioe)
- {
- throw new StripesJspException("Encountered an exception while trying to write to "
- + "the output from the stripes:label tag handler class, InputLabelTag.", ioe);
- }
- }
-
- protected boolean isRequiredField(ActionBean bean, String name)
- {
-
- ParameterName param = new ParameterName(name);
- boolean isIndexed = param.isIndexed();
-
- Map<String, Validate> validationInfos = getValidations(bean.getClass());
-
- if (validationInfos != null)
- {
-
- for (Map.Entry<String, Validate> entry : validationInfos.entrySet())
- {
- String propertyName = entry.getKey();
- Validate validationInfo = entry.getValue();
-
- if (name.equals(propertyName) && validationInfo.required() && !isIndexed)
- {
- return true;
- }
- }
- }
-
- if (isIndexed)
- {
-
- Validate validationInfo = validationInfos.get(param.getStrippedName());
-
- if (validationInfo != null && validationInfo.required())
- {
- return true;
- }
- }
- return false;
- }
-
- @SuppressWarnings("unchecked")
- protected Map<String, Validate> getValidations(Class< ? extends ActionBean> clazz)
- {
- if (this.pageContext.getAttribute("validationInfos") != null)
- {
- Map<String, Map<String, Validate>> validationInfos = (Map<String, Map<String, Validate>>) this.pageContext
- .getAttribute("validationInfos");
- if (validationInfos.containsKey(clazz.getName()))
- {
- return validationInfos.get(clazz.getName());
- }
- else
- {
- Map<String, Validate> fieldValidations = new HashMap<String, Validate>();
- processClassAnnotations(clazz, fieldValidations);
- validationInfos.put(clazz.getName(), fieldValidations);
- return fieldValidations;
- }
- }
- else
- {
- Map<String, Map<String, Validate>> validationInfos = new HashMap<String, Map<String, Validate>>();
- Map<String, Validate> fieldValidations = new HashMap<String, Validate>();
- processClassAnnotations(clazz, fieldValidations);
- validationInfos.put(clazz.getName(), fieldValidations);
- this.pageContext.setAttribute("validationInfos", validationInfos);
- return fieldValidations;
- }
- }
-
- @SuppressWarnings("unchecked")
- protected void processClassAnnotations(Class clazz, Map<String, Validate> fieldValidations)
- {
- Class superclass = clazz.getSuperclass();
- if (superclass != null)
- {
- processClassAnnotations(superclass, fieldValidations);
- }
-
- // Process the methods on the class
- Method[] methods = clazz.getDeclaredMethods();
- for (Method method : methods)
- {
- if (!Modifier.isPublic(method.getModifiers()))
- {
- continue; // only public methods!
- }
-
- Validate validation = method.getAnnotation(Validate.class);
- if (validation != null && validation.required())
- {
- String fieldName = getPropertyName(method.getName());
- fieldValidations.put(fieldName, validation);
- }
-
- ValidateNestedProperties nested = method.getAnnotation(ValidateNestedProperties.class);
- if (nested != null)
- {
- String fieldName = getPropertyName(method.getName());
- Validate[] validations = nested.value();
- for (Validate nestedValidate : validations)
- {
- if ("".equals(nestedValidate.field()))
- {
- log.warn("Nested validation used without field name: ", validation);
- }
- else
- {
- if (nestedValidate.required())
- {
- fieldValidations.put(fieldName + "." + nestedValidate.field(), nestedValidate);
- }
- }
- }
- }
- }
-
- // Process the fields for validation annotations
- Field[] fields = clazz.getDeclaredFields();
- for (Field field : fields)
- {
- Validate validation = field.getAnnotation(Validate.class);
- if (validation != null && validation.required())
- {
- fieldValidations.put(field.getName(), validation);
- }
-
- ValidateNestedProperties nested = field.getAnnotation(ValidateNestedProperties.class);
- if (nested != null)
- {
- Validate[] validations = nested.value();
- for (Validate nestedValidate : validations)
- {
- if ("".equals(nestedValidate.field()))
- {
- log.warn("Nested validation used without field name: ", validation);
- }
- else
- {
- if (nestedValidate.required())
- {
- fieldValidations.put(field.getName() + "." + nestedValidate.field(), nestedValidate);
- }
- }
- }
- }
- }
- }
-
- /**
- * Helper method that returns the name of the property when supplied with the corresponding get or set method. Does
- * not do anything particularly intelligent, just drops the first three characters and makes the next character
- * lower case.
- */
- protected String getPropertyName(String methodName)
- {
- return methodName.substring(3, 4).toLowerCase() + methodName.substring(4);
- }
-
-}
Copied: tags/openutils-mgnlstripes-3.5/src/main/resources/META-INF/mgnlstripes.tld (from rev 807, trunk/openutils-mgnlstripes/src/main/resources/META-INF/mgnlstripes.tld)
===================================================================
--- tags/openutils-mgnlstripes-3.5/src/main/resources/META-INF/mgnlstripes.tld (rev 0)
+++ tags/openutils-mgnlstripes-3.5/src/main/resources/META-INF/mgnlstripes.tld 2008-05-05 23:11:37 UTC (rev 809)
@@ -0,0 +1,198 @@
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+ <description>mgnlstripes</description>
+ <display-name>mgnlstripes tags</display-name>
+ <tlib-version>1.0</tlib-version>
+ <short-name>mgnlstripes</short-name>
+ <uri>mgnlstripes</uri>
+ <tag>
+ <description> Stripes' HTML form tag. Provides a standard HTML form tag interface, but allows other stripes input
+ tags to re-populate their values. Also includes a hidden field in the form for the page name that the form is
+ being rendered on (to allow forwarding to the same page in the case of a validation error. </description>
+ <display-name>form</display-name>
+ <name>form</name>
+ <tag-class>it.openutils.magnoliastripes.tag.ExtendedFormTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description> The URL to which this form will post. Expected to be a web-app relative path - the tag will prepend
+ the context path to any action that begins with a slash and does not already contain the context path. Should
+ match a URL to which an ActionBean has been bound. Required unless 'beanclass' is provided. </description>
+ <name>action</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description> The fully qualified name of an ActionBean class, or alternatively a Class instance for an ActionBean
+ class. An alternative to the 'action' attribute, the 'beanclass' attribute will generate an action appropriate
+ for the ActionBean identified. Note that if an "ActionBean" that does not yet exist is identified an exception
+ will be thrown! </description>
+ <name>beanclass</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.Object</type>
+ </attribute>
+ <attribute>
+ <description> The name of the form field that should receive focus when the page is loaded. Two special values are
+ recognized, 'first' and the empty string; these values cause the form to set focus on the first element in the
+ form. If any value is set, and the form has validation errors, the behaviour is altered and the first field with
+ validation errors is focused instead. </description>
+ <name>focus</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description> A comma separated list of content types that it is acceptable to submit through this form. (HTML
+ Pass-through) </description>
+ <name>accept</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description> A comma separated list of possible character sets for form data. Will be written to the page as
+ accept-charset. (HTML Pass-through) </description>
+ <name>acceptcharset</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description> The mime type used to encode the content of this form. This value will be overridden if one or more
+ Stripes file input tags is used within the body of the form. </description>
+ <name>enctype</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description> The HTTP method used for sending data to the server. Options are GET and POST. Default is GET. (HTML
+ Pass-through) </description>
+ <name>method</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>The unique name of the form. (HTML Pass-through)</description>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description> Where the target URL is to be opened. One of _blank, _self, _parent and _top. (HTML Pass-through)
+ </description>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when the form is reset. (HTML Pass-through)</description>
+ <name>onreset</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run prior to the form being submitted to the server, (HTML Pass-through)</description>
+ <name>onsubmit</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <!-- Start: Standard HTML attributes -->
+ <attribute>
+ <description>The CSS class to be applied to the element. (HTML Pass-through)</description>
+ <name>class</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Text direction. (HTML Pass-through)</description>
+ <name>dir</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>A unique identifier for the HTML tag on the pgae. (HTML Pass-through)</description>
+ <name>id</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>The language code of the element. (HTML Pass-through)</description>
+ <name>lang</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run on each mouse click. (HTML Pass-through)</description>
+ <name>onclick</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run on a double-click of the mouse. (HTML Pass-through)</description>
+ <name>ondblclick</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when a key is depressed. (HTML Pass-through)</description>
+ <name>onkeydown</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when a key is pressed and released. (HTML Pass-through)</description>
+ <name>onkeypress</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when a key is released. (HTML Pass-through)</description>
+ <name>onkeyup</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when a mouse button is depressed. (HTML Pass-through)</description>
+ <name>onmousedown</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when the mouse pointer is moved. (HTML Pass-through)</description>
+ <name>onmousemove</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when the mouse pointer moves out of the element. (HTML Pass-through)</description>
+ <name>onmouseout</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when the mouse pointer moves over the element. (HTML Pass-through)</description>
+ <name>onmouseover</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Scripting code run when a mouse button is released. (HTML Pass-through)</description>
+ <name>onmouseup</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Inline CSS style fragment that applies to the element (HTML Pass-through)</description>
+ <name>style</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>Tool-tip text for the element. (HTML Pass-through)</description>
+ <name>title</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <!-- End: Standard HTML attributes -->
+ <dynamic-attributes>false</dynamic-attributes>
+ </tag>
+</taglib>
\ No newline at end of file
Deleted: tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt
===================================================================
--- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2008-04-29 12:54:36 UTC (rev 806)
+++ tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt 2008-05-05 23:11:37 UTC (rev 809)
@@ -1,152 +0,0 @@
- --------------------------
- openutils-mgnlstripes
- --------------------------
- Fabrizio Giustina
- --------------------------
-
-About openutils-mgnlstripes
-
- openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the
- {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework.
-
- After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph,
- Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the
- automatic injection of any paragraph property.
-
- <<This module requires magnolia 3.1-m3, and will not work on any earlier version!>>
-
-Configuration
-
- First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven
- just declare the following dependency:
-
-+----------------------------------------------+
- <dependency>
- <groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils-mgnlstripes</artifactId>
- <version>0.2</version>
- </dependency>
-+----------------------------------------------+
-
- Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}} for this).
-
- You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use
- <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter
- in WEB.xml:
-
-
-+----------------------------------------------+
- <init-param>
- <param-name>ActionResolver.Class</param-name>
- <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value>
- </init-param>
-+----------------------------------------------+
-
-Usage
-
- When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as
- a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr.
-
- You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of
- the paragraph is the same name of the Stripes action class minus action and lowercase.
-
- So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>.
-
- Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have
- the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>.
-
- Try to put a property called <<<title>>> in such dialog for a test.
-
- You are ready to use your paragraph into any magnolia template as usual:
-
-+----------------------------------------------+
-
- <cms:contentNodeIterator contentNodeCollectionName="column">
- <cms:editBar adminOnly="true" />
- <cms:includeTemplate />
- </cms:contentNodeIterator>
- <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" />
-
-+----------------------------------------------+
-
- Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you
- will be able to use it in your Stripes action bean.
-
- The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log:
-
-+----------------------------------------------+
-package it.myapp.web;
-
-import net.sourceforge.stripes.action.ActionBean;
-import net.sourceforge.stripes.action.ActionBeanContext;
-import net.sourceforge.stripes.action.DefaultHandler;
-import net.sourceforge.stripes.action.ForwardResolution;
-import net.sourceforge.stripes.action.Resolution;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class MyStripesAction implements ActionBean
-{
-
- private Logger log = LoggerFactory.getLogger(MyStripesAction.class);
-
- private String title;
-
- @Override
- public ActionBeanContext getContext()
- {
- // TODO
- return null;
- }
-
- @Override
- public void setContext(ActionBeanContext context)
- {
- // TODO
- }
-
- public void setTitle(String title)
- {
- this.title = title;
- }
-
- @DefaultHandler
- public Resolution show()
- {
-
- log.info("My title is: {}!", title);
-
- return new ForwardResolution("/templates/paragraphs/anyjsp.jsp");
- }
-}
-+----------------------------------------------+
-
- As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you
- will not need to configure and use any magnolia paragraph property into your action since you can still use also the
- standard magnolia tags in the jsp that is rendered by stripes!
-
-
-Todo/improvements
-
- Warning! This is a preliminary technology-preview release!
-
- What does this means? Well, that it should work fine, but the integration is not yet complete and there are still some
- missing features... be careful for what is know to not to work.
-
-
- This is a list of know todos:
-
- * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment
- stripes paragraphs disappear after any change in paragraphs configured into jcr.
-
- * Handle multipart forms in request wrapper (should be easy to do)
-
- * A better way of handling multivalued properties in paragraph
-
- * Handle binary properties in paragraph
-
- * Use spring binding/validation for validation of fields in dialogs
-
-
Copied: tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt (from rev 807, trunk/openutils-mgnlstripes/src/site/apt/index.apt)
===================================================================
--- tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt (rev 0)
+++ tags/openutils-mgnlstripes-3.5/src/site/apt/index.apt 2008-05-05 23:11:37 UTC (rev 809)
@@ -0,0 +1,144 @@
+ --------------------------
+ openutils-mgnlstripes
+ --------------------------
+ Fabrizio Giustina
+ --------------------------
+
+About openutils-mgnlstripes
+
+ openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the
+ {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework.
+
+ After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph,
+ Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the
+ automatic injection of any paragraph property.
+
+ <<This module requires magnolia 3.5.x, and will not work on any earlier version!>>
+
+Configuration
+
+ First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven
+ just declare the following dependency:
+
++----------------------------------------------+
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-mgnlstripes</artifactId>
+ <version>3.5</version>
+ </dependency>
++----------------------------------------------+
+
+ Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}} for this).
+
+ <<update: since version 3.5 you don't need to add the Stripes filter to web.xml manually, since this is automatically
+ configured by the module in config:server/filters. You can add any initialization parameter you may need to the main
+ magnolia filter in web.xml and it will be inherited by the stripes filter>>
+
+ You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use
+ <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter
+ in WEB.xml:
+
+
++----------------------------------------------+
+ <init-param>
+ <param-name>ActionResolver.Class</param-name>
+ <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value>
+ </init-param>
++----------------------------------------------+
+
+Usage
+
+ When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as
+ a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr.
+
+ You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of
+ the paragraph is the same name of the Stripes action class minus action and lowercase.
+
+ So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>.
+
+ Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have
+ the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>.
+
+ Try to put a property called <<<title>>> in such dialog for a test.
+
+ You are ready to use your paragraph into any magnolia template as usual:
+
++----------------------------------------------+
+
+ <cms:contentNodeIterator contentNodeCollectionName="column">
+ <cms:editBar adminOnly="true" />
+ <cms:includeTemplate />
+ </cms:contentNodeIterator>
+ <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" />
+
++----------------------------------------------+
+
+ Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you
+ will be able to use it in your Stripes action bean.
+
+ The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log:
+
++----------------------------------------------+
+package it.myapp.web;
+
+import net.sourceforge.stripes.action.ActionBean;
+import net.sourceforge.stripes.action.ActionBeanContext;
+import net.sourceforge.stripes.action.DefaultHandler;
+import net.sourceforge.stripes.action.ForwardResolution;
+import net.sourceforge.stripes.action.Resolution;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class MyStripesAction implements ActionBean
+{
+
+ private Logger log = LoggerFactory.getLogger(MyStripesAction.class);
+
+ private String title;
+
+ @Override
+ public ActionBeanContext getContext()
+ {
+ // TODO
+ return null;
+ }
+
+ @Override
+ public void setContext(ActionBeanContext context)
+ {
+ // TODO
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ @DefaultHandler
+ public Resolution show()
+ {
+
+ log.info("My title is: {}!", title);
+
+ return new ForwardResolution("/templates/paragraphs/anyjsp.jsp");
+ }
+}
++----------------------------------------------+
+
+ As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you
+ will not need to configure and use any magnolia paragraph property into your action since you can still use also the
+ standard magnolia tags in the jsp that is rendered by stripes!
+
+
+Todo/improvements
+
+ This is a list of know todos:
+
+ * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment
+ stripes paragraphs disappear after any change in paragraphs configured into jcr.
+
+ * Use stripes binding/validation for validation of fields in dialogs
+
+
Deleted: tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml
===================================================================
--- trunk/openutils-mgnlstripes/src/site/changes/changes.xml 2008-04-29 12:54:36 UTC (rev 806)
+++ tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml 2008-05-05 23:11:37 UTC (rev 809)
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--
- "type" attribute can be: add, remove, update or fix.
--->
-<document>
- <properties>
- <title>Changes</title>
- <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author>
- </properties>
- <body>
- <release version="3.5" date="2008-04-24" description="3.5">
- <action type="add" dev="fgiust" due-to=""> </action>
- </release>
- <release version="0.2" date="2007-08-14" description="">
- <action type="update" dev="fgiust">
- Added support for indexed parameters by replacing "{}" with "[]" in parameter names (hack). With Stripes you can
- use indexed parameters, but square brakets are not allowed in jcr node names and can't be used in paragraph
- attributes. You can now use "list{1}" in attribute names for that.
- </action>
- <action type="fix" dev="fgiust">
- Excluded commons-logging dependency from stripes in pom.xml. Magnolia already imports jcl104-over-slf4j, which
- is a replacement over the standard commons-logging jar.
- </action>
- </release>
- <release version="0.1" date="2007-08-13" description="Initial release">
- <action type="add" dev="fgiust" due-to="">Initial release with support for stripes paragraphs.</action>
- </release>
- </body>
-</document>
\ No newline at end of file
Copied: tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml (from rev 807, trunk/openutils-mgnlstripes/src/site/changes/changes.xml)
===================================================================
--- tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml (rev 0)
+++ tags/openutils-mgnlstripes-3.5/src/site/changes/changes.xml 2008-05-05 23:11:37 UTC (rev 809)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+ "type" attribute can be: add, remove, update or fix.
+-->
+<document>
+ <properties>
+ <title>Changes</title>
+ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author>
+ </properties>
+ <body>
+ <release version="3.5" date="2008-04-24" description="3.5">
+ <action type="update" dev="fgiust">update deps to magnolia 3.5.4</action>
+ <action type="update" dev="fgiust">the stripes filter is now added by the module automatically, and it should not
+ be added anymore in web.xml</action>
+ <action type="update" dev="fgiust">multipart forms are now handled properly</action>
+ </release>
+ <release version="0.2" date="2007-08-14" description="">
+ <action type="update" dev="fgiust"> Added support for indexed parameters by replacing "{}" with "[]" in parameter
+ names (hack). With Stripes you can use indexed parameters, but square brakets are not allowed in jcr node names
+ and can't be used in paragraph attributes. You can now use "list{1}" in attribute names for that.</action>
+ <action type="fix" dev="fgiust"> Excluded commons-logging dependency from stripes in pom.xml. Magnolia already
+ imports jcl104-over-slf4j, which is a replacement over the standard commons-logging jar.</action>
+ </release>
+ <release version="0.1" date="2007-08-13" description="Initial release">
+ <action type="add" dev="fgiust" due-to="">Initial release with support for stripes paragraphs.</action>
+ </release>
+ </body>
+</document>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|