You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by hu...@apache.org on 2006/11/06 16:02:22 UTC
svn commit: r471756 [8/31] - in /struts/struts2/trunk: apps/blank/
apps/blank/src/main/java/example/ apps/blank/src/test/java/example/
apps/mailreader/src/main/java/mailreader2/
apps/portlet/src/main/java/org/apache/struts2/portlet/example/ apps/portle...
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -56,7 +59,7 @@
*
* <!-- START SNIPPET: params -->
* <ul>
- * <li>value* (String) - jsp page to be included</li>
+ * <li>value* (String) - jsp page to be included</li>
* </ul>
* <!-- END SNIPPET: params -->
*
@@ -92,7 +95,7 @@
*/
public class Include extends Component {
- private static final Log _log = LogFactory.getLog(Include.class);
+ private static final Log _log = LogFactory.getLog(Include.class);
private static String encoding;
private static boolean encodingDefined = true;
@@ -136,7 +139,7 @@
try {
urlBuf.append(URLEncoder.encode(values.get(i).toString(), "UTF-8"));
} catch (Exception e) {
- _log.warn("unable to url-encode "+values.get(i).toString()+", it will be ignored");
+ _log.warn("unable to url-encode "+values.get(i).toString()+", it will be ignored");
}
concat = "&";
@@ -215,7 +218,7 @@
public void addParameter(String key, Object value) {
// don't use the default implementation of addParameter,
// instead, include tag requires that each parameter be a list of objects,
- // just like the HTTP servlet interfaces are (String[])
+ // just like the HTTP servlet interfaces are (String[])
if (value != null) {
List currentValues = (List) parameters.get(key);
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -71,11 +74,11 @@
* colours:</p>
*
* <!-- END SNIPPET: example2description -->
- *
- *
+ *
+ *
* <pre>
* <!-- START SNIPPET: example2code -->
- *
+ *
* <s:bean name="org.apache.struts2.example.IteratorExample" id="it">
* <s:param name="day" value="'foo'"/>
* <s:param name="day" value="'bar'"/>
@@ -97,7 +100,7 @@
* </tr>
* </s:iterator>
* </table>
- *
+ *
* <!-- END SNIPPET: example2code -->
* </pre>
*
@@ -111,19 +114,19 @@
*
* <pre>
* <!-- START SNIPPET: example3code -->
- *
- * <s:iterator value="groupDao.groups" status="groupStatus">
- * <tr class="<s:if test="#groupStatus.odd == true ">odd</s:if><s:else>even</s:else>">
- * <td><s:property value="name" /></td>
- * <td><s:property value="description" /></td>
- * <td>
- * <s:iterator value="users" status="userStatus">
- * <s:property value="fullName" /><s:if test="!#userStatus.last">,</s:if>
- * </s:iterator>
- * </td>
- * </tr>
- * </s:iterator>
- *
+ *
+ * <s:iterator value="groupDao.groups" status="groupStatus">
+ * <tr class="<s:if test="#groupStatus.odd == true ">odd</s:if><s:else>even</s:else>">
+ * <td><s:property value="name" /></td>
+ * <td><s:property value="description" /></td>
+ * <td>
+ * <s:iterator value="users" status="userStatus">
+ * <s:property value="fullName" /><s:if test="!#userStatus.last">,</s:if>
+ * </s:iterator>
+ * </td>
+ * </tr>
+ * </s:iterator>
+ *
* <!-- END SNIPPET: example3code -->
* </pre>
* <p>
@@ -139,43 +142,43 @@
*
* <pre>
* <!-- START SNIPPET: example4code -->
- *
- * <s:action name="entries" id="entries"/>
- * <s:iterator value="#entries.entries" >
- * <s:property value="name" />
- * <s:property />
- * <s:push value="...">
- * <s:action name="edit" id="edit" >
- * <s:param name="entry" value="[0]" />
- * </s:action>
- * </push>
- * </s:iterator>
- *
+ *
+ * <s:action name="entries" id="entries"/>
+ * <s:iterator value="#entries.entries" >
+ * <s:property value="name" />
+ * <s:property />
+ * <s:push value="...">
+ * <s:action name="edit" id="edit" >
+ * <s:param name="entry" value="[0]" />
+ * </s:action>
+ * </push>
+ * </s:iterator>
+ *
* <!-- END SNIPPET: example4code -->
* </pre>
- *
+ *
* <!-- START SNIPPET: example5description -->
- *
- * </p>To simulate a simple loop with iterator tag, the following could be done.
+ *
+ * </p>To simulate a simple loop with iterator tag, the following could be done.
* It does the loop 5 times.
- *
+ *
* <!-- END SNIPPET: example5description -->
- *
+ *
* <pre>
* <!-- START SNIPPET: example5code -->
- *
+ *
* <s:iterator status="stat" value="{1,2,3,4,5}" >
* <!-- grab the index (start with 0 ... ) -->
* <s:property value="#stat.index" />
- *
+ *
* <!-- grab the top of the stack which should be the -->
* <!-- current iteration value (0, 1, ... 5) -->
* <s:property value="top" />
* </s:iterator>
- *
+ *
* <!-- END SNIPPET: example5code -->
* </pre>
- *
+ *
* @s.tag name="iterator" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.IteratorTag"
* description="Iterate over a iterable value"
*/
@@ -204,18 +207,18 @@
value = "top";
}
iterator = MakeIterator.convert(findValue(value));
-
+
// get the first
if ((iterator != null) && iterator.hasNext()) {
Object currentValue = iterator.next();
stack.push(currentValue);
String id = getId();
-
+
if ((id != null) && (currentValue != null)) {
//pageContext.setAttribute(id, currentValue);
//pageContext.setAttribute(id, currentValue, PageContext.REQUEST_SCOPE);
- stack.getContext().put(id, currentValue);
+ stack.getContext().put(id, currentValue);
}
// Status object
@@ -227,7 +230,7 @@
return true;
} else {
- super.end(writer, "");
+ super.end(writer, "");
return false;
}
}
@@ -247,7 +250,7 @@
if ((id != null) && (currentValue != null)) {
//pageContext.setAttribute(id, currentValue);
//pageContext.setAttribute(id, currentValue, PageContext.REQUEST_SCOPE);
- stack.getContext().put(id, currentValue);
+ stack.getContext().put(id, currentValue);
}
// Update status
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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.
+ * 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.components;
@@ -33,13 +36,13 @@
* DoubleListUIBean is the standard superclass of all Struts list handling components.
*
* <p/>
- *
+ *
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Note that the listkey and listvalue attribute will default to "key" and "value"
* respectively only when the list attribute is evaluated to a Map or its decendant.
* Other thing else, will result in listkey and listvalue to be null and not used.
- *
+ *
* <!-- END SNIPPET: javadoc -->
*
*/
@@ -47,9 +50,9 @@
protected Object list;
protected String listKey;
protected String listValue;
-
+
// indicate if an exception is to be thrown when value attribute is null
- protected boolean throwExceptionOnNullValueAttribute = false;
+ protected boolean throwExceptionOnNullValueAttribute = false;
protected ListUIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
@@ -70,17 +73,17 @@
value = MakeIterator.convert(list);
}
if (value == null) {
- if (throwExceptionOnNullValueAttribute) {
- // will throw an exception if not found
- value = findValue((list == null) ? (String) list : list.toString(), "list",
+ if (throwExceptionOnNullValueAttribute) {
+ // will throw an exception if not found
+ value = findValue((list == null) ? (String) list : list.toString(), "list",
"The requested list key '" + list + "' could not be resolved as a collection/array/map/enumeration/iterator type. " +
"Example: people or people.{name}");
- }
- else {
- // ww-1010, allows value with null value to be compatible with ww
- // 2.1.7 behaviour
- value = findValue((list == null)?(String) list:list.toString());
- }
+ }
+ else {
+ // ww-1010, allows value with null value to be compatible with ww
+ // 2.1.7 behaviour
+ value = findValue((list == null)?(String) list:list.toString());
+ }
}
if (value instanceof Collection) {
@@ -148,9 +151,9 @@
public void setListValue(String listValue) {
this.listValue = listValue;
}
-
-
+
+
public void setThrowExceptionOnNullValueAttribute(boolean throwExceptionOnNullValueAttribute) {
- this.throwExceptionOnNullValueAttribute = throwExceptionOnNullValueAttribute;
+ this.throwExceptionOnNullValueAttribute = throwExceptionOnNullValueAttribute;
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -32,20 +35,20 @@
/**
* <!-- START SNIPPET: javadoc -->
- * <p>Component for MergeIteratorTag, which job is to merge iterators and successive
- * call to the merged iterator will cause each merge iterator to have a chance to
- * expose its element, subsequently next call will allow the next iterator to expose
+ * <p>Component for MergeIteratorTag, which job is to merge iterators and successive
+ * call to the merged iterator will cause each merge iterator to have a chance to
+ * expose its element, subsequently next call will allow the next iterator to expose
* its element. Once the last iterator is done exposing its element, the first iterator
* is allowed to do so again (unless it is exhausted of entries).</P>
- *
+ *
* <p>Internally the task are delegated to MergeIteratorFilter</p>
- *
+ *
* <p>Example if there are 3 lists being merged, each list have 3 entries, the following will
* be the logic.</P>
* <ol>
- * <li>Display first element of the first list</li>
- * <li>Display first element of the second list</li>
- * <li>Display first element of the third list</li>
+ * <li>Display first element of the first list</li>
+ * <li>Display first element of the second list</li>
+ * <li>Display first element of the third list</li>
* <li>Display second element of the first list</li>
* <li>Display second element of the second list</li>
* <li>Display second element of the third list</li>
@@ -54,64 +57,64 @@
* <li>Display third element of the thrid list</li>
* </ol>
* <!-- END SNIPPET: javadoc -->
- *
+ *
* <!-- START SNIPPET: params -->
* <ul>
- * <li>id (String) - the id where the resultant merged iterator will be stored in the stack's context</li>
+ * <li>id (String) - the id where the resultant merged iterator will be stored in the stack's context</li>
* </ul>
* <!-- END SNIPPET: params -->
- *
- *
+ *
+ *
* <!-- START SNIPPET: javacode -->
* public class MergeIteratorTagAction extends ActionSupport {
*
- * private List myList1;
- * private List myList2;
- * private List myList3;
- *
- * public List getMyList1() {
- * return myList1;
- * }
- *
- * public List getMyList2() {
- * return myList2;
- * }
- *
- * public List getMyList3() {
- * return myList3;
- * }
- *
- *
- * public String execute() throws Exception {
- *
- * myList1 = new ArrayList();
- * myList1.add("1");
- * myList1.add("2");
- * myList1.add("3");
- *
- * myList2 = new ArrayList();
- * myList2.add("a");
- * myList2.add("b");
- * myList2.add("c");
- *
- * myList3 = new ArrayList();
- * myList3.add("A");
- * myList3.add("B");
- * myList3.add("C");
- *
- * return "done";
- * }
+ * private List myList1;
+ * private List myList2;
+ * private List myList3;
+ *
+ * public List getMyList1() {
+ * return myList1;
+ * }
+ *
+ * public List getMyList2() {
+ * return myList2;
+ * }
+ *
+ * public List getMyList3() {
+ * return myList3;
+ * }
+ *
+ *
+ * public String execute() throws Exception {
+ *
+ * myList1 = new ArrayList();
+ * myList1.add("1");
+ * myList1.add("2");
+ * myList1.add("3");
+ *
+ * myList2 = new ArrayList();
+ * myList2.add("a");
+ * myList2.add("b");
+ * myList2.add("c");
+ *
+ * myList3 = new ArrayList();
+ * myList3.add("A");
+ * myList3.add("B");
+ * myList3.add("C");
+ *
+ * return "done";
+ * }
* }
* <!-- END SNIPPET: javacode -->
*
* <!-- START SNIPPET: example -->
* <s:merge id="myMergedIterator1">
- * <s:param value="%{myList1}" />
- * <s:param value="%{myList2}" />
- * <s:param value="%{myList3}" />
+ * <s:param value="%{myList1}" />
+ * <s:param value="%{myList2}" />
+ * <s:param value="%{myList3}" />
* </s:merge>
* <s:iterator value="%{#myMergedIterator1}">
- * <s:property />
+ * <s:property />
* </s:iterator>
* <!-- END SNIPPET: example -->
*
@@ -126,43 +129,43 @@
* description="Merge the values of a list of iterators into one iterator"
*/
public class MergeIterator extends Component implements UnnamedParametric {
-
- private static final Log _log = LogFactory.getLog(MergeIterator.class);
-
- private MergeIteratorFilter mergeIteratorFilter = null;
- private List _parameters;
-
- public MergeIterator(ValueStack stack) {
- super(stack);
- }
-
- public boolean start(Writer writer) {
-
- mergeIteratorFilter = new MergeIteratorFilter();
- _parameters = new ArrayList();
+
+ private static final Log _log = LogFactory.getLog(MergeIterator.class);
+
+ private MergeIteratorFilter mergeIteratorFilter = null;
+ private List _parameters;
+
+ public MergeIterator(ValueStack stack) {
+ super(stack);
+ }
+
+ public boolean start(Writer writer) {
+
+ mergeIteratorFilter = new MergeIteratorFilter();
+ _parameters = new ArrayList();
return super.start(writer);
}
-
- public boolean end(Writer writer, String body) {
-
- for (Iterator parametersIterator = _parameters.iterator(); parametersIterator.hasNext(); ) {
- Object iteratorEntryObj = parametersIterator.next();
- if (! MakeIterator.isIterable(iteratorEntryObj)) {
- _log.warn("param with value resolved as "+iteratorEntryObj+" cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator");
- continue;
- }
- mergeIteratorFilter.setSource(MakeIterator.convert(iteratorEntryObj));
- }
-
- mergeIteratorFilter.execute();
-
- // if id exists, we put it in the stack's context
- if (getId() != null && getId().length() > 0) {
- getStack().getContext().put(getId(), mergeIteratorFilter);
- }
-
- mergeIteratorFilter = null;
+
+ public boolean end(Writer writer, String body) {
+
+ for (Iterator parametersIterator = _parameters.iterator(); parametersIterator.hasNext(); ) {
+ Object iteratorEntryObj = parametersIterator.next();
+ if (! MakeIterator.isIterable(iteratorEntryObj)) {
+ _log.warn("param with value resolved as "+iteratorEntryObj+" cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator");
+ continue;
+ }
+ mergeIteratorFilter.setSource(MakeIterator.convert(iteratorEntryObj));
+ }
+
+ mergeIteratorFilter.execute();
+
+ // if id exists, we put it in the stack's context
+ if (getId() != null && getId().length() > 0) {
+ getStack().getContext().put(getId(), mergeIteratorFilter);
+ }
+
+ mergeIteratorFilter = null;
return super.end(writer, body);
}
@@ -176,7 +179,7 @@
}
// == UnnamedParametric interface implementation ---------------------
- public void addParameter(Object value) {
- _parameters.add(value);
- }
+ public void addParameter(Object value) {
+ _parameters.add(value);
+ }
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -67,83 +70,83 @@
*/
public class OptGroup extends Component {
- public static final String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY = "optGroupInternalListUiBeanList";
+ public static final String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY = "optGroupInternalListUiBeanList";
- private static Log _log = LogFactory.getLog(OptGroup.class);
+ private static Log _log = LogFactory.getLog(OptGroup.class);
- protected HttpServletRequest req;
- protected HttpServletResponse res;
+ protected HttpServletRequest req;
+ protected HttpServletResponse res;
- protected ListUIBean internalUiBean;
+ protected ListUIBean internalUiBean;
- public OptGroup(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- super(stack);
- this.req = req;
- this.res = res;
- internalUiBean = new ListUIBean(stack, req, res) {
- protected String getDefaultTemplate() {
- return "empty";
- }
- };
- }
-
- public boolean end(Writer writer, String body) {
- Select select = (Select) findAncestor(Select.class);
- if (select == null) {
- _log.error("incorrect use of OptGroup component, this component must be used within a Select component",
- new IllegalStateException("incorrect use of OptGroup component, this component must be used within a Select component"));
- return false;
- }
- internalUiBean.start(writer);
- internalUiBean.end(writer, body);
-
- List listUiBeans = (List) select.getParameters().get(INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY);
- if (listUiBeans == null) {
- listUiBeans = new ArrayList();
- }
- listUiBeans.add(internalUiBean);
- select.addParameter(INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY, listUiBeans);
-
- return false;
- }
-
- /**
- * Set the label attribute.
- * @s.tagattribute required="false"
- */
- public void setLabel(String label) {
- internalUiBean.setLabel(label);
- }
-
- /**
- * Set the disable attribute.
- * @s.tagattribute required="false"
- */
- public void setDisabled(String disabled) {
- internalUiBean.setDisabled(disabled);
- }
-
- /**
- * Set the list attribute.
- * @s.tagattribute required="false"
- */
- public void setList(String list) {
- internalUiBean.setList(list);
- }
-
- /**
- * Set the listKey attribute.
- * @s.tagattribute required="false"
- */
- public void setListKey(String listKey) {
- internalUiBean.setListKey(listKey);
- }
-
- /**
- * Set the listValue attribute.
- * @s.tagattribute required="false"
- */
- public void setListValue(String listValue) {
- internalUiBean.setListValue(listValue);
- }
+ public OptGroup(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+ super(stack);
+ this.req = req;
+ this.res = res;
+ internalUiBean = new ListUIBean(stack, req, res) {
+ protected String getDefaultTemplate() {
+ return "empty";
+ }
+ };
+ }
+
+ public boolean end(Writer writer, String body) {
+ Select select = (Select) findAncestor(Select.class);
+ if (select == null) {
+ _log.error("incorrect use of OptGroup component, this component must be used within a Select component",
+ new IllegalStateException("incorrect use of OptGroup component, this component must be used within a Select component"));
+ return false;
+ }
+ internalUiBean.start(writer);
+ internalUiBean.end(writer, body);
+
+ List listUiBeans = (List) select.getParameters().get(INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY);
+ if (listUiBeans == null) {
+ listUiBeans = new ArrayList();
+ }
+ listUiBeans.add(internalUiBean);
+ select.addParameter(INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY, listUiBeans);
+
+ return false;
+ }
+
+ /**
+ * Set the label attribute.
+ * @s.tagattribute required="false"
+ */
+ public void setLabel(String label) {
+ internalUiBean.setLabel(label);
+ }
+
+ /**
+ * Set the disable attribute.
+ * @s.tagattribute required="false"
+ */
+ public void setDisabled(String disabled) {
+ internalUiBean.setDisabled(disabled);
+ }
+
+ /**
+ * Set the list attribute.
+ * @s.tagattribute required="false"
+ */
+ public void setList(String list) {
+ internalUiBean.setList(list);
+ }
+
+ /**
+ * Set the listKey attribute.
+ * @s.tagattribute required="false"
+ */
+ public void setListKey(String listKey) {
+ internalUiBean.setListKey(listKey);
+ }
+
+ /**
+ * Set the listValue attribute.
+ * @s.tagattribute required="false"
+ */
+ public void setListValue(String listValue) {
+ internalUiBean.setListValue(listValue);
+ }
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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.
+ * 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.components;
@@ -30,516 +33,516 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Create a option transfer select component which is basically two <select ...>
- * tag with buttons in the middle of them allowing options in each of the
- * <select ...> to be moved between themselves. Will auto-select all its
+ * tag with buttons in the middle of them allowing options in each of the
+ * <select ...> to be moved between themselves. Will auto-select all its
* elements upon its containing form submision.
- *
+ *
* <!-- END SNIPPET: javadoc -->
- *
+ *
* <p/>
- *
- *
+ *
+ *
* <!-- START SNIPPET: notice -->
- *
+ *
* NOTE: The id and doubleId need not be supplied as they will generated provided
- * that the optiontransferselect tag is being used in a form tag. The generated id
- * and doubleId will be <form_id>_<optiontransferselect_doubleName> and
+ * that the optiontransferselect tag is being used in a form tag. The generated id
+ * and doubleId will be <form_id>_<optiontransferselect_doubleName> and
* <form_id>_<optiontransferselect_doubleName> respectively.
- *
+ *
* <!-- END SNIPPET: notice -->
- *
+ *
* <p/>
- *
+ *
* <pre>
* <!-- START SNIPPET: example -->
- *
+ *
* <-- minimum configuration -->
* <s:optiontransferselect
- * label="Favourite Cartoons Characters"
- * name="leftSideCartoonCharacters"
- * list="{'Popeye', 'He-Man', 'Spiderman'}"
- * doubleName="rightSideCartoonCharacters"
- * doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}"
- * />
+ * label="Favourite Cartoons Characters"
+ * name="leftSideCartoonCharacters"
+ * list="{'Popeye', 'He-Man', 'Spiderman'}"
+ * doubleName="rightSideCartoonCharacters"
+ * doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}"
+ * />
*
* <-- possible configuration -->
* <s:optiontransferselect
- * label="Favourite Cartoons Characters"
- * name="leftSideCartoonCharacters"
- * leftTitle="Left Title"
- * rightTitle="Right Title"
- * list="{'Popeye', 'He-Man', 'Spiderman'}"
- * multiple="true"
- * headerKey="headerKey"
- * headerValue="--- Please Select ---"
- * emptyOption="true"
- * doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}"
- * doubleName="rightSideCartoonCharacters"
- * doubleHeaderKey="doubleHeaderKey"
- * doubleHeaderValue="--- Please Select ---"
- * doubleEmptyOption="true"
- * doubleMultiple="true"
- * />
- *
+ * label="Favourite Cartoons Characters"
+ * name="leftSideCartoonCharacters"
+ * leftTitle="Left Title"
+ * rightTitle="Right Title"
+ * list="{'Popeye', 'He-Man', 'Spiderman'}"
+ * multiple="true"
+ * headerKey="headerKey"
+ * headerValue="--- Please Select ---"
+ * emptyOption="true"
+ * doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}"
+ * doubleName="rightSideCartoonCharacters"
+ * doubleHeaderKey="doubleHeaderKey"
+ * doubleHeaderValue="--- Please Select ---"
+ * doubleEmptyOption="true"
+ * doubleMultiple="true"
+ * />
+ *
* <!-- END SNIPPET: example -->
* </pre>
- *
+ *
* @s.tag name="optiontransferselect" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.OptionTransferSelectTag"
* description="Renders an input form"
*/
public class OptionTransferSelect extends DoubleListUIBean {
-
- private static final Log _log = LogFactory.getLog(OptionTransferSelect.class);
- private static final String TEMPLATE = "optiontransferselect";
-
- protected String allowAddToLeft;
- protected String allowAddToRight;
- protected String allowAddAllToLeft;
- protected String allowAddAllToRight;
- protected String allowSelectAll;
- protected String allowUpDownOnLeft;
- protected String allowUpDownOnRight;
-
- protected String leftTitle;
- protected String rightTitle;
-
- protected String buttonCssClass;
- protected String buttonCssStyle;
-
- protected String addToLeftLabel;
- protected String addToRightLabel;
- protected String addAllToLeftLabel;
- protected String addAllToRightLabel;
- protected String selectAllLabel;
- protected String leftUpLabel;
- protected String leftDownlabel;
- protected String rightUpLabel;
- protected String rightDownLabel;
-
-
- public OptionTransferSelect(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
- super(stack, request, response);
- }
-
- protected String getDefaultTemplate() {
- return TEMPLATE;
- }
-
-
- public void evaluateExtraParams() {
- super.evaluateExtraParams();
-
- Object doubleValue = null;
-
- // override DoubleListUIBean's
+ private static final Log _log = LogFactory.getLog(OptionTransferSelect.class);
+
+ private static final String TEMPLATE = "optiontransferselect";
+
+ protected String allowAddToLeft;
+ protected String allowAddToRight;
+ protected String allowAddAllToLeft;
+ protected String allowAddAllToRight;
+ protected String allowSelectAll;
+ protected String allowUpDownOnLeft;
+ protected String allowUpDownOnRight;
+
+ protected String leftTitle;
+ protected String rightTitle;
+
+ protected String buttonCssClass;
+ protected String buttonCssStyle;
+
+ protected String addToLeftLabel;
+ protected String addToRightLabel;
+ protected String addAllToLeftLabel;
+ protected String addAllToRightLabel;
+ protected String selectAllLabel;
+ protected String leftUpLabel;
+ protected String leftDownlabel;
+ protected String rightUpLabel;
+ protected String rightDownLabel;
+
+
+ public OptionTransferSelect(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+ super(stack, request, response);
+ }
+
+ protected String getDefaultTemplate() {
+ return TEMPLATE;
+ }
+
+
+ public void evaluateExtraParams() {
+ super.evaluateExtraParams();
+
+ Object doubleValue = null;
+
+ // override DoubleListUIBean's
if (doubleList != null) {
doubleValue = findValue(doubleList);
addParameter("doubleList", doubleValue);
}
if (size == null || size.trim().length() <= 0) {
- addParameter("size", "15");
+ addParameter("size", "15");
}
if (doubleSize == null || doubleSize.trim().length() <= 0) {
- addParameter("doubleSize", "15");
+ addParameter("doubleSize", "15");
}
if (multiple == null || multiple.trim().length() <= 0) {
- addParameter("multiple", Boolean.TRUE);
+ addParameter("multiple", Boolean.TRUE);
}
if (doubleMultiple == null || doubleMultiple.trim().length() <= 0) {
- addParameter("doubleMultiple", Boolean.TRUE);
+ addParameter("doubleMultiple", Boolean.TRUE);
}
-
-
-
-
-
- // buttonCssClass
+
+
+
+
+
+ // buttonCssClass
if (buttonCssClass != null && buttonCssClass.trim().length() > 0) {
- addParameter("buttonCssClass", buttonCssClass);
+ addParameter("buttonCssClass", buttonCssClass);
}
-
+
// buttonCssStyle
if (buttonCssStyle != null && buttonCssStyle.trim().length() > 0) {
- addParameter("buttonCssStyle", buttonCssStyle);
+ addParameter("buttonCssStyle", buttonCssStyle);
}
-
-
+
+
// allowSelectAll
- addParameter("allowSelectAll",
- allowSelectAll != null ? findValue(allowSelectAll, Boolean.class) : Boolean.TRUE);
-
- // allowAddToLeft
- addParameter("allowAddToLeft",
- allowAddToLeft != null ? findValue(allowAddToLeft, Boolean.class) : Boolean.TRUE);
-
- // allowAddToRight
- addParameter("allowAddToRight",
- allowAddToRight != null ? findValue(allowAddToRight, Boolean.class) : Boolean.TRUE);
-
- // allowAddAllToLeft
- addParameter("allowAddAllToLeft",
- allowAddAllToLeft != null ? findValue(allowAddAllToLeft, Boolean.class) : Boolean.TRUE);
-
- // allowAddAllToRight
- addParameter("allowAddAllToRight",
- allowAddAllToRight != null ? findValue(allowAddAllToRight, Boolean.class) : Boolean.TRUE);
-
- // allowUpDownOnLeft
- addParameter("allowUpDownOnLeft",
- allowUpDownOnLeft != null ? findValue(allowUpDownOnLeft, Boolean.class) : Boolean.TRUE);
-
- // allowUpDownOnRight
- addParameter("allowUpDownOnRight",
- allowUpDownOnRight != null ? findValue(allowUpDownOnRight, Boolean.class) : Boolean.TRUE);
-
-
- // leftTitle
- if (leftTitle != null) {
- addParameter("leftTitle", findValue(leftTitle, String.class));
- }
-
- // rightTitle
- if (rightTitle != null) {
- addParameter("rightTitle", findValue(rightTitle, String.class));
- }
-
-
- // addToLeftLabel
- addParameter("addToLeftLabel",
- addToLeftLabel != null ? findValue(addToLeftLabel, String.class) : "<-" );
-
- // addToRightLabel
- addParameter("addToRightLabel",
- addToRightLabel != null ? findValue(addToRightLabel, String.class) : "->");
-
- // addAllToLeftLabel
- addParameter("addAllToLeftLabel",
- addAllToLeftLabel != null ? findValue(addAllToLeftLabel, String.class) : "<<--");
-
- // addAllToRightLabel
- addParameter("addAllToRightLabel",
- addAllToRightLabel != null ? findValue(addAllToRightLabel, String.class) : "-->>");
-
- // selectAllLabel
- addParameter("selectAllLabel",
- selectAllLabel != null ? findValue(selectAllLabel, String.class) : "<*>");
-
- // leftUpLabel
- addParameter("leftUpLabel",
- leftUpLabel != null ? findValue(leftUpLabel, String.class) : "^");
-
-
- // leftDownLabel
- addParameter("leftDownLabel",
- leftDownlabel != null ? findValue(leftDownlabel, String.class) : "v");
-
-
- // rightUpLabel
- addParameter("rightUpLabel",
- rightUpLabel != null ? findValue(rightUpLabel, String.class) : "^");
-
-
- // rightDownlabel
- addParameter("rightDownLabel",
- rightDownLabel != null ? findValue(rightDownLabel, String.class) : "v");
-
-
-
- // inform the form component our select tag infos, so they know how to select
- // its elements upon onsubmit
- Form formAncestor = (Form) findAncestor(Form.class);
- if (formAncestor != null) {
-
- // inform ancestor form that we are having a customOnsubmit (see form-close.ftl [simple theme])
- enableAncestorFormCustomOnsubmit();
-
-
- // key -> select tag id, value -> headerKey (if exists)
- Map formOptiontransferselectIds = (Map) formAncestor.getParameters().get("optiontransferselectIds");
- Map formOptiontransferselectDoubleIds = (Map) formAncestor.getParameters().get("optiontransferselectDoubleIds");
-
- // init lists
- if (formOptiontransferselectIds == null) {
- formOptiontransferselectIds = new LinkedHashMap();
- }
- if (formOptiontransferselectDoubleIds == null) {
- formOptiontransferselectDoubleIds = new LinkedHashMap();
- }
-
-
- // id
- String tmpId = (String) getParameters().get("id");
- String tmpHeaderKey = (String) getParameters().get("headerKey");
- if (tmpId != null && (! formOptiontransferselectIds.containsKey(tmpId))) {
- formOptiontransferselectIds.put(tmpId, tmpHeaderKey);
- }
-
- // doubleId
- String tmpDoubleId = (String) getParameters().get("doubleId");
- String tmpDoubleHeaderKey = (String) getParameters().get("doubleHeaderKey");
- if (tmpDoubleId != null && (! formOptiontransferselectDoubleIds.containsKey(tmpDoubleId))) {
- formOptiontransferselectDoubleIds.put(tmpDoubleId, tmpDoubleHeaderKey);
- }
-
- formAncestor.getParameters().put("optiontransferselectIds", formOptiontransferselectIds);
- formAncestor.getParameters().put("optiontransferselectDoubleIds", formOptiontransferselectDoubleIds);
-
- }
- else {
- _log.warn("form enclosing optiontransferselect "+this+" not found, auto select upon form submit of optiontransferselect will not work");
- }
- }
-
-
-
- public String getAddAllToLeftLabel() {
- return addAllToLeftLabel;
- }
+ addParameter("allowSelectAll",
+ allowSelectAll != null ? findValue(allowSelectAll, Boolean.class) : Boolean.TRUE);
+
+ // allowAddToLeft
+ addParameter("allowAddToLeft",
+ allowAddToLeft != null ? findValue(allowAddToLeft, Boolean.class) : Boolean.TRUE);
+
+ // allowAddToRight
+ addParameter("allowAddToRight",
+ allowAddToRight != null ? findValue(allowAddToRight, Boolean.class) : Boolean.TRUE);
+
+ // allowAddAllToLeft
+ addParameter("allowAddAllToLeft",
+ allowAddAllToLeft != null ? findValue(allowAddAllToLeft, Boolean.class) : Boolean.TRUE);
+
+ // allowAddAllToRight
+ addParameter("allowAddAllToRight",
+ allowAddAllToRight != null ? findValue(allowAddAllToRight, Boolean.class) : Boolean.TRUE);
+
+ // allowUpDownOnLeft
+ addParameter("allowUpDownOnLeft",
+ allowUpDownOnLeft != null ? findValue(allowUpDownOnLeft, Boolean.class) : Boolean.TRUE);
+
+ // allowUpDownOnRight
+ addParameter("allowUpDownOnRight",
+ allowUpDownOnRight != null ? findValue(allowUpDownOnRight, Boolean.class) : Boolean.TRUE);
+
+
+ // leftTitle
+ if (leftTitle != null) {
+ addParameter("leftTitle", findValue(leftTitle, String.class));
+ }
+
+ // rightTitle
+ if (rightTitle != null) {
+ addParameter("rightTitle", findValue(rightTitle, String.class));
+ }
- /**
+
+ // addToLeftLabel
+ addParameter("addToLeftLabel",
+ addToLeftLabel != null ? findValue(addToLeftLabel, String.class) : "<-" );
+
+ // addToRightLabel
+ addParameter("addToRightLabel",
+ addToRightLabel != null ? findValue(addToRightLabel, String.class) : "->");
+
+ // addAllToLeftLabel
+ addParameter("addAllToLeftLabel",
+ addAllToLeftLabel != null ? findValue(addAllToLeftLabel, String.class) : "<<--");
+
+ // addAllToRightLabel
+ addParameter("addAllToRightLabel",
+ addAllToRightLabel != null ? findValue(addAllToRightLabel, String.class) : "-->>");
+
+ // selectAllLabel
+ addParameter("selectAllLabel",
+ selectAllLabel != null ? findValue(selectAllLabel, String.class) : "<*>");
+
+ // leftUpLabel
+ addParameter("leftUpLabel",
+ leftUpLabel != null ? findValue(leftUpLabel, String.class) : "^");
+
+
+ // leftDownLabel
+ addParameter("leftDownLabel",
+ leftDownlabel != null ? findValue(leftDownlabel, String.class) : "v");
+
+
+ // rightUpLabel
+ addParameter("rightUpLabel",
+ rightUpLabel != null ? findValue(rightUpLabel, String.class) : "^");
+
+
+ // rightDownlabel
+ addParameter("rightDownLabel",
+ rightDownLabel != null ? findValue(rightDownLabel, String.class) : "v");
+
+
+
+ // inform the form component our select tag infos, so they know how to select
+ // its elements upon onsubmit
+ Form formAncestor = (Form) findAncestor(Form.class);
+ if (formAncestor != null) {
+
+ // inform ancestor form that we are having a customOnsubmit (see form-close.ftl [simple theme])
+ enableAncestorFormCustomOnsubmit();
+
+
+ // key -> select tag id, value -> headerKey (if exists)
+ Map formOptiontransferselectIds = (Map) formAncestor.getParameters().get("optiontransferselectIds");
+ Map formOptiontransferselectDoubleIds = (Map) formAncestor.getParameters().get("optiontransferselectDoubleIds");
+
+ // init lists
+ if (formOptiontransferselectIds == null) {
+ formOptiontransferselectIds = new LinkedHashMap();
+ }
+ if (formOptiontransferselectDoubleIds == null) {
+ formOptiontransferselectDoubleIds = new LinkedHashMap();
+ }
+
+
+ // id
+ String tmpId = (String) getParameters().get("id");
+ String tmpHeaderKey = (String) getParameters().get("headerKey");
+ if (tmpId != null && (! formOptiontransferselectIds.containsKey(tmpId))) {
+ formOptiontransferselectIds.put(tmpId, tmpHeaderKey);
+ }
+
+ // doubleId
+ String tmpDoubleId = (String) getParameters().get("doubleId");
+ String tmpDoubleHeaderKey = (String) getParameters().get("doubleHeaderKey");
+ if (tmpDoubleId != null && (! formOptiontransferselectDoubleIds.containsKey(tmpDoubleId))) {
+ formOptiontransferselectDoubleIds.put(tmpDoubleId, tmpDoubleHeaderKey);
+ }
+
+ formAncestor.getParameters().put("optiontransferselectIds", formOptiontransferselectIds);
+ formAncestor.getParameters().put("optiontransferselectDoubleIds", formOptiontransferselectDoubleIds);
+
+ }
+ else {
+ _log.warn("form enclosing optiontransferselect "+this+" not found, auto select upon form submit of optiontransferselect will not work");
+ }
+ }
+
+
+
+ public String getAddAllToLeftLabel() {
+ return addAllToLeftLabel;
+ }
+
+ /**
* set Add To Left button label
- * @s.tagattribute required="false"
- */
- public void setAddAllToLeftLabel(String addAllToLeftLabel) {
- this.addAllToLeftLabel = addAllToLeftLabel;
- }
-
- public String getAddAllToRightLabel() {
- return addAllToRightLabel;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAddAllToLeftLabel(String addAllToLeftLabel) {
+ this.addAllToLeftLabel = addAllToLeftLabel;
+ }
+
+ public String getAddAllToRightLabel() {
+ return addAllToRightLabel;
+ }
- /**
+ /**
* set Add All To Right button label
- * @s.tagattribute required="false"
- */
- public void setAddAllToRightLabel(String addAllToRightLabel) {
- this.addAllToRightLabel = addAllToRightLabel;
- }
-
- public String getAddToLeftLabel() {
- return addToLeftLabel;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAddAllToRightLabel(String addAllToRightLabel) {
+ this.addAllToRightLabel = addAllToRightLabel;
+ }
+
+ public String getAddToLeftLabel() {
+ return addToLeftLabel;
+ }
- /**
+ /**
* set Add To Left button label
- * @s.tagattribute required="false"
- */
- public void setAddToLeftLabel(String addToLeftLabel) {
- this.addToLeftLabel = addToLeftLabel;
- }
-
- public String getAddToRightLabel() {
- return addToRightLabel;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAddToLeftLabel(String addToLeftLabel) {
+ this.addToLeftLabel = addToLeftLabel;
+ }
- /**
+ public String getAddToRightLabel() {
+ return addToRightLabel;
+ }
+
+ /**
* set Add To Right button label
- * @s.tagattribute required="false"
- */
- public void setAddToRightLabel(String addToRightLabel) {
- this.addToRightLabel = addToRightLabel;
- }
-
- public String getAllowAddAllToLeft() {
- return allowAddAllToLeft;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAddToRightLabel(String addToRightLabel) {
+ this.addToRightLabel = addToRightLabel;
+ }
- /**
+ public String getAllowAddAllToLeft() {
+ return allowAddAllToLeft;
+ }
+
+ /**
* enable Add All To Left button
- * @s.tagattribute required="false"
- */
- public void setAllowAddAllToLeft(String allowAddAllToLeft) {
- this.allowAddAllToLeft = allowAddAllToLeft;
- }
-
- public String getAllowAddAllToRight() {
- return allowAddAllToRight;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAllowAddAllToLeft(String allowAddAllToLeft) {
+ this.allowAddAllToLeft = allowAddAllToLeft;
+ }
- /**
+ public String getAllowAddAllToRight() {
+ return allowAddAllToRight;
+ }
+
+ /**
* enable Add All To Right button
- * @s.tagattribute required="false"
- */
- public void setAllowAddAllToRight(String allowAddAllToRight) {
- this.allowAddAllToRight = allowAddAllToRight;
- }
-
- public String getAllowAddToLeft() {
- return allowAddToLeft;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAllowAddAllToRight(String allowAddAllToRight) {
+ this.allowAddAllToRight = allowAddAllToRight;
+ }
- /**
+ public String getAllowAddToLeft() {
+ return allowAddToLeft;
+ }
+
+ /**
* enable Add To Left button
- * @s.tagattribute required="false"
- */
- public void setAllowAddToLeft(String allowAddToLeft) {
- this.allowAddToLeft = allowAddToLeft;
- }
-
- public String getAllowAddToRight() {
- return allowAddToRight;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAllowAddToLeft(String allowAddToLeft) {
+ this.allowAddToLeft = allowAddToLeft;
+ }
+
+ public String getAllowAddToRight() {
+ return allowAddToRight;
+ }
- /**
+ /**
* enable Add To Right button
- * @s.tagattribute required="false"
- */
- public void setAllowAddToRight(String allowAddToRight) {
- this.allowAddToRight = allowAddToRight;
- }
-
- public String getLeftTitle() {
- return leftTitle;
- }
-
-
- /**
- * enable up / down on the left side
- * @a2 tagattribute required="false"
- */
- public void setAllowUpDownOnLeft(String allowUpDownOnLeft) {
- this.allowUpDownOnLeft = allowUpDownOnLeft;
- }
-
- public String getAllowUpDownOnLeft() {
- return this.allowUpDownOnLeft;
- }
-
-
- /**
- * enable up / down on the right side
- * @a2 tagattribute required="false"
- */
- public void setAllowUpDownOnRight(String allowUpDownOnRight) {
- this.allowUpDownOnRight = allowUpDownOnRight;
- }
-
- public String getAllowUpDownOnRight() {
- return this.allowUpDownOnRight;
- }
-
+ * @s.tagattribute required="false"
+ */
+ public void setAllowAddToRight(String allowAddToRight) {
+ this.allowAddToRight = allowAddToRight;
+ }
+
+ public String getLeftTitle() {
+ return leftTitle;
+ }
+
+
+ /**
+ * enable up / down on the left side
+ * @a2 tagattribute required="false"
+ */
+ public void setAllowUpDownOnLeft(String allowUpDownOnLeft) {
+ this.allowUpDownOnLeft = allowUpDownOnLeft;
+ }
+
+ public String getAllowUpDownOnLeft() {
+ return this.allowUpDownOnLeft;
+ }
+
+
+ /**
+ * enable up / down on the right side
+ * @a2 tagattribute required="false"
+ */
+ public void setAllowUpDownOnRight(String allowUpDownOnRight) {
+ this.allowUpDownOnRight = allowUpDownOnRight;
+ }
+
+ public String getAllowUpDownOnRight() {
+ return this.allowUpDownOnRight;
+ }
+
- /**
+ /**
* set Left title
- * @s.tagattribute required="false"
- */
- public void setLeftTitle(String leftTitle) {
- this.leftTitle = leftTitle;
- }
-
- public String getRightTitle() {
- return rightTitle;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setLeftTitle(String leftTitle) {
+ this.leftTitle = leftTitle;
+ }
- /**
+ public String getRightTitle() {
+ return rightTitle;
+ }
+
+ /**
* set Right title
- * @s.tagattribute required="false"
- */
- public void setRightTitle(String rightTitle) {
- this.rightTitle = rightTitle;
- }
-
-
- /**
+ * @s.tagattribute required="false"
+ */
+ public void setRightTitle(String rightTitle) {
+ this.rightTitle = rightTitle;
+ }
+
+
+ /**
* enable Select All button
- * @s.tagattribute required="false"
- */
- public void setAllowSelectAll(String allowSelectAll) {
- this.allowSelectAll = allowSelectAll;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setAllowSelectAll(String allowSelectAll) {
+ this.allowSelectAll = allowSelectAll;
+ }
public String getAllowSelectAll() {
- return this.allowSelectAll;
- }
-
-
- /**
+ return this.allowSelectAll;
+ }
+
+
+ /**
* set Select All button label
- * @s.tagattribute required="false"
- */
- public void setSelectAllLabel(String selectAllLabel) {
- this.selectAllLabel = selectAllLabel;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setSelectAllLabel(String selectAllLabel) {
+ this.selectAllLabel = selectAllLabel;
+ }
public String getSelectAllLabel() {
- return this.selectAllLabel;
- }
+ return this.selectAllLabel;
+ }
/**
* set buttons css class
- * @s.tagattribute required="false"
- */
- public void setButtonCssClass(String buttonCssClass) {
- this.buttonCssClass = buttonCssClass;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setButtonCssClass(String buttonCssClass) {
+ this.buttonCssClass = buttonCssClass;
+ }
public String getButtonCssClass() {
- return buttonCssClass;
- }
-
-
- /**
+ return buttonCssClass;
+ }
+
+
+ /**
* set button css style
- * @s.tagattribute required="false"
- */
- public void setButtonCssStyle(String buttonCssStyle) {
- this.buttonCssStyle = buttonCssStyle;
- }
+ * @s.tagattribute required="false"
+ */
+ public void setButtonCssStyle(String buttonCssStyle) {
+ this.buttonCssStyle = buttonCssStyle;
+ }
public String getButtonCssStyle() {
- return this.buttonCssStyle;
- }
-
-
+ return this.buttonCssStyle;
+ }
+
+
/**
* Up label for the left side
* @a2 tagattribute required="false"
*/
public void setLeftUpLabel(String leftUpLabel) {
- this.leftUpLabel = leftUpLabel;
+ this.leftUpLabel = leftUpLabel;
}
public String getLeftUpLabel() {
- return this.leftUpLabel;
+ return this.leftUpLabel;
}
-
+
/**
* Down label for the left side.
* @a2 tagattribute required="false"
*/
public void setLeftDownLabel(String leftDownLabel) {
- this.leftDownlabel = leftDownLabel;
+ this.leftDownlabel = leftDownLabel;
}
public String getLeftDownLabel() {
- return this.leftDownlabel;
+ return this.leftDownlabel;
}
-
+
/**
* Up label for the right side.
* @a2 tagattribute required="false"
*/
public void setRightUpLabel(String rightUpLabel) {
- this.rightUpLabel = rightUpLabel;
+ this.rightUpLabel = rightUpLabel;
}
public String getRightUpLabel() {
- return this.rightUpLabel;
+ return this.rightUpLabel;
}
-
-
+
+
/**
* Down label for the left side.
* @a2 tagattribute required="false"
*/
public void setRightDownLabel(String rightDownlabel) {
- this.rightDownLabel = rightDownlabel;
+ this.rightDownLabel = rightDownlabel;
}
public String getRightDownLabel() {
- return rightDownLabel;
+ return rightDownLabel;
}
-
-
+
+
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
@@ -37,7 +40,7 @@
* This tag has the following two paramters.
* <!-- START SNIPPET: params -->
* <ul>
- * <li>name (String) - the name of the parameter</li>
+ * <li>name (String) - the name of the parameter</li>
* <li>value (Object) - the value of the parameter</li>
* </ul>
* <!-- END SNIPPET: params -->
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Password.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Password.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Password.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Password.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -28,29 +31,29 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Used to get the property of a <i>value</i>, which will default to the top of
* the stack if none is specified.
- *
+ *
* <!-- END SNIPPET: javadoc -->
- *
+ *
* <p/>
- *
+ *
*
* <!-- START SNIPPET: params -->
- *
+ *
* <ul>
* <li>default (String) - The default value to be used if <u>value</u> attribute is null</li>
* <li>escape (Boolean) - Escape HTML. Default to true</li>
* <li>value (Object) - value to be displayed</li>
* </ul>
- *
+ *
* <!-- END SNIPPET: params -->
*
*
* <pre>
* <!-- START SNIPPET: example -->
- *
+ *
* <s:push value="myBean">
* <!-- Example 1: -->
* <s:property value="myBeanProperty" />
@@ -58,25 +61,25 @@
* <!-- Example 2: -->TextUtils
* <s:property value="myBeanProperty" default="a default value" />
* </s:push>
- *
+ *
* <!-- END SNIPPET: example -->
* </pre>
- *
+ *
* <pre>
* <!-- START SNIPPET: exampledescription -->
- *
+ *
* Example 1 prints the result of myBean's getMyBeanProperty() method.
* Example 2 prints the result of myBean's getMyBeanProperty() method and if it is null, print 'a default value' instead.
- *
+ *
* <!-- END SNIPPET: exampledescription -->
* </pre>
- *
- *
+ *
+ *
* <pre>
* <!-- START SNIPPET: i18nExample -->
- *
+ *
* <s:property value="getText('some.key')" />
- *
+ *
* <!-- END SNIPPET: i18nExample -->
* </pre>
*
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Push.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Push.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Push.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Push.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -28,7 +31,7 @@
*
* <!-- START SNIPPET: params -->
* <ul>
- * <li>value* (Object) - value to be pushed into the top of the stack</li>
+ * <li>value* (Object) - value to be pushed into the top of the stack</li>
* </ul>
* <!-- END SNIPPET: params -->
*
@@ -42,22 +45,22 @@
* </s:push>
* <!-- END SNIPPET: example1 -->
* </pre>
- *
+ *
* <!-- START SNIPPET: example1description -->
- * Pushed user into the stack, and hence property tag could access user's properties
+ * Pushed user into the stack, and hence property tag could access user's properties
* (firstName, lastName etc) since user is not at the top of the stack
* <!-- END SNIPPET: example1description -->
- *
+ *
* <pre>
* <!-- START SNIPPET: example2 -->
* <s:push value="myObject"> ----- (1)
* <s:bean name="jp.SomeBean" id="myBean"/> ----- (2)
- * <s:param name="myParam" value="top"/> ----- (3)
+ * <s:param name="myParam" value="top"/> ----- (3)
* </s:bean>
* </s:push>
* <!-- END SNIPPET: example2 -->
* </pre>
- *
+ *
* <pre>
* <!-- START SNIPPET: example2description -->
* when in (1), myObject is at the top of the stack
@@ -65,7 +68,7 @@
* when in (3), top will get the jp.SomeBean instance
* <!-- END SNIPPET: example2description -->
* </pre>
- *
+ *
* <pre>
* <!-- START SNIPPET: example3 -->
* <s:push value="myObject"> ---(A)
@@ -75,7 +78,7 @@
* </s:push>
* <!-- END SNIPPET: example3 -->
* </pre>
- *
+ *
* <pre>
* <!-- START SNIPPET: example3description -->
* when in (A), myObject is at the top of the stack
@@ -83,9 +86,9 @@
* when in (C), top refers to jp.SomeBean instance. so top.mySomeOtherValue would invoke SomeBean's mySomeOtherValue() method
* <!-- END SNIPPET: example3description -->
* </pre>
- *
+ *
* <pre>
- * <!-- START SNIPPET: example4 -->
+ * <!-- START SNIPPET: example4 -->
* <s:push value="myObject"> ---- (i)
* <s:bean name="jp.SomeBean" id="myBean"/> ---- (ii)
* <s:param name="myParam" value="[1].top"/> -----(iii)
@@ -93,15 +96,15 @@
* </s:push>
* <!-- END SNIPPET: example4 -->
* </pre>
- *
+ *
* <pre>
* <!-- START SNIPPET: example4description -->
* when in (i), myObject is at the top of the stack
* when in (ii), jp.SomeBean is at the top of the stack, followed by myObject
- * when in (iii), [1].top will returned top of the cut of stack starting from myObject, namely myObject itself
+ * when in (iii), [1].top will returned top of the cut of stack starting from myObject, namely myObject itself
* <!-- END SNIPPET: example4description -->
* </pre>
- *
+ *
* @s.tag name="push" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.PushTag"
* description="Push value on stack for simplified usage."
*/
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Radio.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Radio.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Radio.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Radio.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
@@ -32,8 +35,8 @@
* <!-- START SNIPPET: exdescription -->
* In this example, a radio control is displayed with a list of genders. The gender list is built from attribute
* id=genders. The framework calls getGenders() which will return a Map. For examples using listKey and listValue attributes,
- * see the section select tag. The default selected one will be determined (in this case) by the getMale() method
- * in the action class which should retun a value similar to the key of the getGenters() map if that particular
+ * see the section select tag. The default selected one will be determined (in this case) by the getMale() method
+ * in the action class which should retun a value similar to the key of the getGenters() map if that particular
* gender is to be selected.<p/>
* <!-- END SNIPPET: exdescription -->
* <pre>
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RemoteCallUIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RemoteCallUIBean.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RemoteCallUIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RemoteCallUIBean.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
*
- * 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
*
- * 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.
+ * 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.components;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Select.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Select.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Select.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Select.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.components;
@@ -24,15 +27,15 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
- * Render an HTML input tag of type select.
- *
+ *
+ * Render an HTML input tag of type select.
+ *
* <!-- END SNIPPET: javadoc -->
*
* <p/> <b>Examples</b>
* <pre>
* <!-- START SNIPPET: example -->
- *
+ *
* <s:select label="Pets"
* name="petIds"
* list="petDao.pets"
@@ -53,21 +56,21 @@
*
* // The month id (01, 02, ...) returned by the getSelectedMonth() call
* // against the stack will be auto-selected
- *
+ *
* <!-- END SNIPPET: example -->
* </pre>
- *
+ *
* <p/>
- *
+ *
* <!-- START SNIPPET: exnote -->
- *
+ *
* Note: For any of the tags that use lists (select probably being the most ubiquitous), which uses the OGNL list
* notation (see the "months" example above), it should be noted that the map key created (in the months example,
* the '01', '02', etc.) is typed. '1' is a char, '01' is a String, "1" is a String. This is important since if
* the value returned by your "value" attribute is NOT the same type as the key in the "list" attribute, they
* WILL NOT MATCH, even though their String values may be equivalent. If they don't match, nothing in your list
* will be auto-selected.<p/>
- *
+ *
* <!-- END SNIPPET: exnote -->
*
* @s.tag name="select" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.SelectTag"