| <!-- |
| Copyright 2002,2004 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. |
| --> |
| |
| <j:jelly xmlns:j="jelly:core"> |
| <j:if test="${test.simpleNew}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"/> |
| </j:if> |
| <j:if test="${test.newThenOverwrite}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"/> |
| <j:new var="foo" className="java.util.Date"/> |
| </j:if> |
| <j:if test="${test.newWithLiteralArg}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg value="Jane Doe"/> |
| </j:new> |
| </j:if> |
| <j:if test="${test.newWithTwoArgs}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg value="Jane Doe"/> |
| <j:arg value="Chicago"/> |
| </j:new> |
| </j:if> |
| <j:if test="${test.newWithExpressionArg}"> |
| <j:set var="namearg" value="Jane Doe"/> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg value="${namearg}"/> |
| </j:new> |
| </j:if> |
| <j:if test="${test.newWithNullArg}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg type="java.lang.String"/> |
| </j:new> |
| </j:if> |
| <j:if test="${test.newWithNewArg}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg type="java.lang.String"> |
| <j:new className="java.lang.String"/> |
| </j:arg> |
| </j:new> |
| <j:new var="bar" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg value="Jane Doe"/> |
| <j:arg value="Chicago"/> |
| <j:arg><j:new className="org.apache.commons.jelly.core.Order"/></j:arg> |
| </j:new> |
| <j:new var="qux" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg> |
| <j:new className="org.apache.commons.jelly.core.Customer"> |
| <j:arg value="Jane Doe"/> |
| <j:arg value="Chicago"/> |
| <j:arg><j:new className="org.apache.commons.jelly.core.Order"/></j:arg> |
| </j:new> |
| </j:arg> |
| </j:new> |
| </j:if> |
| <j:if test="${test.newWithUseBeanArg}"> |
| <j:new var="foo" className="org.apache.commons.jelly.core.Customer"> |
| <j:arg> |
| <j:useBean class="org.apache.commons.jelly.core.Customer" name="Jane Doe" city="Chicago" location="Location"/> |
| </j:arg> |
| </j:new> |
| </j:if> |
| </j:jelly> |