[CONF] Confluence Changes in the last 24 hours

2009-02-05 Thread confluence
-
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-

OpenJPA (openjpa) http://cwiki.apache.org/confluence/display/openjpa
|
|-Pages Added or Edited in This Space
 |-- Documentation was last edited by ppod...@apache.org (09:30 AM).
 |   http://cwiki.apache.org/confluence/display/openjpa/Documentation

Apache Labs (labs) http://cwiki.apache.org/confluence/display/labs
|
|-Pages Added or Edited in This Space
 |-- MagmaScratchPad was created by simo...@apache.org (01:44 PM).
 |   http://cwiki.apache.org/confluence/display/labs/MagmaScratchPad

Apache Camel (CAMEL) http://cwiki.apache.org/confluence/display/CAMEL
|
|-Pages Added or Edited in This Space
 |-- Parameter Binding Annotations was last edited by njiang (09:29 PM).
 |   
http://cwiki.apache.org/confluence/display/CAMEL/Parameter+Binding+Annotations
 |-- Composed Message Processor was created by janstey (11:01 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/Composed+Message+Processor
 |-- Enterprise Integration Patterns was last edited by janstey (10:57 AM).
 |   
http://cwiki.apache.org/confluence/display/CAMEL/Enterprise+Integration+Patterns
 |-- How do I make my JMS endpoint transactional was created by jstrachan 
(07:12 AM).
 |   
http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+make+my+JMS+endpoint+transactional
 |-- POJO Producing was last edited by jstrachan (05:19 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/POJO+Producing
 |-- Hiding Middleware was last edited by jstrachan (03:56 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/Hiding+Middleware

Apache Etch (ETCH) http://cwiki.apache.org/confluence/display/ETCH
|
|-Pages Added or Edited in This Space
 |-- Javascript Language Binding was last edited by dixs...@gmail.com (01:58 
PM).
 |   http://cwiki.apache.org/confluence/display/ETCH/Javascript+Language+Binding
 |-- Language Binding Roadmap was last edited by dixs...@gmail.com (01:56 PM).
 |   http://cwiki.apache.org/confluence/display/ETCH/Language+Binding+Roadmap
 |-- Supporting Many Connections was created by dixs...@gmail.com (01:56 PM).
 |   http://cwiki.apache.org/confluence/display/ETCH/Supporting+Many+Connections

Apache Qpid (qpid) http://cwiki.apache.org/confluence/display/qpid
|
|-Pages Added or Edited in This Space
 |-- Java Broker Configuration Design was last edited by ritchiem (07:22 AM).
 |   
http://cwiki.apache.org/confluence/display/qpid/Java+Broker+Configuration+Design
 |
 |-New Comments in This Space
 |-- http://cwiki.apache.org/confluence/display/qpid/IP+Whitelisting (3)

Tuscany Wiki (TUSCANYWIKI) 
http://cwiki.apache.org/confluence/display/TUSCANYWIKI
|
|-Pages Added or Edited in This Space
 |-- Databinding Scope was last edited by ramkumar.rj (10:34 PM).
 |   http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Databinding+Scope
 |-- Release - Java SCA 2.0-M1 was last edited by lrese...@apache.org (04:43 
PM).
 |   
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Release+-+Java+SCA+2.0-M1
 |-- Suggestions for Online Presentations was last edited by beckerdo (08:00 
AM).
 |   
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Suggestions+for+Online+Presentations

Apache MINA (MINA) http://cwiki.apache.org/confluence/display/MINA
|
|-Pages Added or Edited in This Space
 |-- Related Projects was last edited by paliwalash...@gmail.com (02:57 AM).
 |   http://cwiki.apache.org/confluence/display/MINA/Related+Projects

Apache Tuscany Docs 2.x (TUSCANYxDOCx2x) 
http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x
|
|-Pages Added or Edited in This Space
 |-- SCA Java Development Guide was last edited by lrese...@apache.org (02:27 
PM).
 |   
http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/SCA+Java+Development+Guide
 |-- 01-Overview was last edited by lrese...@apache.org (01:58 PM).
 |   http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/01-Overview

Apache Tuscany (TUSCANY) http://cwiki.apache.org/confluence/display/TUSCANY
|
|-Pages Added or Edited in This Space
 |-- SCA Videos was last edited by beckerdo (05:44 AM).
 |   http://cwiki.apache.org/confluence/display/TUSCANY/SCA+Videos

Apache Directory Studio (DIRxSTUDIO) 
http://cwiki.apache.org/confluence/display/DIRxSTUDIO
|
|-Pages Added or Edited in This Space
 |-- Translating Studio was last edited by elecharny (04:11 PM).
 |   http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Translating+Studio


-
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/c

svn commit: r741179 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/ main/java/org/apache/struts2/views/jsp/ site/resources/tags/ test/java/org/apache/struts2/views/jsp/

2009-02-05 Thread musachy
Author: musachy
Date: Thu Feb  5 16:55:14 2009
New Revision: 741179

URL: http://svn.apache.org/viewvc?rev=741179&view=rev
Log:
WW-2984 Improve iterator tag to support "begin", "end" and "step" attributes

Modified:

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

struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/IteratorTag.java
struts/struts2/trunk/core/src/site/resources/tags/iterator.html

struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java?rev=741179&r1=741178&r2=741179&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
 Thu Feb  5 16:55:14 2009
@@ -23,6 +23,8 @@
 
 import java.io.Writer;
 import java.util.Iterator;
+import java.util.List;
+import java.util.Arrays;
 
 import org.apache.struts2.views.annotations.StrutsTag;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -30,6 +32,8 @@
 import org.apache.struts2.views.jsp.IteratorStatus;
 
 import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 
 /**
  * 
@@ -49,6 +53,13 @@
  * id (String) - if specified the current iteration object will be place 
with this id in Struts stack's context
  * scope
  *
+ * begin (Integer) - if specified the iteration will start on that 
index
+ *
+ * end (Integer) - if specified the iteration will end on that 
index(inclusive)
+ *
+ * step (Integer) - if specified the iteration index will be increased by 
this value on each iteration. It can be a negative
+ * value, in which case 'begin' must be greater than 'end'
+ *
  * 
  *
  * 
@@ -162,19 +173,14 @@
  *
  * 
  *
- * To simulate a simple loop with iterator tag, the following could be 
done.
- * It does the loop 5 times.
+ * A loop that iterates 5 times
  *
  * 
  *
  * 
  * 
  *
- * 
- *
- *
- *
- *
+ * 
  *
  *
  * 
@@ -201,15 +207,39 @@
  * 
  * 
  *
+ *  
+ *
+ * A loop that iterates over a partial list
+ *
+ * 
+ *
+ * 
+ * 
+ *
+ * 
+ *
+ *
+ * 
+ *
+ * 
+ * 
  */
 @StrutsTag(name="iterator", 
tldTagClass="org.apache.struts2.views.jsp.IteratorTag", description="Iterate 
over a iterable value")
 public class IteratorComponent extends ContextBean {
+private static final Logger LOG = 
LoggerFactory.getLogger(IteratorComponent.class);
+
 protected Iterator iterator;
 protected IteratorStatus status;
 protected Object oldStatus;
 protected IteratorStatus.StatusState statusState;
 protected String statusAttr;
 protected String value;
+protected String beginStr;
+protected Integer begin;
+protected String endStr;
+protected Integer end;
+protected String stepStr;
+protected Integer step;
 
 public IteratorComponent(ValueStack stack) {
 super(stack);
@@ -222,12 +252,50 @@
 status = new IteratorStatus(statusState);
 }
 
+if (beginStr != null)
+begin = (Integer) findValue(beginStr,  Integer.class);
+
+if (endStr != null)
+end = (Integer) findValue(endStr,  Integer.class);
+
+if (stepStr != null)
+step = (Integer) findValue(stepStr,  Integer.class);
+
 ValueStack stack = getStack();
 
-if (value == null) {
+if (value == null && begin == null && end == null) {
 value = "top";
 }
-iterator = MakeIterator.convert(findValue(value));
+Object iteratorTarget = findValue(value);
+iterator = MakeIterator.convert(iteratorTarget);
+
+if (begin != null) {
+//default step to 1
+if (step == null)
+step = 1;
+
+if (iterator == null) {
+//classic for loop from 'begin' to 'end'
+iterator = new CounterIterator(begin, end, step, null);
+} else if (iterator != null) {
+//only arrays and lists are supported
+if (iteratorTarget.getClass().isArray()) {
+Object[] values = (

svn commit: r741183 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java

2009-02-05 Thread musachy
Author: musachy
Date: Thu Feb  5 17:12:08 2009
New Revision: 741183

URL: http://svn.apache.org/viewvc?rev=741183&view=rev
Log:
WW-2984 Improve iterator tag to support "begin", "end" and "step" attributes

Modified:

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

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java?rev=741183&r1=741182&r2=741183&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
 Thu Feb  5 17:12:08 2009
@@ -411,7 +411,8 @@
 this.beginStr = begin;
 }
 
-@StrutsTagAttribute(description="if specified the iteration will end on 
that index(inclusive)", type="Integer", defaultValue="Size of the 'values' 
collection or array")
+@StrutsTagAttribute(description="if specified the iteration will end on 
that index(inclusive)", type="Integer",
+defaultValue="Size of the 'values' List or array, or 0 if 'step' 
is negative")
 public void setEnd(String end) {
 this.endStr = end;
 }




svn commit: r741310 - /struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java

2009-02-05 Thread musachy
Author: musachy
Date: Thu Feb  5 21:47:54 2009
New Revision: 741310

URL: http://svn.apache.org/viewvc?rev=741310&view=rev
Log:
WW-2984 Add test cases for negative step and no end on iterator tag

Modified:

struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java?rev=741310&r1=741309&r2=741310&view=diff
==
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorTagTest.java
 Thu Feb  5 21:47:54 2009
@@ -602,6 +602,25 @@
 validateCounter(new String[]{"d", "c", "b"});
 }
 
+public void testCounterWithListAndNegativeStepNoEnd() throws JspException {
+Foo foo = new Foo();
+ArrayList list = new ArrayList();
+list.add("a");
+list.add("b");
+list.add("c");
+list.add("d");
+foo.setList(list);
+
+stack.push(foo);
+
+tag.setValue("list");
+
+tag.setStep("-1");
+tag.setBegin("3");
+
+validateCounter(new String[]{"d", "c", "b", "a"});
+}
+
  public void testCounterWithArrayAndNegativeStep() throws JspException {
 Foo foo = new Foo();
 ArrayList list = new ArrayList();
@@ -622,6 +641,25 @@
 validateCounter(new String[]{"d", "c", "b"});
 }
 
+public void testCounterWithArrayAndNegativeStepNoEnd() throws JspException 
{
+Foo foo = new Foo();
+ArrayList list = new ArrayList();
+list.add("a");
+list.add("b");
+list.add("c");
+list.add("d");
+foo.setList(list);
+
+stack.push(foo);
+
+tag.setValue("list");
+
+tag.setStep("-1");
+tag.setBegin("3");
+
+validateCounter(new String[]{"d", "c", "b", "a"});
+}
+
 protected void validateCounter(Object[] expectedValues) throws 
JspException {
 List values = new ArrayList();
 try {