Author: tmjee Date: Tue Apr 11 01:55:26 2006 New Revision: 393162 URL: http://svn.apache.org/viewcvs?rev=393162&view=rev Log: changed velocity and freemarker prefix from ww to saf freemarker @ww.url -> @saf.url velocity wwurl -> safurl
Modified: incubator/webwork2/webapps/build.xml incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl incubator/webwork2/webapps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml incubator/webwork2/webapps/showcase/src/main/webapp/continuations/guess.ftl incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/example.vm incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/exampleSubmited.vm incubator/webwork2/webapps/showcase/src/main/webapp/token/example4.ftl Modified: incubator/webwork2/webapps/build.xml URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/build.xml?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/build.xml (original) +++ incubator/webwork2/webapps/build.xml Tue Apr 11 01:55:26 2006 @@ -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@"/ --> + <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} | - +=============================================================+ - </echo> + +=============================================================================+ + | -- 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"> Modified: incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl (original) +++ incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl Tue Apr 11 01:55:26 2006 @@ -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> Modified: incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl (original) +++ incubator/webwork2/webapps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl Tue Apr 11 01:55:26 2006 @@ -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> Modified: incubator/webwork2/webapps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml (original) +++ incubator/webwork2/webapps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml Tue Apr 11 01:55:26 2006 @@ -5,6 +5,8 @@ <xwork> <include file="struts-default.xml"/> + + <include file="xwork-tmjee.xml" /> <include file="config-browser.xml"/> Modified: incubator/webwork2/webapps/showcase/src/main/webapp/continuations/guess.ftl URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/showcase/src/main/webapp/continuations/guess.ftl?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/showcase/src/main/webapp/continuations/guess.ftl (original) +++ incubator/webwork2/webapps/showcase/src/main/webapp/continuations/guess.ftl Tue Apr 11 01:55:26 2006 @@ -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 --> Modified: incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/example.vm URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/example.vm?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/example.vm (original) +++ incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/example.vm Tue Apr 11 01:55:26 2006 @@ -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> Modified: incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/exampleSubmited.vm URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/exampleSubmited.vm?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/exampleSubmited.vm (original) +++ incubator/webwork2/webapps/showcase/src/main/webapp/tags/ui/exampleSubmited.vm Tue Apr 11 01:55:26 2006 @@ -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> Modified: incubator/webwork2/webapps/showcase/src/main/webapp/token/example4.ftl URL: http://svn.apache.org/viewcvs/incubator/webwork2/webapps/showcase/src/main/webapp/token/example4.ftl?rev=393162&r1=393161&r2=393162&view=diff ============================================================================== --- incubator/webwork2/webapps/showcase/src/main/webapp/token/example4.ftl (original) +++ incubator/webwork2/webapps/showcase/src/main/webapp/token/example4.ftl Tue Apr 11 01:55:26 2006 @@ -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> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]