[CONF] Confluence Changes in the last 24 hours
- This is a daily summary of all recent changes in Confluence. - Updated Spaces: - Apache Directory Community & Resources (directory) http://cwiki.apache.org/confluence/display/directory | |-Pages Added or Edited in This Space |-- Java und LDAP (JUG Munich) was created by szoerner (03:32 AM). | http://cwiki.apache.org/confluence/display/directory/Java+und+LDAP+%28JUG+Munich%29 |-- Conference materials was last edited by szoerner (03:29 AM). | http://cwiki.apache.org/confluence/display/directory/Conference+materials |-- ApacheDS Bringing "lightweight" to ldap development (ApacheCon EU 2008) was last edited by elecharny (01:11 AM). | http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=75066 Apache Felix (FELIX) http://cwiki.apache.org/confluence/display/FELIX | |-Pages Added or Edited in This Space |-- Index-tmp was created by clement.escoffier (09:10 AM). | http://cwiki.apache.org/confluence/display/FELIX/Index-tmp Apache Camel (CAMEL) http://cwiki.apache.org/confluence/display/CAMEL | |-Pages Added or Edited in This Space |-- FTP was last edited by davsclaus (10:16 AM). | http://cwiki.apache.org/confluence/display/CAMEL/FTP |-- Component List was last edited by davsclaus (09:46 AM). | http://cwiki.apache.org/confluence/display/CAMEL/Component+List |-- File was last edited by davsclaus (09:34 AM). | http://cwiki.apache.org/confluence/display/CAMEL/File |-- XSLT was last edited by davsclaus (12:54 AM). | http://cwiki.apache.org/confluence/display/CAMEL/XSLT Apache Geronimo (GMOxSITE) http://cwiki.apache.org/confluence/display/GMOxSITE | |-Pages Added or Edited in This Space |-- Committers was last edited by adc (02:51 PM). | http://cwiki.apache.org/confluence/display/GMOxSITE/Committers OpenEJB (OPENEJB) http://cwiki.apache.org/confluence/display/OPENEJB | |-Pages Added or Edited in This Space |-- Download was last edited by dblevins (08:17 PM). | http://cwiki.apache.org/confluence/display/OPENEJB/Download |-- OpenEJB 3.0 was created by dblevins (08:11 PM). | http://cwiki.apache.org/confluence/display/OPENEJB/OpenEJB+3.0 |-- OpenEJB Release Process was created by dblevins (06:44 PM). | http://cwiki.apache.org/confluence/display/OPENEJB/OpenEJB+Release+Process Apache Qpid (qpid) http://cwiki.apache.org/confluence/display/qpid | |-Pages Added or Edited in This Space |-- People was last edited by cctrieloff (05:29 PM). | http://cwiki.apache.org/confluence/display/qpid/People |-- Developer Pages was last edited by cctrieloff (05:26 PM). | http://cwiki.apache.org/confluence/display/qpid/Developer+Pages |-- RASC was last edited by cctrieloff (05:21 PM). | http://cwiki.apache.org/confluence/display/qpid/RASC |-- Getting Started Guide was last edited by cctrieloff (07:43 AM). | http://cwiki.apache.org/confluence/display/qpid/Getting+Started+Guide |-- Project Status was last edited by cctrieloff (06:07 AM). | http://cwiki.apache.org/confluence/display/qpid/Project+Status Apache Struts 2 Plugin Registry (S2PLUGINS) http://cwiki.apache.org/confluence/display/S2PLUGINS | |-Pages Added or Edited in This Space |-- DWR Plugin was created by mrdon (05:18 AM). | http://cwiki.apache.org/confluence/display/S2PLUGINS/DWR+Plugin |-- TestNG Plugin was created by mrdon (05:17 AM). | http://cwiki.apache.org/confluence/display/S2PLUGINS/TestNG+Plugin |-- JUnit Plugin was created by mrdon (05:16 AM). | http://cwiki.apache.org/confluence/display/S2PLUGINS/JUnit+Plugin Apache ActiveMQ CPP (AMQCPP) http://cwiki.apache.org/confluence/display/AMQCPP | |-Pages Added or Edited in This Space |-- Configuring was last edited by nmittler (08:38 AM). | http://cwiki.apache.org/confluence/display/AMQCPP/Configuring Apache Struts 2 Documentation (WW) http://cwiki.apache.org/confluence/display/WW | |-Pages Added or Edited in This Space |-- Version Notes 2.1.1 was last edited by mrdon (05:26 AM). | http://cwiki.apache.org/confluence/display/WW/Version+Notes+2.1.1 |-- JUnit Plugin was last edited by mrdon (05:19 AM). | http://cwiki.apache.org/confluence/display/WW/JUnit+Plugin |-- TestNG Plugin was created by mrdon (04:59 AM). | http://cwiki.apache.org/confluence/display/WW/TestNG+Plugin |-- DWR Plugin was created by mrdon (05:02 AM). | http://cwiki.apache.org/confluence/display/WW/DWR+Plugin |-- AJAX Client Side Validation was last edited by mrdon (05:08 AM). | http://cwiki.apache.org/confluence/display/WW/AJAX+Client+Side+Validation |-- Plugin Developers Guide was last edited by mrdon (05:00 AM). | http://cwiki.apache.org/confluence/display/WW/Plugin+Developers+Guide Apache Wicket Website (WICKETxSITE) http://cwiki.apache.org/confluence/display/WICKETxSITE | |-Pages Added or Edited in This Space |-- Building from S
svn commit: r647660 - /struts/struts2/trunk/apps/pom.xml
Author: mrdon Date: Sun Apr 13 21:46:38 2008 New Revision: 647660 URL: http://svn.apache.org/viewvc?rev=647660&view=rev Log: Adding cargo version to fix broken build WW-2539 Modified: struts/struts2/trunk/apps/pom.xml Modified: struts/struts2/trunk/apps/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/pom.xml?rev=647660&r1=647659&r2=647660&view=diff == --- struts/struts2/trunk/apps/pom.xml (original) +++ struts/struts2/trunk/apps/pom.xml Sun Apr 13 21:46:38 2008 @@ -178,6 +178,7 @@ org.codehaus.cargo cargo-maven2-plugin +0.3.1 tomcat5x
svn commit: r647647 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2: components/Label.java components/UIBean.java util/TextProviderHelper.java
Author: jeromy Date: Sun Apr 13 19:10:42 2008 New Revision: 647647 URL: http://svn.apache.org/viewvc?rev=647647&view=rev Log: Added useful WARNs to the TextProviderHelper when a message resource is not found and the default value is used/evaluated WW-2592 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java?rev=647647&r1=647646&r2=647647&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java Sun Apr 13 19:10:42 2008 @@ -83,8 +83,8 @@ if (value != null) { addParameter("nameValue", findString(value)); } else if (key != null) { -// get the label from a TextProvider -String providedLabel = TextProviderHelper.getText(key, "", stack); +// get the label from a TextProvider (default value is the key) +String providedLabel = TextProviderHelper.getText(key, key, stack); addParameter("nameValue", providedLabel); } else if (name != null) { String expr = name; Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?rev=647647&r1=647646&r2=647647&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Sun Apr 13 19:10:42 2008 @@ -626,8 +626,8 @@ } if(this.label == null) { -// lookup the label from a TextProvider -providedLabel = TextProviderHelper.getText(key, "", stack); +// lookup the label from a TextProvider (default value is the key) +providedLabel = TextProviderHelper.getText(key, key, stack); } } Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java?rev=647647&r1=647646&r2=647647&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java Sun Apr 13 19:10:42 2008 @@ -1,6 +1,8 @@ package org.apache.struts2.util; import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.logging.Logger; +import com.opensymphony.xwork2.util.logging.LoggerFactory; import com.opensymphony.xwork2.TextProvider; import java.util.Iterator; @@ -12,6 +14,8 @@ */ public class TextProviderHelper { +private static final Logger LOG = LoggerFactory.getLogger(TextProviderHelper.class); + /** * Get a message from the first TextProvider encountered in the stack. * If the first TextProvider doesn't provide the message the default message is returned. @@ -19,23 +23,46 @@ * This method was refactored from [EMAIL PROTECTED] org.apache.struts2.components.Text} to use a * consistent implementation across UIBean components. * @param key the message key in the resource bundle - * @param defaultMessage the message to return if not found + * @param defaultMessage the message to return if not found (evaluated for OGNL) * @param argsan array args to be used in a [EMAIL PROTECTED] java.text.MessageFormat} message * @param stack the value stack to use for finding the text * * @return the message if found, otherwise the defaultMessage */ public static String getText(String key, String defaultMessage, List args, ValueStack stack) { -String msg = defaultMessage; +String msg = null; +TextProvider tp = null; for (Iterator iterator = stack.getRoot().iterator(); iterator.hasNext();) { Object o = iterator.next(); if (o instanceof TextProvider) { -TextProvider tp = (TextProvider) o; -msg = tp.getText(key, defaultMessage, args, stack); +tp = (TextProvider) o; +
svn commit: r647650 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/I18n.java test/java/org/apache/struts2/views/jsp/I18nTagTest.java
Author: jeromy Date: Sun Apr 13 19:57:22 2008 New Revision: 647650 URL: http://svn.apache.org/viewvc?rev=647650&view=rev Log: The closing I18n tag now throws an exception if it popped an unexpected object from the stack. WW-2539 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/I18nTagTest.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java?rev=647650&r1=647649&r2=647650&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java Sun Apr 13 19:57:22 2008 @@ -31,10 +31,13 @@ import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.LocaleProvider; import com.opensymphony.xwork2.TextProviderFactory; +import com.opensymphony.xwork2.TextProvider; import com.opensymphony.xwork2.inject.Container; import com.opensymphony.xwork2.inject.Inject; import com.opensymphony.xwork2.util.LocalizedTextUtil; import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.logging.Logger; +import com.opensymphony.xwork2.util.logging.LoggerFactory; /** * @@ -84,9 +87,13 @@ @StrutsTag(name="i18n", tldTagClass="org.apache.struts2.views.jsp.I18nTag", description="Get a resource bundle" + " and place it on the value stack") public class I18n extends Component { + +private static final Logger LOG = LoggerFactory.getLogger(I18n.class); + protected boolean pushed; protected String name; protected Container container; +private TextProvider textProvider; public I18n(ValueStack stack) { super(stack); @@ -112,11 +119,12 @@ final Locale locale = (Locale) getStack().getContext().get(ActionContext.LOCALE); TextProviderFactory tpf = new TextProviderFactory(); container.inject(tpf); -getStack().push(tpf.createInstance(bundle, new LocaleProvider() { - public Locale getLocale() { - return locale; - } -})); +textProvider = tpf.createInstance(bundle, new LocaleProvider() { +public Locale getLocale() { +return locale; +} +}); +getStack().push(textProvider); pushed = true; } } catch (Exception e) { @@ -127,9 +135,15 @@ return result; } -public boolean end(Writer writer, String body) { +public boolean end(Writer writer, String body) throws StrutsException { if (pushed) { -getStack().pop(); +Object o = getStack().pop(); +if ((o == null) || (!o.equals(textProvider))) { +LOG.error("A closing i18n tag attempted to pop its own TextProvider from the top of the ValueStack but popped an unexpected object ("+(o != null ? o.getClass() : "null")+"). " + +"Refactor the page within the i18n tags to ensure no objects are pushed onto the ValueStack without popping them prior to the closing tag. " + +"If you see this message it's likely that the i18n's TextProvider is still on the stack and will continue to provide message resources after the closing tag."); +throw new StrutsException("A closing i18n tag attempted to pop its TextProvider from the top of the ValueStack but popped an unexpected object ("+(o != null ? o.getClass() : "null")+")"); +} } return super.end(writer, body); Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/I18nTagTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/I18nTagTest.java?rev=647650&r1=647649&r2=647650&view=diff == --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/I18nTagTest.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/I18nTagTest.java Sun Apr 13 19:57:22 2008 @@ -3,6 +3,7 @@ import org.apache.struts2.TestAction; import org.apache.struts2.StrutsTestCase; import org.apache.struts2.ServletActionContext; +import org.apache.struts2.StrutsException; import com.mockobjects.servlet.MockPageContext; import com.mockobjects.servlet.MockJspWriter; import com.opensymphony.xwork2.util.ValueStack; @@ -59,5 +60,41 @@ e.printStackTrace(); fail(); } +} + +/** + * Asserts that an