changed velocity and freemarker prefix from ww to saf

freemarker 
      @ww.url   ->   @saf.url
   velocity
      wwurl     ->   safurl



git-svn-id: https://svn.apache.org/repos/asf/incubator/webwork2@393162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Toby Jee
2006-04-11 08:55:26 +00:00
parent da8b5c3cf6
commit 34187cd31e
8 changed files with 99 additions and 63 deletions
+49 -15
View File
@@ -65,6 +65,7 @@
</macrodef>
<target name="build">
<!-- prepare -->
<delete dir="${basedir}/tmp" />
<mkdir dir="${basedir}/tmp" />
@@ -110,10 +111,12 @@
<!-- Prompt the user for input -->
<input message="Enter the name of your new application [myapp]?" addproperty="new.app.name"
defaultvalue="myapp"/>
defaultvalue="myapp" />
<input message="Enter the location of your new application [${basedir}]?" addproperty="new.app.location"
defaultvalue="${basedir}" />
<echo level="info">Creating '${new.app.name}' web application...</echo>
<copy todir="${new.app.name}">
<echo level="info">Creating '${new.app.location}/${new.app.name}' web application...</echo>
<copy todir="${new.app.location}/${new.app.name}">
<fileset dir="${basedir}/blank">
<exclude name="tmp/**"/>
<exclude name="build/**"/>
@@ -127,27 +130,58 @@
</copy>
<!-- Copy the IDEA project file(s) -->
<copy file="blank/blank.iml" tofile="${new.app.name}/${new.app.name}.iml"/>
<!--copy file="blank/blank.iml" tofile="${new.app.name}/${new.app.name}.iml"/>
<replace dir="${new.app.name}" value="${new.app.name}" token="blank">
<include name="${new.app.name}.i*"/>
</replace>
</replace -->
<!-- Copy the Eclipse project file(s) -->
<copy file="blank/.classpath" tofile="${new.app.name}/.classpath"/>
<!--copy file="blank/.classpath" tofile="${new.app.name}/.classpath"/>
<replace file="${new.app.name}/.classpath" value="${basedir}/.." token="@WEBWORK_HOME@"/>
<replace file="${new.app.name}/.classpath" value="${version}" token="@WEBWORK_VERSION@"/>
<copy file="blank/.project" tofile="${new.app.name}/.project"/>
<replace file="${new.app.name}/.project" value="${new.app.name}" token="@PROJECT_NAME@"/>
<replace file="${new.app.name}/.project" value="${new.app.name}" token="@PROJECT_NAME@"/ -->
<echo level="info">
+=============================================================+
| -- Your Web Application was created successfully! -- |
| |
| Now you should be able to build your application with: |
| > ant build -Dwebapp=${new.app.name} |
+=============================================================+
</echo>
<condition property="hasWebappLocation">
<not>
<equals arg1="${new.app.location}" arg2="${basedir}" casesensitive="true" trim="true"/>
</not>
</condition>
<antcall target="printConfigMessageWithWebAppLocation" />
<antcall target="printConfigMessageWithoutWebAppLocation" />
</target>
<target name="printConfigMessageWithWebAppLocation" if="hasWebAppLocation">
<echo level="info">
+=============================================================================+
| -- Your Web Application was created successfully! -- |
| |
| Now you should be able to build your application with: |
| > ant build -Dwebapp=${new.app.name} |
| |
| Or if you have changed the default web app location: |
| > ant build -Dwebapp=${new.app.name} -Dwebapplocation=${new.app.location} |
| |
+=============================================================================+
</echo>
</target>
<target name="printConfigMessageWithoutWebAppLocation" unless="hasWebAppLocation">
<echo level="info">
+=============================================================================+
| -- Your Web Application was created successfully! -- |
| |
| Now you should be able to build your application with: |
| > ant build -Dwebapp=${new.app.name} |
| |
| Or if you have changed the default web app location: |
| > ant build -Dwebapp=${new.app.name} -Dwebapplocation=${new.app.location} |
| |
+=============================================================================+
</echo>
</target>
<target name="build-portlet" depends="prepare-portlet,prepare-portlet-deploy" description="Builds the portlet application. You can use the 'container' system property to target a specific container, e.g. '-Dcontainer=exo'. Supported containers are exo, gridsphere, jboss-portal-2.0, jboss-portal-2.2 and jetspeed2">
@@ -1,3 +1,3 @@
<b>Hello from FreeMarker, ${firstName} ${lastName}!</b>
<p/>
<a href="<@ww.url action="index"/>">Back to front page</a>
<a href="<@saf.url action="index"/>">Back to front page</a>
@@ -1,5 +1,5 @@
<@ww.form action="processFreeMarkerExample" method="POST">
<@ww.textfield label="First name" name="firstName"/>
<@ww.textfield label="Last name" name="lastName"/>
<@ww.submit value="Say hello!"/>
</@ww.form>
<@saf.form action="processFreeMarkerExample" method="POST">
<@saf.textfield label="First name" name="firstName"/>
<@saf.textfield label="Last name" name="lastName"/>
<@saf.submit value="Say hello!"/>
</@saf.form>
@@ -5,6 +5,8 @@
<xwork>
<include file="struts-default.xml"/>
<include file="xwork-tmjee.xml" />
<include file="config-browser.xml"/>
@@ -9,10 +9,10 @@
${msg}
</#list>
<@ww.form action="guess" method="post">
<@ww.textfield label="Guess" name="guess"/>
<@ww.submit value="Guess"/>
</@ww.form>
<@saf.form action="guess" method="post">
<@saf.textfield label="Guess" name="guess"/>
<@saf.submit value="Guess"/>
</@saf.form>
</body>
</html>
<!-- END SNIPPET: example -->
@@ -1,32 +1,32 @@
<html>
<head>
<title>UI Tags Example</title>
#wwhead()
#safhead()
</head>
<body>
#wwurl ("id=url" "value=index.jsp")
#safurl ("id=url" "value=index.jsp")
<a href="${url}">Back to index.jsp</a>!
#wwform ("action=exampleSubmitVelocity" "method=post" "enctype=multipart/form-data")
#wwtextfield ("label=Name" "name=name")
#wwdatepicker ("label=Birthday" "name=birthday")
#wwtextarea ("label=Biograph" "name=bio" "cols=20" "rows=3")
#wwselect ("label=Favorite Color" "list={'Red', 'Blue', 'Green'}" "name=favoriteColor" "emptyOption=true" "headerKey=None" "headerValue=None")
#wwselect ("label=Favourite Language" "list=favouriteLanguages" "name=favouriteLanguage" "listKey=key" "listValue=description" "emptyOption=true" "headerKey=None" "headerValue=None")
#wwcheckboxlist ("label=Friends" "list={'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" "name=friends")
#wwcheckbox ("label=Age 18+" "name=legalAge")
#wwdoubleselect ("label=State" "name=region" "list={'North', 'South'}" "value='North'" "doubleValue='Florida'" "doubleList=top == 'North' ? {'Oregon', 'Washington'} : {'Texas', 'Florida'}" "doubleName=state" "headerKey=-1" "headerValue=---------- Please Select ----------" "emptyOption=true" )
#wwdoubleselect ("label=Favourite Vehical" "name=favouriteVehicalType" "list=vehicalTypeList" "listKey=key" "listValue=description" "value='MotorcycleKey'" "doubleValue='YamahaKey'" "doubleList=vehicalSpecificList" "doubleListKey=key" "doubleListValue=description" "doubleName=favouriteVehicalSpecific" "headerKey=-1" "headerValue=---------- Please Select ----------" "emptyOption=true" )
#wwfile ("label=Picture" "name=picture")
#wwoptiontransferselect ("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" )
#wwsubmit()
#wwreset()
#safform ("action=exampleSubmitVelocity" "method=post" "enctype=multipart/form-data")
#saftextfield ("label=Name" "name=name")
#safdatepicker ("label=Birthday" "name=birthday")
#saftextarea ("label=Biograph" "name=bio" "cols=20" "rows=3")
#safselect ("label=Favorite Color" "list={'Red', 'Blue', 'Green'}" "name=favoriteColor" "emptyOption=true" "headerKey=None" "headerValue=None")
#safselect ("label=Favourite Language" "list=favouriteLanguages" "name=favouriteLanguage" "listKey=key" "listValue=description" "emptyOption=true" "headerKey=None" "headerValue=None")
#safcheckboxlist ("label=Friends" "list={'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" "name=friends")
#safcheckbox ("label=Age 18+" "name=legalAge")
#safdoubleselect ("label=State" "name=region" "list={'North', 'South'}" "value='North'" "doubleValue='Florida'" "doubleList=top == 'North' ? {'Oregon', 'Washington'} : {'Texas', 'Florida'}" "doubleName=state" "headerKey=-1" "headerValue=---------- Please Select ----------" "emptyOption=true" )
#safdoubleselect ("label=Favourite Vehical" "name=favouriteVehicalType" "list=vehicalTypeList" "listKey=key" "listValue=description" "value='MotorcycleKey'" "doubleValue='YamahaKey'" "doubleList=vehicalSpecificList" "doubleListKey=key" "doubleListValue=description" "doubleName=favouriteVehicalSpecific" "headerKey=-1" "headerValue=---------- Please Select ----------" "emptyOption=true" )
#saffile ("label=Picture" "name=picture")
#safoptiontransferselect ("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" )
#safsubmit()
#safreset()
#end
#wwa("href=${url}")Back to index.jsp#end
#safa("href=${url}")Back to index.jsp#end
</body>
</html>
@@ -6,18 +6,18 @@
<h1>Example Submitted</h1>
<table>
#wwlabel ("label=Name" "name=name")
#wwlabel ("label=Birthday" "name=birthday")
#wwlabel ("label=Biography" "name=bio")
#wwlabel ("label=Favourite Color" "name=favouriteColor")
#wwlabel ("label=Friends" "name=friends")
#wwlabel ("label=Legal Age" "name=legalAge")
#wwlabel ("label=Region" "name=region")
#wwlabel ("label=State" "name=state")
#wwlabel ("label=Picture" "name=picture")
#wwlabel ("label=Favourite Language" "name=favouriteLanguage")
#wwlabel ("label=Favourite Vehical Type" "name=favouriteVehicalType")
#wwlabel ("label=Favourite Vehical Specific" "name=favouriteVehicalSpecific")
#saflabel ("label=Name" "name=name")
#saflabel ("label=Birthday" "name=birthday")
#saflabel ("label=Biography" "name=bio")
#saflabel ("label=Favourite Color" "name=favouriteColor")
#saflabel ("label=Friends" "name=friends")
#saflabel ("label=Legal Age" "name=legalAge")
#saflabel ("label=Region" "name=region")
#saflabel ("label=State" "name=state")
#saflabel ("label=Picture" "name=picture")
#saflabel ("label=Favourite Language" "name=favouriteLanguage")
#saflabel ("label=Favourite Vehical Type" "name=favouriteVehicalType")
#saflabel ("label=Favourite Vehical Specific" "name=favouriteVehicalSpecific")
<tr>
<td>Favourite Cartoon Characters (Left):</td>
<td>
@@ -40,8 +40,8 @@
</tr>
</table>
#wwurl ("id=url" "value=index.jsp")
#wwa("href=${url}")Back to index.jsp#end
#safurl ("id=url" "value=index.jsp")
#safa("href=${url}")Back to index.jsp#end
</body>
</html>
@@ -12,15 +12,15 @@
while rendering the page.
<p/>
<br/>Balance of source account: <@ww.property value="#session.balanceSource"/>
<br/>Balance of destination account: <@ww.property value="#session.balanceDestination"/>
<br/>Balance of source account: <@saf.property value="#session.balanceSource"/>
<br/>Balance of destination account: <@saf.property value="#session.balanceDestination"/>
<p/>
<@ww.form action="transfer4">
<@ww.token/>
<@ww.textfield label="Amount" name="amount" required="true" value="400"/>
<@ww.submit value="Transfer money"/>
</@ww.form>
<@saf.form action="transfer4">
<@saf.token/>
<@saf.textfield label="Amount" name="amount" required="true" value="400"/>
<@saf.submit value="Transfer money"/>
</@saf.form>
</body>
</html>