[CONF] Confluence Changes in the last 24 hours

2006-10-14 Thread confluence
-
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-

Apache Geronimo Development (GMOxDEV) 
http://cwiki.apache.org/confluence/display/GMOxDEV
|
|-Pages Added or Edited in This Space
 |-- Developing Geronimo in Eclipse was last edited by akulshre (06:04 AM).
 |   
http://cwiki.apache.org/confluence/display/GMOxDEV/Developing+Geronimo+in+Eclipse

OpenJPA (openjpa) http://cwiki.apache.org/confluence/display/openjpa
|
|-Pages Added or Edited in This Space
 |-- Downloads was last edited by mprudhom (01:13 PM).
 |   http://cwiki.apache.org/confluence/display/openjpa/Downloads
 |-- Committers was last edited by mprudhom (12:55 PM).
 |   http://cwiki.apache.org/confluence/display/openjpa/Committers

Apache Geronimo v1.1 (GMOxDOC11) 
http://cwiki.apache.org/confluence/display/GMOxDOC11
|
|-Pages Added or Edited in This Space
 |-- Exposing Web applications on distinct ports was last edited by hcunico 
(05:41 AM).
 |   
http://cwiki.apache.org/confluence/display/GMOxDOC11/Exposing+Web+applications+on+distinct+ports

Apache Struts 2 Documentation (WW) http://cwiki.apache.org/confluence/display/WW
|
|-Pages Added or Edited in This Space
 |-- Struts2 Plugin was created by tm_jee (01:06 AM).
 |   http://cwiki.apache.org/confluence/display/WW/Struts2+Plugin
 |-- Action Proxy & ActionProxy Factory was created by tm_jee (03:16 AM).
 |   http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27474
 |-- Object Factory was created by tm_jee (02:13 AM).
 |   http://cwiki.apache.org/confluence/display/WW/Object+Factory
 |-- Dispatcher Listener was created by tm_jee (01:37 AM).
 |   http://cwiki.apache.org/confluence/display/WW/Dispatcher+Listener
 |-- Core Developers Guide was last edited by [EMAIL PROTECTED] (03:53 AM).
 |   http://cwiki.apache.org/confluence/display/WW/Core+Developers+Guide
 |-- Action Mapper & Action Mapping was created by tm_jee (02:47 AM).
 |   http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27473
 |-- Configuration Provider & Configuration was created by tm_jee (02:22 AM).
 |   http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27471
 |-- Pre Result Listener was created by tm_jee (02:06 AM).
 |   http://cwiki.apache.org/confluence/display/WW/Pre+Result+Listener

Apache CXF (CXF) http://cwiki.apache.org/confluence/display/CXF
|
|-Pages Added or Edited in This Space
 |-- Navigation was last edited by dandiep (10:55 AM).
 |   http://cwiki.apache.org/confluence/display/CXF/Navigation
 |-- People was last edited by dandiep (10:54 AM).
 |   http://cwiki.apache.org/confluence/display/CXF/People

Apache Ode (ODExSITE) http://cwiki.apache.org/confluence/display/ODExSITE
|
|-Pages Added or Edited in This Space
 |-- Roadmap was last edited by mriou (02:06 PM).
 |   http://cwiki.apache.org/confluence/display/ODExSITE/Roadmap

Test Space (test) http://cwiki.apache.org/confluence/display/test
|
|-Pages Added or Edited in This Space
 |-- Tag Syntax was created by pepe8106 (11:58 AM).
 |   http://cwiki.apache.org/confluence/display/test/Tag+Syntax


-
CONFLUENCE INFORMATION
This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences
   http://cwiki.apache.org/confluence/users/viewnotifications.action

If you think it was sent incorrectly contact one of the administrators
   http://cwiki.apache.org/confluence/administrators.action

If you want more information on Confluence, or have a bug to report see
   http://www.atlassian.com/software/confluence




svn commit: r463918 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/util/ContainUtil.java test/java/org/apache/struts2/util/ContainUtilTest.java

2006-10-14 Thread tmjee
Author: tmjee
Date: Sat Oct 14 04:56:33 2006
New Revision: 463918

URL: http://svn.apache.org/viewvc?view=rev&rev=463918
Log:
WW-1471
 CheckboxList with value as Map should have the map keys compared instead of 
its value.


Added:

struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/ContainUtilTest.java
Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java?view=diff&rev=463918&r1=463917&r2=463918
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java
 Sat Oct 14 04:56:33 2006
@@ -26,9 +26,45 @@
  * ContainUtil will check if object 1 contains object 2.
  * Object 1 may be an Object, array, Collection, or a Map
  *
+ * @version $Date$ $Id$
  */
 public class ContainUtil {
 
+   /**
+* Determine if obj2 exists in obj1.
+* 
+* 
+*  
+*  Type Of obj1
+*  Comparison type
+*  
+*  
+*  null
+*  always return false  
+*  
+*  
+*  Map
+*  Map containsKey(obj2)
+*  
+*  
+*  Collection
+*  Collection contains(obj2)
+*  
+*  
+*  Array
+*  there's an array element (e) where e.equals(obj2)
+*  
+*  
+*  Object
+*  obj1.equals(obj2)
+*  
+* 
+* 
+* 
+* @param obj1
+* @param obj2
+* @return
+*/
 public static boolean contains(Object obj1, Object obj2) {
 if ((obj1 == null) || (obj2 == null)) {
 //log.debug("obj1 or obj2 are null.");
@@ -36,7 +72,7 @@
 }
 
 if (obj1 instanceof Map) {
-if (((Map) obj1).containsValue(obj2)) {
+if (((Map) obj1).containsKey(obj2)) {
 //log.debug("obj1 is a map and contains obj2");
 return true;
 }

Added: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/ContainUtilTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/ContainUtilTest.java?view=auto&rev=463918
==
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/ContainUtilTest.java
 (added)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/ContainUtilTest.java
 Sat Oct 14 04:56:33 2006
@@ -0,0 +1,118 @@
+/*
+ * $Id: ContainUtil.java 418521 2006-07-01 23:36:50Z mrdon $
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.struts2.util;
+
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+/**
+ * 
+ * @version $Date$ $Id$
+ */
+public class ContainUtilTest extends TestCase {
+
+   public void testNull() throws Exception {
+   assertFalse(ContainUtil.contains(null, null));
+   assertFalse(ContainUtil.contains(new Object(), null));
+   assertFalse(ContainUtil.contains(null, new Object()));
+   }
+   
+   public void testSimpleList() throws Exception {
+   List l = new ArrayList();
+   l.add("one");
+   l.add("two");
+   
+   assertFalse(ContainUtil.contains(l, "three"));
+   assertTrue(ContainUtil.contains(l, "one"));
+   assertTrue(ContainUtil.contains(l, "two"));
+   }
+   
+   public void testSimpleSet() throws Exception {
+   Set s = new LinkedHashSet();
+   s.add("one");
+   s.add("two");
+   
+   assertFalse(ContainUtil.contains(s, "thre"));
+   assertTrue(ContainUtil.contains(s, "one"));
+   assertTrue(ContainUtil.contains(s, "two"));
+   }
+   
+   public void testComplexList() throws Exception {
+   List l = new ArrayList();

svn commit: r463964 - in /struts/struts2/trunk/core/src/main: java/org/apache/struts2/components/ActionComponent.java java/org/apache/struts2/views/jsp/ActionTag.java resources/META-INF/struts-tags.tl

2006-10-14 Thread tmjee
Author: tmjee
Date: Sat Oct 14 08:56:38 2006
New Revision: 463964

URL: http://svn.apache.org/viewvc?view=rev&rev=463964
Log:
WW-1477
 - added a flush attribute to action tag, cause flushing causes exception for 
some user. Although the exception is swallowed and things work as usual its 
kindof irritating, it would be nice if there's a way to get rid of such 
exception by optionally allowing flush to be turn on and off


Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ActionTag.java
struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java?view=diff&rev=463964&r1=463963&r2=463964
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
 Sat Oct 14 08:56:38 2006
@@ -121,6 +121,7 @@
 protected String namespace;
 protected boolean executeResult;
 protected boolean ignoreContextParams;
+protected boolean flush = true;
 
 public ActionComponent(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
 super(stack);
@@ -131,10 +132,12 @@
 public boolean end(Writer writer, String body) {
boolean end = super.end(writer, "", false);
try {
-   try {
-   writer.flush();
-   } catch (IOException e) {
-   LOG.warn("error while trying to flush writer ", 
e);
+   if (flush) {
+   try {
+   writer.flush();
+   } catch (IOException e) {
+   LOG.warn("error while trying to flush 
writer ", e);
+   }
}
executeAction();
 
@@ -290,5 +293,13 @@
  */
 public void setIgnoreContextParams(boolean ignoreContextParams) {
 this.ignoreContextParams = ignoreContextParams;
+}
+
+/**
+ * whether the writer should be flush upon end of action component tag, 
default to true.
+ * @s.tagattribute required="false" type="Boolean" default="true"
+ */
+public void setFlush(boolean flush) {
+   this.flush = flush;
 }
 }

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ActionTag.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ActionTag.java?view=diff&rev=463964&r1=463963&r2=463964
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ActionTag.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ActionTag.java
 Sat Oct 14 08:56:38 2006
@@ -36,6 +36,7 @@
 protected String namespace;
 protected boolean executeResult;
 protected boolean ignoreContextParams;
+protected boolean flush = true;
 
 public Component getBean(ValueStack stack, HttpServletRequest req, 
HttpServletResponse res) {
 return new ActionComponent(stack, req, res);
@@ -49,6 +50,7 @@
 action.setNamespace(namespace);
 action.setExecuteResult(executeResult);
 action.setIgnoreContextParams(ignoreContextParams);
+action.setFlush(flush);
 action.start(pageContext.getOut());
 }
 
@@ -71,5 +73,13 @@
 
 public void setIgnoreContextParams(boolean ignoreContextParams) {
 this.ignoreContextParams = ignoreContextParams;
+}
+
+public void setFlush(boolean flush) {
+   this.flush = flush;
+}
+
+public boolean getFlush() {
+   return this.flush;
 }
 }

Modified: struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld?view=diff&rev=463964&r1=463963&r2=463964
==
--- struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld 
(original)
+++ struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld Sat 
Oct 14 08:56:38 2006
@@ -2969,7 +2969,14 @@
 
 
 
-
+   
+ flush
+ false
+ true
+ 
+   
+   
+