gatein SVN: r8331 - portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2012-01-31 11:54:45 -0500 (Tue, 31 Jan 2012)
New Revision: 8331
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml
Log:
GTNPORTAL-2341 Czech localization labels for navigation nodes
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml 2012-01-31 15:43:44 UTC (rev 8330)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml 2012-01-31 16:54:45 UTC (rev 8331)
@@ -29,6 +29,7 @@
<node>
<name>home</name>
<label xml:lang="en">Home</label>
+ <label xml:lang="cs">Domů</label>
<label xml:lang="fr">Accueil</label>
<label xml:lang="es">Inicio</label>
<label xml:lang="de">Startseite</label>
@@ -49,6 +50,7 @@
<node>
<name>sitemap</name>
<label xml:lang="en">SiteMap</label>
+ <label xml:lang="cs">Mapa stránek</label>
<label xml:lang="fr">SiteMap</label>
<label xml:lang="es">Mapa del Sitio</label>
<label xml:lang="de">Seitenübersicht</label>
@@ -69,6 +71,7 @@
<node>
<name>groupnavigation</name>
<label xml:lang="en">Group Navigation</label>
+ <label xml:lang="cs">Navigace skupin</label>
<label xml:lang="fr">Group Navigation</label>
<label xml:lang="es">Navegación por Grupos</label>
<label xml:lang="de">Gruppennavigation</label>
@@ -90,6 +93,7 @@
<node>
<name>portalnavigation</name>
<label xml:lang="en">Portal Navigation</label>
+ <label xml:lang="cs">Navigace portálu</label>
<label xml:lang="fr">Portal Navigation</label>
<label xml:lang="es">Navegación por Portales</label>
<label xml:lang="de">Portalnavigation</label>
@@ -111,6 +115,7 @@
<node>
<name>register</name>
<label xml:lang="en">Register</label>
+ <label xml:lang="cs">Registrace</label>
<label xml:lang="es">Registrarse</label>
<label xml:lang="de">Registrieren</label>
<label xml:lang="it">Registrazione</label>
12 years, 11 months
gatein SVN: r8330 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2012-01-31 10:43:44 -0500 (Tue, 31 Jan 2012)
New Revision: 8330
Added:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java
Log:
- GTNPORTAL-1673: Implemented simple UserConfigurableUsernameValidator taking its configuration from a gatein.conf.dir/username-validator.properties file.
Added: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java (rev 0)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java 2012-01-31 15:43:44 UTC (rev 8330)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2012, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.webui.form.validator;
+
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.portal.pom.config.Utils;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.web.application.CompoundApplicationMessage;
+import org.exoplatform.webui.form.UIFormInput;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
+@Serialized
+public class UserConfigurableUsernameValidator extends UsernameValidator
+{
+ private static ValidatorConfiguration configuration = new ValidatorConfiguration();
+
+ // needed by @Serialized
+ public UserConfigurableUsernameValidator()
+ {
+ this.exceptionOnMissingMandatory = true;
+ this.trimValue = true;
+ }
+
+ @Override
+ protected void validate(String value, String label, CompoundApplicationMessage messages, UIFormInput uiInput)
+ {
+ if (configuration.defaultConfig)
+ {
+ super.validate(value, label, messages, uiInput);
+ }
+ else
+ {
+ if (value.length() < configuration.minLength || value.length() > configuration.maxLength)
+ {
+ messages.addMessage("StringLengthValidator.msg.length-invalid", new Object[]{label, configuration.minLength.toString(), configuration.maxLength.toString()});
+ }
+
+ if (!Pattern.matches(configuration.pattern, value))
+ {
+ messages.addMessage("ExpressionValidator.msg.value-invalid", new Object[]{label, configuration.formatMessage});
+ }
+ }
+ }
+
+ private static class ValidatorConfiguration
+ {
+ protected static Log log = ExoLogger.getLogger("username-validator");
+ private Integer minLength;
+ private Integer maxLength;
+ private String pattern;
+ private String formatMessage;
+ private boolean defaultConfig = true;
+
+ private ValidatorConfiguration()
+ {
+ String gateinConfDir = System.getProperty("gatein.conf.dir");
+ File conf = new File(gateinConfDir, "username-validator.properties");
+
+ minLength = DEFAULT_MIN_LENGTH;
+ maxLength = DEFAULT_MAX_LENGTH;
+ pattern = Utils.USER_NAME_VALIDATOR_REGEX;
+ formatMessage = pattern;
+
+ if (conf.exists())
+ {
+ try
+ {
+ Properties properties = new Properties();
+ properties.load(new FileInputStream(conf));
+ minLength = Integer.valueOf(properties.getProperty("minLength", String.valueOf(DEFAULT_MIN_LENGTH)));
+ maxLength = Integer.valueOf(properties.getProperty("maxLength", String.valueOf(DEFAULT_MAX_LENGTH)));
+ pattern = properties.getProperty("regexp", Utils.USER_NAME_VALIDATOR_REGEX);
+ formatMessage = properties.getProperty("formatMessage", formatMessage);
+ defaultConfig = false;
+ }
+ catch (IOException e)
+ {
+ log.info(e.getLocalizedMessage());
+ log.debug(e);
+ }
+ }
+ }
+ }
+}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java 2012-01-31 15:40:53 UTC (rev 8329)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java 2012-01-31 15:43:44 UTC (rev 8330)
@@ -31,8 +31,10 @@
@Serialized
public class UsernameValidator extends MultipleConditionsValidator
{
- private Integer min = 3;
- private Integer max = 30;
+ protected static final int DEFAULT_MIN_LENGTH = 3;
+ protected static final int DEFAULT_MAX_LENGTH = 30;
+ protected Integer min = DEFAULT_MIN_LENGTH;
+ protected Integer max = DEFAULT_MAX_LENGTH;
// required by @Serialized
public UsernameValidator()
12 years, 11 months
gatein SVN: r8329 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2012-01-31 10:40:53 -0500 (Tue, 31 Jan 2012)
New Revision: 8329
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java
Log:
- ExpressionValidator needs to provide a format string to error message.
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java 2012-01-31 15:40:53 UTC (rev 8329)
@@ -69,4 +69,10 @@
matcher.reset(value);
return matcher.matches();
}
+
+ @Override
+ protected Object[] getMessageArgs(String value, UIFormInput uiInput) throws Exception
+ {
+ return new Object[]{getLabelFor(uiInput), matcher.pattern().toString()};
+ }
}
12 years, 11 months
gatein SVN: r8328 - in portal/trunk: web/portal/src/main/webapp/groovy/webui/core and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2012-01-31 07:35:53 -0500 (Tue, 31 Jan 2012)
New Revision: 8328
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/CompoundApplicationMessage.java
portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupMessages.gtmpl
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/IdentifierValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/MultipleConditionsValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/NumberFormatValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PositiveNumberFormatValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java
portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java
Log:
- GTNPORTAL-1673: Fixed runtime issues that were not caught by test suite. Made AbstractValidator.trimmedValueOrNullIfBypassed method more configurable.
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -45,7 +45,6 @@
private boolean argsLocalized = true;
-
public abstract String getMessage();
public void setResourceBundle(ResourceBundle resourceBundle)
@@ -53,6 +52,11 @@
this.resourceBundle = resourceBundle;
}
+ protected ResourceBundle getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
public int getType()
{
return type_;
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -43,6 +43,11 @@
setType(type);
}
+ public String getMessageKey()
+ {
+ return messageKey_;
+ }
+
public String getMessage()
{
String msg = resolveMessage(messageKey_);
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/CompoundApplicationMessage.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/CompoundApplicationMessage.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/CompoundApplicationMessage.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -25,6 +25,7 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import java.util.ResourceBundle;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
public class CompoundApplicationMessage extends AbstractApplicationMessage implements Serializable
@@ -42,9 +43,20 @@
{
messages.add(initialMessage);
}
+ setType(AbstractApplicationMessage.WARNING);
}
@Override
+ public void setResourceBundle(ResourceBundle resourceBundle)
+ {
+ super.setResourceBundle(resourceBundle);
+ for (AbstractApplicationMessage message : messages)
+ {
+ message.setResourceBundle(resourceBundle);
+ }
+ }
+
+ @Override
public String getMessage()
{
StringBuilder sb = new StringBuilder(255);
@@ -56,9 +68,9 @@
return sb.toString();
}
- public void addMessage(String messageKey, Object[] args, int type)
+ public void addMessage(String messageKey, Object[] args)
{
- messages.add(new ApplicationMessage(messageKey, args, type));
+ messages.add(new ApplicationMessage(messageKey, args, AbstractApplicationMessage.WARNING));
}
public boolean isEmpty()
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupMessages.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupMessages.gtmpl 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupMessages.gtmpl 2012-01-31 12:35:53 UTC (rev 8328)
@@ -51,7 +51,7 @@
}
println " <ul class=\"UITabContent PopupMessageBox $messType\" $style>";
for(mess in messages) {
- if(mess.messageKey == null) continue;
+ // if(mess.messageKey == null) continue;
println " <li class=\"MessageContainer\">";
println " <span class=\"PopupIcon ${messType}Icon\">";
String msgValue = mess.getMessage();
@@ -61,7 +61,7 @@
println " </li>";
}
println " </ul>";
- return isSelected;
+ return isSelected;
}
%>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -34,6 +34,9 @@
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
public abstract class AbstractValidator implements Validator, Serializable
{
+ protected boolean exceptionOnMissingMandatory = false;
+ protected boolean trimValue = false;
+
protected String getLabelFor(UIFormInput uiInput) throws Exception
{
UIComponent uiComponent = (UIComponent)uiInput;
@@ -44,12 +47,20 @@
label = uiForm.getLabel(label);
}
+ label = label.trim();
+
+ // remove trailing ':' if there is one
+ int index = label.indexOf(':');
+ if(index != -1)
+ {
+ label = label.substring(0, index);
+ }
return label.trim();
}
public void validate(UIFormInput uiInput) throws Exception
{
- String value = trimmedValueOrNullIfBypassed((String)uiInput.getValue(), uiInput);
+ String value = trimmedValueOrNullIfBypassed((String)uiInput.getValue(), uiInput, exceptionOnMissingMandatory, trimValue);
if (value == null)
{
return;
@@ -75,17 +86,24 @@
protected abstract boolean isValid(String value, UIFormInput uiInput);
- protected String trimmedValueOrNullIfBypassed(String value, UIFormInput uiInput)
+ protected String trimmedValueOrNullIfBypassed(String value, UIFormInput uiInput, boolean exceptionOnMissingMandatory, boolean trimValue) throws Exception
{
- if (value == null)
+ if (value != null)
{
- return null;
+ String tmp = value.trim();
+ if(trimValue)
+ {
+ value = tmp;
+ }
+
+ value = tmp.isEmpty() ? null : value;
}
- else
+
+ if(exceptionOnMissingMandatory && value == null)
{
-// value = value.trim(); // should values be trimmed before being validated and saved?
+ throw createMessageException("EmptyFieldValidator.msg.empty-input", uiInput);
+ }
- return value.trim().isEmpty() ? null : value;
- }
+ return value;
}
}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -62,7 +62,7 @@
}
@Override
- protected String trimmedValueOrNullIfBypassed(String value, UIFormInput uiInput)
+ protected String trimmedValueOrNullIfBypassed(String value, UIFormInput uiInput, boolean exceptionOnMissingMandatory, boolean trimValue) throws Exception
{
if(!(uiInput instanceof UIFormDateTimeInput))
{
@@ -70,7 +70,7 @@
}
else
{
- return super.trimmedValueOrNullIfBypassed(value, uiInput);
+ return super.trimmedValueOrNullIfBypassed(value, uiInput, exceptionOnMissingMandatory, trimValue);
}
}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -20,7 +20,6 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
-import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.CompoundApplicationMessage;
import org.exoplatform.webui.form.UIFormInput;
@@ -53,16 +52,19 @@
int atIndex = value.indexOf('@');
if (atIndex == -1)
{
- messages.addMessage("EmailAddressValidator.msg.Invalid-input", args, ApplicationMessage.WARNING);
+ messages.addMessage("EmailAddressValidator.msg.Invalid-input", args);
}
+ else
+ {
+ String localPart = value.substring(0, atIndex);
+ String domainName = value.substring(atIndex + 1);
- String localPart = value.substring(0, atIndex);
- String domainName = value.substring(atIndex + 1);
+ if (!validateLocalPart(localPart.toCharArray()) || !validateDomainName(domainName.toCharArray()))
+ {
+ messages.addMessage("EmailAddressValidator.msg.Invalid-input", args);
+ }
+ }
- if (!validateLocalPart(localPart.toCharArray()) || !validateDomainName(domainName.toCharArray()))
- {
- messages.addMessage("EmailAddressValidator.msg.Invalid-input", args, ApplicationMessage.WARNING);
- }
}
private boolean validateLocalPart(char[] localPart)
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/IdentifierValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/IdentifierValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/IdentifierValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -19,7 +19,6 @@
package org.exoplatform.webui.form.validator;
-import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.CompoundApplicationMessage;
import org.exoplatform.webui.form.UIFormInput;
@@ -42,7 +41,7 @@
{
if (Character.isDigit(value.charAt(0)) || value.charAt(0) == '-')
{
- messages.addMessage("FirstAndSpecialCharacterNameValidator.msg", new Object[]{label, uiInput.getBindingField()}, ApplicationMessage.WARNING);
+ messages.addMessage("FirstAndSpecialCharacterNameValidator.msg", new Object[]{label, uiInput.getBindingField()});
}
for (int i = 0; i < value.length(); i++)
{
@@ -51,7 +50,7 @@
{
continue;
}
- messages.addMessage("IdentifierValidator.msg.Invalid-char", new Object[]{label}, ApplicationMessage.WARNING);
+ messages.addMessage("IdentifierValidator.msg.Invalid-char", new Object[]{label});
}
}
}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/MultipleConditionsValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/MultipleConditionsValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/MultipleConditionsValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -34,7 +34,7 @@
{
public void validate(UIFormInput uiInput) throws Exception
{
- String value = trimmedValueOrNullIfBypassed((String)uiInput.getValue(), uiInput);
+ String value = trimmedValueOrNullIfBypassed((String)uiInput.getValue(), uiInput, exceptionOnMissingMandatory, trimValue);
if (value == null)
{
return;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/NumberFormatValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/NumberFormatValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/NumberFormatValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -19,7 +19,6 @@
package org.exoplatform.webui.form.validator;
-import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.CompoundApplicationMessage;
import org.exoplatform.webui.form.UIFormInput;
@@ -46,11 +45,11 @@
Object[] args = {label};
if (value.charAt(0) == '0' && value.length() > 1)
{
- messages.addMessage("NumberFormatValidator.msg.Invalid-number", args, ApplicationMessage.WARNING);
+ messages.addMessage("NumberFormatValidator.msg.Invalid-number", args);
}
else if (value.charAt(0) == '-' && value.length() > 1 && value.charAt(1) == '0')
{
- messages.addMessage("NumberFormatValidator.msg.Invalid-number", args, ApplicationMessage.WARNING);
+ messages.addMessage("NumberFormatValidator.msg.Invalid-number", args);
}
try
{
@@ -58,7 +57,7 @@
}
catch (NumberFormatException e)
{
- messages.addMessage("NumberFormatValidator.msg.Invalid-number", args, ApplicationMessage.WARNING);
+ messages.addMessage("NumberFormatValidator.msg.Invalid-number", args);
return null;
}
}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PositiveNumberFormatValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PositiveNumberFormatValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PositiveNumberFormatValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -19,7 +19,6 @@
package org.exoplatform.webui.form.validator;
-import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.CompoundApplicationMessage;
import java.io.Serializable;
@@ -47,7 +46,7 @@
}
else if(integer < 0)
{
- messages.addMessage("PositiveNumberFormatValidator.msg.Invalid-number", new Object[]{label}, ApplicationMessage.WARNING);
+ messages.addMessage("PositiveNumberFormatValidator.msg.Invalid-number", new Object[]{label});
return null;
}
else
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -20,7 +20,6 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
-import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.CompoundApplicationMessage;
import org.exoplatform.webui.form.UIFormInput;
@@ -42,7 +41,7 @@
if (Character.isDigit(firstChar) || firstChar == '-' || firstChar == '.' || firstChar == '_')
{
Object[] args = {label, uiInput.getBindingField()};
- messages.addMessage("FirstCharacterNameValidator.msg", args, ApplicationMessage.WARNING);
+ messages.addMessage("FirstCharacterNameValidator.msg", args);
}
for (int i = 0; i < value.length(); i++)
{
@@ -52,7 +51,7 @@
continue;
}
Object[] args = {label};
- messages.addMessage("ResourceValidator.msg.Invalid-char", args, ApplicationMessage.WARNING);
+ messages.addMessage("ResourceValidator.msg.Invalid-char", args);
}
}
}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -17,7 +17,6 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
-import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.CompoundApplicationMessage;
import org.exoplatform.webui.form.UIFormInput;
@@ -51,17 +50,17 @@
char[] buff = value.toCharArray();
if (buff.length < min || buff.length > max)
{
- messages.addMessage("StringLengthValidator.msg.length-invalid", new Object[]{label, min.toString(), max.toString()}, ApplicationMessage.WARNING);
+ messages.addMessage("StringLengthValidator.msg.length-invalid", new Object[]{label, min.toString(), max.toString()});
}
if (!Character.isLowerCase(buff[0]))
{
- messages.addMessage("FirstCharacterNameValidator.msg", new Object[]{label}, ApplicationMessage.WARNING);
+ messages.addMessage("FirstCharacterNameValidator.msg", new Object[]{label});
}
if (!Character.isLetterOrDigit(buff[buff.length - 1]))
{
- messages.addMessage("LastCharacterUsernameValidator.msg", new Object[]{label, buff[buff.length - 1]}, ApplicationMessage.WARNING);
+ messages.addMessage("LastCharacterUsernameValidator.msg", new Object[]{label, buff[buff.length - 1]});
}
for (int i = 1; i < buff.length - 1; i++)
@@ -78,16 +77,16 @@
char next = buff[i + 1];
if (isSymbol(next))
{
- messages.addMessage("ConsecutiveSymbolValidator.msg", new Object[]{label, buff[i], buff[i + 1]}, ApplicationMessage.WARNING);
+ messages.addMessage("ConsecutiveSymbolValidator.msg", new Object[]{label, buff[i], buff[i + 1]});
}
else if (!Character.isLetterOrDigit(next))
{
- messages.addMessage("UsernameValidator.msg.Invalid-char", new Object[]{label}, ApplicationMessage.WARNING);
+ messages.addMessage("UsernameValidator.msg.Invalid-char", new Object[]{label});
}
}
else
{
- messages.addMessage("UsernameValidator.msg.Invalid-char", new Object[]{label}, ApplicationMessage.WARNING);
+ messages.addMessage("UsernameValidator.msg.Invalid-char", new Object[]{label});
}
}
}
Modified: portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java 2012-01-31 12:27:56 UTC (rev 8327)
+++ portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java 2012-01-31 12:35:53 UTC (rev 8328)
@@ -16,11 +16,7 @@
*/
package org.exoplatform.webui.test.validator;
-import java.util.List;
-import java.util.Locale;
-
import junit.framework.TestCase;
-
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.exception.MessageException;
@@ -38,6 +34,9 @@
import org.exoplatform.webui.form.validator.UsernameValidator;
import org.exoplatform.webui.form.validator.Validator;
+import java.util.List;
+import java.util.Locale;
+
/**
* @author <a href="mailto:haint@exoplatform.com">Nguyen Thanh Hai</a>
*
@@ -109,6 +108,7 @@
public void testEmailValidator()
{
Validator validator = new EmailAddressValidator();
+ assertFalse(expected(validator, "root"));
assertTrue(expected(validator, "root.gtn(a)exoplatform.com"));
assertTrue(expected(validator, "root.exo.gtn.portal(a)explatform.biz.edu.vn"));
assertTrue(expected(validator, "root_exo_gtn_portal(a)explatform-edu.biz.vn"));
12 years, 11 months
gatein SVN: r8327 - in epp/portal/branches/EPP_5_2_Branch: component/web/server/src/main/java/org/exoplatform/web/handler and 1 other directories.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-01-31 07:27:56 -0500 (Tue, 31 Jan 2012)
New Revision: 8327
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java
epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java
Log:
JBEPP-1496 WebAppController needs to start RequestLifeCycle for every processing (including static resource processing)
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -326,12 +326,6 @@
{
while (matcher.hasNext() && !processed)
{
- if (!started)
- {
- RequestLifeCycle.begin(ExoContainerContext.getCurrentContainer());
- started = true;
- }
-
//
Map<QualifiedName, String> parameters = matcher.next();
String handlerKey = parameters.get(HANDLER_PARAM);
@@ -345,12 +339,25 @@
log.debug("Serving request path=" + portalPath + ", parameters=" + parameters + " with handler " + handler);
}
+ if (!started && handler.getRequiresLifeCycle())
+ {
+ if (debug)
+ {
+ log.debug("Starting RequestLifeCycle for handler " + handler);
+ }
+ RequestLifeCycle.begin(ExoContainerContext.getCurrentContainer());
+ started = true;
+ }
+
//
processed = handler.execute(new ControllerContext(this, router, req, res, parameters));
}
else
{
- log.debug("No handler " + handlerKey + " for request path=" + portalPath + ", parameters=" + parameters);
+ if (debug)
+ {
+ log.debug("No handler " + handlerKey + " for request path=" + portalPath + ", parameters=" + parameters);
+ }
}
}
}
@@ -359,6 +366,10 @@
{
if (started)
{
+ if (debug)
+ {
+ log.debug("Finishing RequestLifeCycle for current request");
+ }
RequestLifeCycle.end();
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -64,4 +64,12 @@
public void onDestroy(WebAppController controller) throws Exception
{
}
+
+ /**
+ * Flag if particular handler requires lifecycle.
+ *
+ * @return true if processing of particular handler requires to be wrapped
+ * within {@link org.exoplatform.container.component.RequestLifeCycle} block.
+ */
+ protected abstract boolean getRequiresLifeCycle();
}
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -98,6 +98,12 @@
}
}
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
+
private static void optimalRead(InputStream is, OutputStream os) throws Exception
{
int bufferLength = 1024; //TODO: Better to compute bufferLength in term of -Xms, -Xmx properties
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -124,6 +124,12 @@
}
}
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
+
public String encodeName(String name) throws Exception
{
String[] arr = name.split(" ");
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -66,4 +66,10 @@
resp.sendRedirect(resp.encodeRedirectURL(s));
return true;
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -131,4 +131,10 @@
resp.sendRedirect(resp.encodeRedirectURL(s));
return true;
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return true;
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -244,4 +244,10 @@
((ApplicationRequestPhaseLifecycle) lifecycle).onEndRequestPhase(app, context, phase);
}
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return true;
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java 2012-01-31 12:27:56 UTC (rev 8327)
@@ -49,4 +49,10 @@
mergedContext.getNamedDispatcher("default").forward(req, res);
return true;
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
}
12 years, 11 months
gatein SVN: r8326 - in portal/trunk: component/web/server/src/main/java/org/exoplatform/web/handler and 1 other directories.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-01-31 07:14:29 -0500 (Tue, 31 Jan 2012)
New Revision: 8326
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java
portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java
portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java
Log:
GTNPORTAL-2340 WebAppController needs to start RequestLifeCycle for every processing (including static resource processing)
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -326,12 +326,6 @@
{
while (matcher.hasNext() && !processed)
{
- if (!started)
- {
- RequestLifeCycle.begin(ExoContainerContext.getCurrentContainer());
- started = true;
- }
-
//
Map<QualifiedName, String> parameters = matcher.next();
String handlerKey = parameters.get(HANDLER_PARAM);
@@ -345,12 +339,25 @@
log.debug("Serving request path=" + portalPath + ", parameters=" + parameters + " with handler " + handler);
}
+ if (!started && handler.getRequiresLifeCycle())
+ {
+ if (debug)
+ {
+ log.debug("Starting RequestLifeCycle for handler " + handler);
+ }
+ RequestLifeCycle.begin(ExoContainerContext.getCurrentContainer());
+ started = true;
+ }
+
//
processed = handler.execute(new ControllerContext(this, router, req, res, parameters));
}
else
{
- log.debug("No handler " + handlerKey + " for request path=" + portalPath + ", parameters=" + parameters);
+ if (debug)
+ {
+ log.debug("No handler " + handlerKey + " for request path=" + portalPath + ", parameters=" + parameters);
+ }
}
}
}
@@ -359,6 +366,10 @@
{
if (started)
{
+ if (debug)
+ {
+ log.debug("Finishing RequestLifeCycle for current request");
+ }
RequestLifeCycle.end();
}
}
@@ -376,4 +387,4 @@
res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
-}
\ No newline at end of file
+}
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -64,4 +64,12 @@
public void onDestroy(WebAppController controller) throws Exception
{
}
+
+ /**
+ * Flag if particular handler requires lifecycle.
+ *
+ * @return true if processing of particular handler requires to be wrapped
+ * within {@link org.exoplatform.container.component.RequestLifeCycle} block.
+ */
+ protected abstract boolean getRequiresLifeCycle();
}
\ No newline at end of file
Modified: portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java
===================================================================
--- portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -98,6 +98,12 @@
}
}
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
+
private static void optimalRead(InputStream is, OutputStream os) throws Exception
{
int bufferLength = 1024; //TODO: Better to compute bufferLength in term of -Xms, -Xmx properties
Modified: portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
===================================================================
--- portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -127,6 +127,12 @@
}
}
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
+
public String encodeName(String name) throws Exception
{
String[] arr = name.split(" ");
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -66,4 +66,10 @@
resp.sendRedirect(resp.encodeRedirectURL(s));
return true;
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -110,7 +110,7 @@
}
}
- //
+ //
PortalURLContext urlContext = new PortalURLContext(context, siteKey);
NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);
@@ -131,4 +131,10 @@
resp.sendRedirect(resp.encodeRedirectURL(s));
return true;
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return true;
+ }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -244,4 +244,10 @@
((ApplicationRequestPhaseLifecycle) lifecycle).onEndRequestPhase(app, context, phase);
}
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return true;
+ }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java 2012-01-30 18:20:27 UTC (rev 8325)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java 2012-01-31 12:14:29 UTC (rev 8326)
@@ -49,4 +49,10 @@
mergedContext.getNamedDispatcher("default").forward(req, res);
return true;
}
+
+ @Override
+ protected boolean getRequiresLifeCycle()
+ {
+ return false;
+ }
}
12 years, 11 months
gatein SVN: r8325 - portal/trunk/docs/reference-guide/en-US/modules/PortalDevelopment.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-01-30 13:20:27 -0500 (Mon, 30 Jan 2012)
New Revision: 8325
Modified:
portal/trunk/docs/reference-guide/en-US/modules/PortalDevelopment/LocalizationConfiguration.xml
Log:
GTNPORTAL-2339 Outdated location of LocalePolicy configuration in docs
Modified: portal/trunk/docs/reference-guide/en-US/modules/PortalDevelopment/LocalizationConfiguration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en-US/modules/PortalDevelopment/LocalizationConfiguration.xml 2012-01-30 15:41:58 UTC (rev 8324)
+++ portal/trunk/docs/reference-guide/en-US/modules/PortalDevelopment/LocalizationConfiguration.xml 2012-01-30 18:20:27 UTC (rev 8325)
@@ -193,7 +193,8 @@
</programlisting>
<para>The default <literal>LocalePolicy</literal> implementation is installed as GateIn Kernel portal service via
- <filename>gatein.ear/lib/exo.portal.webui.portal-VERSION.jar/conf/portal/configuration.xml</filename>.
+ <filename>gatein.ear/02portal.war/WEB-INF/conf/portal/web-configuration.xml</filename>. So here you can change it to different
+ value according to your needs.
</para>
<para>The following fragment is responsible for installing the service:
</para>
@@ -205,9 +206,6 @@
<para>Besides implementing <literal>LocalePolicy</literal>, the service class also needs to implement
<literal>org.picocontainer.Startable</literal> interface in order to get installed.
</para>
- <para>This configuration file should not be changed. The configuration in it can be overriden by placing it into portal's .war file:
- <filename>gatein.ear/02portal.war/WEB-INF/conf/configuration.xml</filename> (usually as another file included into this one).
- </para>
</section>
<section id="sect-Reference_Guide-Localization_Configuration-Pluggable_Locale_Policy-Non_bridged">
12 years, 11 months
gatein SVN: r8324 - epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2012-01-30 10:41:58 -0500 (Mon, 30 Jan 2012)
New Revision: 8324
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties
Log:
JBEPP-1240 reversed firstname and lastname in jp localization
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties 2012-01-30 15:35:48 UTC (rev 8323)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties 2012-01-30 15:41:58 UTC (rev 8324)
@@ -1084,8 +1084,8 @@
UIAccountProfiles.action.Save=\u4fdd\u5b58
UIAccountProfiles.action.Reset=\u30ea\u30bb\u30c3\u30c8
UIAccountProfiles.label.userName=\u30e6\u30fc\u30b6\u30fc\u540d :
-UIAccountProfiles.label.firstName=\u82d7\u5b57 :
-UIAccountProfiles.label.lastName=\u540d\u524d :
+UIAccountProfiles.label.firstName=\u540d\u524d :
+UIAccountProfiles.label.lastName=\u82d7\u5b57 :
UIAccountProfiles.label.email=E\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9 :
UIAccountProfiles.msg.update.success=\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f\u3002
UIAccountChangePass.action.Save=\u4fdd\u5b58
@@ -1203,8 +1203,8 @@
################################################################################
UIUserSelector.label.option.userName=\u30e6\u30fc\u30b6\u30fc\u540d
-UIUserSelector.label.option.lastName=\u540d\u524d
-UIUserSelector.label.option.firstName=\u82d7\u5b57
+UIUserSelector.label.option.lastName=\u82d7\u5b57
+UIUserSelector.label.option.firstName=\u540d\u524d
UIUserSelector.label.option.email=E\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9
UIUserSelector.label.group=\u30b0\u30eb\u30fc\u30d7 :
UIUserSelector.label.searchUser=\u691c\u7d22h :
12 years, 11 months
gatein SVN: r8322 - epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-01-30 06:24:26 -0500 (Mon, 30 Jan 2012)
New Revision: 8322
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml
Log:
JBEPP-1494 StaticResourceHandler should be before PortalRequestHandler
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml 2012-01-30 11:10:25 UTC (rev 8321)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml 2012-01-30 11:24:26 UTC (rev 8322)
@@ -81,6 +81,16 @@
</route>
</route>
+ <!-- Static resource handler needs to be before the portal handler -->
+ <route path="/{gtn:path}">
+ <route-param qname="gtn:handler">
+ <value>staticResource</value>
+ </route-param>
+ <path-param qname="gtn:path" encoding="preserve-path">
+ <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
+ </path-param>
+ </route>
+
<route path="/">
<!-- The portal handler -->
@@ -129,15 +139,6 @@
</route>
- <route path="/{gtn:path}">
- <route-param qname="gtn:handler">
- <value>staticResource</value>
- </route-param>
- <path-param qname="gtn:path" encoding="preserve-path">
- <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
- </path-param>
- </route>
-
<!-- Default handler -->
<route path="/">
<route-param qname="gtn:handler">
12 years, 11 months