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/08/20 00:03:09 UTC
svn commit: r432886 [1/3] - in /struts/struts2/trunk: ant-build/
apps/mailreader/src/main/java/mailreader2/
apps/mailreader/src/main/java/mailreader2/registration/
apps/mailreader/src/main/java/mailreader2/service/
apps/mailreader/src/main/resources/ a...
Author: husted
Date: Sat Aug 19 15:03:04 2006
New Revision: 432886
URL: http://svn.apache.org/viewvc?rev=432886&view=rev
Log:
WW-1340 Update Javadocs, constants, and such. No functional changes.
Added:
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppService.java
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppConfig.java
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppService.java
struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseAppDataTest.java
struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/WelcomeTest.java
Modified:
struts/struts2/trunk/ant-build/osbuild.xml
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppData.java
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/Welcome.java
struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/registration/Update.java
struts/struts2/trunk/apps/mailreader/src/main/resources/applicationContext.xml
struts/struts2/trunk/apps/mailreader/src/main/resources/sql/sql-map.xml
struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/Welcome.jsp
struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseSqlMapTest.java
struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/SqlMapTest.java
struts/struts2/trunk/apps/mailreader/src/test/resources/sql/mailreader-sample.sql
struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl
struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java
struts/struts2/trunk/apps/showcase/src/main/resources/struts-token.xml
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example4.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel2.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel3.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomsAvailable.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/sendMessageToRoomResult.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/chat/usersAvailableInRoom.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/continuations/guess.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanMenu.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanNonAjax.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateGuessLeft.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateScaffold.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateVocabCharacters.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/ifTag/testIf.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/token/example4.ftl
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Bean.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/GenericUIBean.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Radio.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Tree.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TreeNode.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/entities/FreeMarkerView.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/StrutsModels.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/ContextUtil.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java
struts/struts2/trunk/core/src/main/resources/config-browser/actionNames.ftl
struts/struts2/trunk/core/src/main/resources/config-browser/page-header.ftl
struts/struts2/trunk/core/src/main/resources/config-browser/showConfig.ftl
struts/struts2/trunk/core/src/main/resources/config-browser/tigris-macros.ftl
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/interceptor/debugging/console.ftl
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/interceptor/wait.ftl
struts/struts2/trunk/core/src/main/resources/template/ajax/head.ftl
struts/struts2/trunk/core/src/main/resources/template/ajax/submit-ajax.ftl
struts/struts2/trunk/core/src/main/resources/template/ajax/textarea.ftl
struts/struts2/trunk/core/src/main/resources/template/ajax/tree.ftl
struts/struts2/trunk/core/src/main/resources/template/ajax/treenode.ftl
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/head.ftl
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/label.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/datepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/file.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/head.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/hidden.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/label.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/password.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/reset.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/submit.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/tabbedpanel-close.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/table.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/textarea.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl
struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl
struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl
struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ElseTagTest.java
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/tutorial/sitegraph/guess-input.ftl
struts/struts2/trunk/docs/tags/GenericUIBean.html
struts/struts2/trunk/docs/tags/IteratorComponent.html
struts/struts2/trunk/docs/tags/Tree.html
Modified: struts/struts2/trunk/ant-build/osbuild.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/ant-build/osbuild.xml?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/ant-build/osbuild.xml (original)
+++ struts/struts2/trunk/ant-build/osbuild.xml Sat Aug 19 15:03:04 2006
@@ -237,8 +237,8 @@
use="true"
verbose="false"
source="${compile.version}">
- <tag name="ww.tag" description="ww.tag" enabled="false"/>
- <tag name="ww.tagattribute" description="ww.tagattribute" enabled="false"/>
+ <tag name="s.tag" description="s.tag" enabled="false"/>
+ <tag name="s.tagattribute" description="s.tagattribute" enabled="false"/>
<link href="http://java.sun.com/j2se/${compile.version}/docs/api/"/>
<link href="http://java.sun.com/j2ee/${compile.version}/docs/api/"/>
</javadoc>
Modified: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppData.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppData.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppData.java (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppData.java Sat Aug 19 15:03:04 2006
@@ -1,12 +1,13 @@
package mailreader2;
+import java.util.List;
+
/**
* <p/>
* Provide properties to transfer data values between
* the view and model layers (data transfer object).
* </p>
*
- * @author Ted Husted
* @version $Revision: 1.0 $ $Date: Jul 30, 2006 9:29:50 AM $
*/
public class AppData {
@@ -16,6 +17,7 @@
private String locale_key;
private String locale_code;
private String locale_name;
+ private List locale_list;
private String registration_key;
private String username;
@@ -95,6 +97,14 @@
public void setLocale_name(String locale_name) {
this.locale_name = locale_name;
+ }
+
+ public List getLocale_list() {
+ return locale_list;
+ }
+
+ public void setLocale_list(List locale_list) {
+ this.locale_list = locale_list;
}
public String getRegistration_key() {
Added: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppService.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppService.java?rev=432886&view=auto
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppService.java (added)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/AppService.java Sat Aug 19 15:03:04 2006
@@ -0,0 +1,11 @@
+package mailreader2;
+
+import java.util.List;
+
+public interface AppService {
+
+ public List getLocaleList() throws Exception;
+
+ public void insertUser(AppData data) throws Exception;
+
+}
Modified: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/MailreaderSupport.java Sat Aug 19 15:03:04 2006
@@ -20,6 +20,7 @@
import com.opensymphony.util.BeanUtils;
import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.ModelDriven;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.apps.mailreader.dao.ExpiredPasswordException;
@@ -50,7 +51,32 @@
* avoids creating unnecessary local properties. Pick your poison.</p>
*/
public class MailreaderSupport extends ActionSupport
- implements SessionAware, ApplicationAware {
+ implements SessionAware, ApplicationAware, ModelDriven {
+
+ private AppService appService;
+
+ public AppService getAppService() {
+ return appService;
+ }
+
+ public void setAppService(AppService appService) {
+ this.appService = appService;
+ }
+
+ private AppData appData = new AppData();
+
+ public Object getModel() {
+ return appData;
+ }
+
+ public void setAppData(AppData appData) {
+ this.appData = appData;
+ }
+
+ public AppData getAppData() {
+ return appData;
+ }
+
/**
* Return CANCEL so apropriate result can be selected.
Modified: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/Welcome.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/Welcome.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/Welcome.java (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/Welcome.java Sat Aug 19 15:03:04 2006
@@ -1,9 +1,18 @@
package mailreader2;
+import com.opensymphony.xwork2.Preparable;
+import com.opensymphony.xwork2.ModelDriven;
+import java.util.List;
+
/**
* Verify that essential resources are available.
*/
-public class Welcome extends MailreaderSupport {
+public class Welcome extends MailreaderSupport implements Preparable {
+
+ public void prepare() throws Exception {
+ List value = getAppService().getLocaleList();
+ getAppData().setLocale_list(value);
+ }
public String execute() {
@@ -24,4 +33,5 @@
return SUCCESS;
}
}
+
}
Modified: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/registration/Update.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/registration/Update.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/registration/Update.java (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/registration/Update.java Sat Aug 19 15:03:04 2006
@@ -7,6 +7,9 @@
*/
public class Update extends Support {
+
+
+
private String fixNull(String value) {
if (value == null) return null;
String buffer = value.trim();
Added: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppConfig.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppConfig.java?rev=432886&view=auto
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppConfig.java (added)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppConfig.java Sat Aug 19 15:03:04 2006
@@ -0,0 +1,99 @@
+package mailreader2.service;
+
+import com.ibatis.common.resources.Resources;
+import com.ibatis.common.jdbc.ScriptRunner;
+import com.ibatis.sqlmap.client.SqlMapClient;
+import com.ibatis.sqlmap.client.SqlMapClientBuilder;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.io.Reader;
+import java.util.Properties;
+
+public class SqlMapAppConfig {
+
+ // ---- TEST MODE SETUP ----
+
+ protected void runScript(String script) throws Exception {
+ DataSource ds = getSqlMap().getDataSource();
+
+ Connection conn = ds.getConnection();
+
+ Reader reader = Resources.getResourceAsReader(script);
+
+ ScriptRunner runner = new ScriptRunner(conn, false, false);
+ runner.setLogWriter(null);
+ runner.setErrorLogWriter(null);
+
+ runner.runScript(reader);
+ conn.commit();
+ conn.close();
+ reader.close();
+ }
+
+ final static String[] CONFIG_SCRIPTS =
+ {"sql/mailreader-schema.sql","sql/mailreader-sample.sql"};
+
+ private boolean testMode = true;
+
+ public boolean isTestMode() {
+ return testMode;
+ }
+
+ public void setTestMode(boolean testMode) {
+ this.testMode = testMode;
+ }
+
+ // ---- SQL MAP SETUP ----
+
+ final static String CONFIG_FILE = "sql-map-config.xml";
+
+ protected String configFile;
+
+ public String getConfigFile() {
+ if (configFile==null) return CONFIG_FILE;
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile) {
+ this.configFile = configFile;
+ }
+
+ protected Properties configProps;
+
+ public Properties getConfigProps() {
+ return configProps;
+ }
+
+ public void setConfigProps(Properties configProps) {
+ this.configProps = configProps;
+ }
+
+ private SqlMapClient sqlMap;
+
+ public SqlMapClient getSqlMap() {
+ return sqlMap;
+ }
+
+ public void setSqlMap(SqlMapClient sqlMap) {
+ this.sqlMap = sqlMap;
+ }
+
+ public SqlMapAppConfig() {
+ try {
+ Reader reader =
+ Resources.getResourceAsReader(getConfigFile());
+ setSqlMap(SqlMapClientBuilder.buildSqlMapClient(reader,
+ getConfigProps()));
+ reader.close();
+
+ if (isTestMode())
+ for (String script : CONFIG_SCRIPTS) {
+ runScript(script);
+ }
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
Added: struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppService.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppService.java?rev=432886&view=auto
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppService.java (added)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/mailreader2/service/SqlMapAppService.java Sat Aug 19 15:03:04 2006
@@ -0,0 +1,22 @@
+package mailreader2.service;
+
+import mailreader2.AppService;
+import mailreader2.Constants;
+import mailreader2.AppData;
+
+import java.util.List;
+
+public class SqlMapAppService extends SqlMapAppConfig implements AppService {
+
+ // ---- APPSERVICE IMPLEMENTATION ----
+
+ public List getLocaleList() throws Exception {
+ return getSqlMap().queryForList(Constants.LOCALE_LIST, null);
+ }
+
+ public void insertUser(AppData data) throws Exception {
+ getSqlMap().insert(Constants.REGISTRATION_INSERT, data);
+ }
+
+
+}
Modified: struts/struts2/trunk/apps/mailreader/src/main/resources/applicationContext.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/resources/applicationContext.xml?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/resources/applicationContext.xml (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/resources/applicationContext.xml Sat Aug 19 15:03:04 2006
@@ -2,5 +2,10 @@
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect">
+
+ <bean id="appService" class="mailreader2.service.SqlMapAppService">
+ <property name="testMode" value="true"/>
+ </bean>
+
<!-- add your spring beans here -->
</beans>
Modified: struts/struts2/trunk/apps/mailreader/src/main/resources/sql/sql-map.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/resources/sql/sql-map.xml?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/resources/sql/sql-map.xml (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/resources/sql/sql-map.xml Sat Aug 19 15:03:04 2006
@@ -7,7 +7,7 @@
type="mailreader2.AppData"/>
<select id="LOCALE_LIST" resultClass="data">
- SELECT pk_locale AS locale_key, locale_code
+ SELECT pk_locale AS locale_key, locale_code, locale_name
FROM locale;
</select>
Modified: struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/Welcome.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/Welcome.jsp?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/Welcome.jsp (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/Welcome.jsp Sat Aug 19 15:03:04 2006
@@ -24,6 +24,7 @@
</li>
</ul>
+<!--
<h3>Language Options</h3>
<ul>
<li>
@@ -45,6 +46,17 @@
<s:a href="%{ru}">Russian</s:a>
</li>
</ul>
+-->
+<h3>Language Options</h3>
+<form>
+<s:select
+ name="request_locale"
+ list="locale_list"
+ listKey="locale_code"
+ listValue="locale_name"
+ />
+<s:submit />
+</form>
<hr/>
Added: struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseAppDataTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseAppDataTest.java?rev=432886&view=auto
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseAppDataTest.java (added)
+++ struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseAppDataTest.java Sat Aug 19 15:03:04 2006
@@ -0,0 +1,37 @@
+package mailreader2;
+
+import junit.framework.TestCase;
+
+import java.util.List;
+
+public class BaseAppDataTest extends TestCase {
+
+ protected void assertNotEmpty(String value) {
+ assertNotNull(value);
+ assertTrue(value.length()>0);
+ }
+
+ protected void assertNotEmpty(String message, String value, int min, int max) {
+ assertNotNull(message,value);
+ assertTrue(message,value.length()>=min);
+ assertTrue(message,value.length()<=max);
+ }
+
+ protected void assertNotEmpty(String message, String value) {
+ assertNotEmpty(message,value,0,1024);
+ }
+
+ protected void assertLocale_list(List list) {
+ assertNotNull(list);
+ assertTrue("Expected one or more locales",list.size()>0);
+ AppData entry = null;
+ try {
+ entry = (AppData) list.get(0);
+ } catch (Throwable t) {
+ fail("Expected a list of AppData objects");
+ }
+ assertNotEmpty("Expected a locale code",entry.getLocale_code(),2,2);
+ assertNotEmpty("Expected a locale name",entry.getLocale_name());
+ assertNotEmpty("Expected a locale kehy",entry.getLocale_key());
+ }
+}
Modified: struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseSqlMapTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseSqlMapTest.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseSqlMapTest.java (original)
+++ struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/BaseSqlMapTest.java Sat Aug 19 15:03:04 2006
@@ -4,7 +4,6 @@
import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;
-import junit.framework.TestCase;
import javax.sql.DataSource;
import java.io.Reader;
@@ -15,18 +14,18 @@
* @author Ted Husted
* @version $Revision: 1.0 $ $Date: Jul 29, 2006 4:59:19 PM $
*/
-public class BaseSqlMapTest extends TestCase {
+public class BaseSqlMapTest extends BaseAppDataTest {
- protected SqlMapClient sqlMap;
+ private SqlMapClient sqlMap;
protected void initSqlMap(String configFile, Properties props) throws Exception {
Reader reader = Resources.getResourceAsReader(configFile);
- sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader, props);
+ setSqlMap(SqlMapClientBuilder.buildSqlMapClient(reader, props));
reader.close();
}
protected void runScript(String script) throws Exception {
- DataSource ds = sqlMap.getDataSource();
+ DataSource ds = getSqlMap().getDataSource();
Connection conn = ds.getConnection();
@@ -54,6 +53,14 @@
}
public void testInit() throws Exception {
- assertNotNull(sqlMap);
+ assertNotNull(getSqlMap());
+ }
+
+ public SqlMapClient getSqlMap() {
+ return sqlMap;
+ }
+
+ public void setSqlMap(SqlMapClient sqlMap) {
+ this.sqlMap = sqlMap;
}
}
Modified: struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/SqlMapTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/SqlMapTest.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/SqlMapTest.java (original)
+++ struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/SqlMapTest.java Sat Aug 19 15:03:04 2006
@@ -3,7 +3,6 @@
import java.util.List;
/**
- * @author Ted Husted
* @version $Revision: 1.0 $ $Date: Jul 29, 2006 5:34:31 PM $
*/
public class SqlMapTest extends BaseSqlMapTest {
@@ -52,20 +51,20 @@
}
public void testLOCALE_LIST() throws Exception {
- AppData output = (AppData) sqlMap.queryForObject(Constants.LOCALE_LIST, null);
- assertNotNull(output);
+ List list = getSqlMap().queryForList(Constants.LOCALE_LIST, null);
+ assertLocale_list(list);
}
public void testREGISTRATION_INSERT_ASSERT_fail() throws Exception {
input.setUsername(username);
- Object output = sqlMap.queryForObject(Constants.REGISTRATION_INSERT_ASSERT, input);
+ Object output = getSqlMap().queryForObject(Constants.REGISTRATION_INSERT_ASSERT, input);
Long count = (Long) output;
assertTrue("Expected user to already exist", count.intValue() > 0);
}
public void testREGISTRATION_INSERT_ASSERT() throws Exception {
input.setUsername(username2);
- Object output = sqlMap.queryForObject(Constants.REGISTRATION_INSERT_ASSERT, input);
+ Object output = getSqlMap().queryForObject(Constants.REGISTRATION_INSERT_ASSERT, input);
Long count = (Long) output;
assertTrue("Did not expected user to exist", count.intValue() == 0);
}
@@ -78,22 +77,22 @@
input.setFullname(fullname2);
input.setEmail_from(email_from2);
input.setEmail_replyto(email_replyto2);
- sqlMap.insert(Constants.REGISTRATION_INSERT, input);
+ getSqlMap().insert(Constants.REGISTRATION_INSERT, input);
// Trust but verify
input.setPassword(null);
- AppData output = (AppData) sqlMap.queryForObject(Constants.REGISTRATION_PASSWORD, input);
+ AppData output = (AppData) getSqlMap().queryForObject(Constants.REGISTRATION_PASSWORD, input);
assertEquals(password2, output.getPassword());
}
public void testREGISTRATION_PASSWORD() throws Exception {
input.setUsername(username);
- AppData output = (AppData) sqlMap.queryForObject(Constants.REGISTRATION_PASSWORD, input);
+ AppData output = (AppData) getSqlMap().queryForObject(Constants.REGISTRATION_PASSWORD, input);
assertEquals(password, output.getPassword());
}
public void testREGISTRATION_FULLNAME() throws Exception {
input.setUsername(username);
- AppData output = (AppData) sqlMap.queryForObject(Constants.REGISTRATION_FULLNAME, input);
+ AppData output = (AppData) getSqlMap().queryForObject(Constants.REGISTRATION_FULLNAME, input);
assertEquals(fullname, output.getFullname());
assertNull("Expected other fields to be null", output.getPassword());
assertNull("Expected other fields to be null", output.getEmail_from());
@@ -101,7 +100,7 @@
public void testREGISTRATION_EDIT() throws Exception {
input.setRegistration_key(registration_key);
- AppData output = (AppData) sqlMap.queryForObject(Constants.REGISTRATION_EDIT, input);
+ AppData output = (AppData) getSqlMap().queryForObject(Constants.REGISTRATION_EDIT, input);
assertNotNull("Support not found!", output);
assertEquals(fullname, output.getFullname());
assertEquals(email_from, output.getEmail_from());
@@ -115,22 +114,22 @@
input.setFullname(fullname2);
input.setEmail_from(email_from2);
input.setEmail_replyto(email_replyto2);
- sqlMap.update(Constants.REGISTRATION_UPDATE, input);
+ getSqlMap().update(Constants.REGISTRATION_UPDATE, input);
// Trust but verify
input.setPassword(null);
- AppData output = (AppData) sqlMap.queryForObject(Constants.REGISTRATION_PASSWORD, input);
+ AppData output = (AppData) getSqlMap().queryForObject(Constants.REGISTRATION_PASSWORD, input);
assertEquals(password2, output.getPassword());
}
public void testREGISTRATION_UPDATE_fails() throws Exception {
input.setRegistration_key(null);
- sqlMap.update(Constants.REGISTRATION_UPDATE, input);
+ getSqlMap().update(Constants.REGISTRATION_UPDATE, input);
}
public void testSUBSCRIPTION_INSERT_ASSERT_fail() throws Exception {
input.setRegistration_key(registration_key);
input.setSubscription_host(subscription_host);
- Object output = sqlMap.queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
+ Object output = getSqlMap().queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
Long count = (Long) output;
assertTrue("Expected subscription to already exist", count.intValue() > 0);
}
@@ -138,7 +137,7 @@
public void SUBSCRIPTION_INSERT_ASSERT() throws Exception {
input.setSubscription_key(subscription_key2);
input.setSubscription_host(subscription_host2);
- Object output = sqlMap.queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
+ Object output = getSqlMap().queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
Long count = (Long) output;
assertTrue("Did not expect subscription to exist", count.intValue() == 0);
}
@@ -151,9 +150,9 @@
input.setHost_user(host_user2);
input.setHost_pass(host_pass2);
input.setHost_auto(host_auto2);
- sqlMap.insert(Constants.SUBSCRIPTION_INSERT, input);
+ getSqlMap().insert(Constants.SUBSCRIPTION_INSERT, input);
// Trust but verify
- Object output = sqlMap.queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
+ Object output = getSqlMap().queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
Long count = (Long) output;
assertTrue("Expected subscription to NOW exist", count.intValue() > 0);
}
@@ -168,7 +167,7 @@
public void testSUBSCRIPTION_LIST() throws Exception {
input.setRegistration_key(registration_key);
- Object output = sqlMap.queryForList(Constants.SUBSCRIPTION_LIST, input);
+ Object output = getSqlMap().queryForList(Constants.SUBSCRIPTION_LIST, input);
assertNotNull("Query failed!", output);
List list = (List) output;
assertEquals(SAMPLE_SIZE, list.size());
@@ -178,7 +177,7 @@
public void testSUBSCRIPTION_EDIT() throws Exception {
input.setSubscription_key(subscription_key);
- AppData output = (AppData) sqlMap.queryForObject(Constants.SUBSCRIPTION_EDIT, input);
+ AppData output = (AppData) getSqlMap().queryForObject(Constants.SUBSCRIPTION_EDIT, input);
assertNotNull("Support not found!", output);
assertSubscription(output);
}
@@ -191,9 +190,9 @@
input.setHost_user(host_user2);
input.setHost_pass(host_pass2);
input.setHost_auto(host_auto2);
- sqlMap.update(Constants.SUBSCRIPTION_UPDATE, input);
+ getSqlMap().update(Constants.SUBSCRIPTION_UPDATE, input);
// Trust but verify
- Object output = sqlMap.queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
+ Object output = getSqlMap().queryForObject(Constants.SUBSCRIPTION_INSERT_ASSERT, input);
Long count = (Long) output;
assertTrue("Expected subscription to exist", count.intValue() > 0);
}
Added: struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/WelcomeTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/WelcomeTest.java?rev=432886&view=auto
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/WelcomeTest.java (added)
+++ struts/struts2/trunk/apps/mailreader/src/test/java/mailreader2/WelcomeTest.java Sat Aug 19 15:03:04 2006
@@ -0,0 +1,20 @@
+package mailreader2;
+
+import java.util.List;
+
+public class WelcomeTest extends BaseAppDataTest {
+
+ private Welcome welcome = new Welcome();
+
+ public void setUp() {
+
+ }
+
+ public void testLocaleList() throws Exception {
+ welcome.prepare();
+ List list = welcome.getAppData().getLocale_list();
+ assertLocale_list(list);
+ assertTrue("Expected locale list",list.size()>2);
+ }
+
+}
Modified: struts/struts2/trunk/apps/mailreader/src/test/resources/sql/mailreader-sample.sql
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/test/resources/sql/mailreader-sample.sql?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/test/resources/sql/mailreader-sample.sql (original)
+++ struts/struts2/trunk/apps/mailreader/src/test/resources/sql/mailreader-sample.sql Sat Aug 19 15:03:04 2006
@@ -1,6 +1,14 @@
INSERT INTO locale
(pk_locale, locale_code, locale_name)
-VALUES ('01-en','en','English'), ('02-ru','ru','Russian'), ('03-ja','ja','Japanese');
+VALUES ('01-en','en','English');
+
+INSERT INTO locale
+ (pk_locale, locale_code, locale_name)
+VALUES ('02-ru','ru','Russian');
+
+INSERT INTO locale
+ (pk_locale, locale_code, locale_name)
+VALUES ('03-ja','ja','Japanese');
INSERT INTO protocol
(pk_protocol, protocol_code, protocol_name)
Modified: struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl (original)
+++ struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExample.ftl Sat Aug 19 15:03:04 2006
@@ -1,3 +1,3 @@
<b>Hello from FreeMarker, ${firstName} ${lastName}!</b>
<p/>
-<a href="<@saf.url action="index"/>">Back to front page</a>
+<a href="<@s.url action="index"/>">Back to front page</a>
Modified: struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl (original)
+++ struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/view/freeMarkerExampleInput.ftl Sat Aug 19 15:03:04 2006
@@ -1,5 +1,5 @@
-<@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>
+<@s.form action="processFreeMarkerExample" method="POST">
+ <@s.textfield label="First name" name="firstName"/>
+ <@s.textfield label="Last name" name="lastName"/>
+ <@s.submit value="Say hello!"/>
+</...@s.form>
Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java Sat Aug 19 15:03:04 2006
@@ -34,7 +34,7 @@
private String fileName;
private String caption;
- // since we are using <saf:file name="upload" .../> the file name will be
+ // since we are using <s:file name="upload" .../> the file name will be
// obtained through getter/setter of <file-tag-name>FileName
public String getUploadFileName() {
return fileName;
@@ -44,7 +44,7 @@
}
- // since we are using <saf:file name="upload" ... /> the content type will be
+ // since we are using <s:file name="upload" ... /> the content type will be
// obtained through getter/setter of <file-tag-name>ContentType
public String getUploadContentType() {
return contentType;
@@ -54,7 +54,7 @@
}
- // since we are using <saf:file name="upload" ... /> the File itself will be
+ // since we are using <s:file name="upload" ... /> the File itself will be
// obtained through getter/setter of <file-tag-name>
public File getUpload() {
return upload;
Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java Sat Aug 19 15:03:04 2006
@@ -21,7 +21,7 @@
import com.opensymphony.xwork2.ModelDriven;
/**
- * Action to demonstrate simple model-driven feature of WW.
+ * Action to demonstrate simple model-driven feature of the framework.
*
*/
public class ModelDrivenAction extends ActionSupport implements ModelDriven {
Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts-token.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/resources/struts-token.xml?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/resources/struts-token.xml (original)
+++ struts/struts2/trunk/apps/showcase/src/main/resources/struts-token.xml Sat Aug 19 15:03:04 2006
@@ -49,7 +49,7 @@
<action name="tokenPrepare4!*" class="org.apache.struts2.showcase.token.TokenAction" method="{1}">
<interceptor-ref name="defaultStack"/>
- <interceptor-ref name="createSession"/> <!-- we must have a session when using freemarker and the @ww.token tag -->
+ <interceptor-ref name="createSession"/> <!-- we must have a session when using freemarker and the @s.token tag -->
<result name="input" type="freemarker">example4.ftl</result>
</action>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example4.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example4.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example4.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/example4.ftl Sat Aug 19 15:03:04 2006
@@ -1,18 +1,18 @@
<html>
<head>
<title>Example 4</title>
- <@saf.head theme="ajax" debug="false" />
- <link rel="stylesheet" type="text/css" href="<@saf.url value="/struts/tabs.css"/>" />
+ <@s.head theme="ajax" debug="false" />
+ <link rel="stylesheet" type="text/css" href="<@s.url value="/struts/tabs.css"/>" />
</head>
<body>
- <@saf.url id="panel1url" action="panel1" namespace="/nodecorate" includeContext="false" />
- <@saf.url id="panel2url" action="panel2" namespace="/nodecorate" includeContext="false"/>
- <@saf.url id="panel3url" action="panel3" namespace="/nodecorate" includeContext="false"/>
- <@saf.tabbedPanel id="tabbedpanel" >
- <@saf.panel id="panel1" tabName="Panel1" remote="true" href="%{#panel1url}" theme="ajax" />
- <@saf.panel id="panel2" tabName="Panel2" remote="true" href="%{#panel2url}" theme="ajax" />
- <@saf.panel id="panel3" tabName="Panel3" remote="true" href="%{#panel3url}" theme="ajax" />
- </...@saf.tabbedPanel>
+ <@s.url id="panel1url" action="panel1" namespace="/nodecorate" includeContext="false" />
+ <@s.url id="panel2url" action="panel2" namespace="/nodecorate" includeContext="false"/>
+ <@s.url id="panel3url" action="panel3" namespace="/nodecorate" includeContext="false"/>
+ <@s.tabbedPanel id="tabbedpanel" >
+ <@s.panel id="panel1" tabName="Panel1" remote="true" href="%{#panel1url}" theme="ajax" />
+ <@s.panel id="panel2" tabName="Panel2" remote="true" href="%{#panel2url}" theme="ajax" />
+ <@s.panel id="panel3" tabName="Panel3" remote="true" href="%{#panel3url}" theme="ajax" />
+ </...@s.tabbedPanel>
</body>
</html>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel2.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel2.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel2.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel2.ftl Sat Aug 19 15:03:04 2006
@@ -1,7 +1,7 @@
<div id="result">
</div>
-<@saf.form action="panel2Submit" namespace="/nodecorate" theme="ajax">
- <@saf.textfield label="Name" name="name" theme="ajax" />
- <@saf.submit theme="ajax" resultDivId="result" />
-</...@saf.form>
+<@s.form action="panel2Submit" namespace="/nodecorate" theme="ajax">
+ <@s.textfield label="Name" name="name" theme="ajax" />
+ <@s.submit theme="ajax" resultDivId="result" />
+</...@s.form>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel3.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel3.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel3.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/tabbedpanel/nodecorate/panel3.ftl Sat Aug 19 15:03:04 2006
@@ -2,8 +2,8 @@
<div id="result">
</div>
-<@saf.form action="panel3Submit" namespace="/nodecorate" theme="ajax">
- <@saf.select label="Gender" name="gender" list=r"%{#{'Male':'Male','Female':'Female'}}" theme="ajax" />
- <@saf.submit theme="ajax" resultDivId="result" />
-</...@saf.form>
+<@s.form action="panel3Submit" namespace="/nodecorate" theme="ajax">
+ <@s.select label="Gender" name="gender" list=r"%{#{'Male':'Male','Female':'Female'}}" theme="ajax" />
+ <@s.submit theme="ajax" resultDivId="result" />
+</...@s.form>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl Sat Aug 19 15:03:04 2006
@@ -2,15 +2,15 @@
<html>
<head>
<title>Showcase - Chat - Login</title>
- <@saf.head theme="ajax" />
+ <@s.head theme="ajax" />
</head>
<body>
- <@saf.actionerror />
- <@saf.actionmessage />
- <@saf.fielderror />
- <@saf.form action="login" namespace="/chat" method="POST">
- <@saf.textfield name="name" label="Name" required="true" />
- <@saf.submit/>
- </...@saf.form>
+ <@s.actionerror />
+ <@s.actionmessage />
+ <@s.fielderror />
+ <@s.form action="login" namespace="/chat" method="POST">
+ <@s.textfield name="name" label="Name" required="true" />
+ <@s.submit/>
+ </...@s.form>
</body>
</html>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl Sat Aug 19 15:03:04 2006
@@ -1,2 +1,2 @@
-<@saf.actionerror />
-<@saf.fielderror />
+<@s.actionerror />
+<@s.fielderror />
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl Sat Aug 19 15:03:04 2006
@@ -5,29 +5,29 @@
<td class="tableDateColumn">Date</td>
<td class="tableMessageColumn">Message</td>
</tr>
-<@saf.iterator id="message" value="%{messagesAvailableInRoom}" status="stat">
+<@s.iterator id="message" value="%{messagesAvailableInRoom}" status="stat">
<tr class="tableContent">
<#if stat.odd>
<td class="tableSenderColumnOdd">
<#else>
<td clas="tableSenderColumnEven">
</#if>
- <@saf.property value="%{#message.creator.name}" />
+ <@s.property value="%{#message.creator.name}" />
</td>
<#if stat.odd>
<td class="tableDateColumnOdd">
<#else>
<td class="tableDateColumnEven">
</#if>
- <@saf.property value="%{#message.creationDate}" />
+ <@s.property value="%{#message.creationDate}" />
</td>
<#if stat.odd>
<td class="tableMessageColumnOdd">
<#else>
<td class="tableMessageColumnEven">
</#if>
- <@saf.property value="%{#message.message}" />
+ <@s.property value="%{#message.message}" />
</td>
</tr>
-</...@saf.iterator>
+</...@s.iterator>
</table>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl Sat Aug 19 15:03:04 2006
@@ -3,7 +3,7 @@
<html>
<head>
<title>Showcase - Chat - Room Selection</title>
- <@saf.head theme="ajax" />
+ <@s.head theme="ajax" />
<style type="text/css">
div.box {
border: 1px solid darkblue;
@@ -114,24 +114,24 @@
<div class="left">
<div class="box">
<h3>Operations</h3>
- <@saf.url id="url" action="logout" namespace="/chat" />
+ <@s.url id="url" action="logout" namespace="/chat" />
<ul>
- <li><@saf.a href="%{#url}">Logout</...@saf.a></li>
+ <li><@s.a href="%{#url}">Logout</...@s.a></li>
</ul>
</div>
<#if (actionErrors?size gt 0)>
<div class="box">
<h3>Action Errors</h3>
- <@saf.actionerrors />
+ <@s.actionerrors />
</div>
</#if>
<div class="box">
<h3>Users Available In Chat</h3>
- <@saf.div id="usersAvailable" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
+ <@s.div id="usersAvailable" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
theme="ajax" href="/chat/ajax/usersAvailable.action"
class="box">
Initial Loading Users ...
- </...@saf.div>
+ </...@s.div>
</div>
</div>
@@ -139,21 +139,21 @@
<div class="center">
<div class="box">
<h3>Rooms Available In Chat</h3>
- <@saf.div id="roomsAvailable" listenTopics="topicRoomCreated"
+ <@s.div id="roomsAvailable" listenTopics="topicRoomCreated"
delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
theme="ajax" href="/chat/ajax/roomsAvailable.action" >
Initial Loading Rooms ...
- </...@saf.div>
+ </...@s.div>
</div>
<div id="createRoom" class="box">
<h3>Create Room In Chat</h3>
<div id="createRoomResult"></div>
- <@saf.form id="createRoomId" action="createRoom" namespace="/chat/ajax" method="POST" theme="ajax">
- <@saf.textfield label="Room Name" required="true" name="name" />
- <@saf.textarea theme="xhtml" label="Room Description" required="true" name="Description" />
- <@saf.submit value="%{'Create Room'}" resultDivId="createRoomResult" notifyTopics="topicRoomCreated" theme="ajax" align="left" />
- </...@saf.form>
+ <@s.form id="createRoomId" action="createRoom" namespace="/chat/ajax" method="POST" theme="ajax">
+ <@s.textfield label="Room Name" required="true" name="name" />
+ <@s.textarea theme="xhtml" label="Room Description" required="true" name="Description" />
+ <@s.submit value="%{'Create Room'}" resultDivId="createRoomResult" notifyTopics="topicRoomCreated" theme="ajax" align="left" />
+ </...@s.form>
</div>
</div>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomsAvailable.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomsAvailable.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomsAvailable.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomsAvailable.ftl Sat Aug 19 15:03:04 2006
@@ -6,39 +6,39 @@
<td>Description</td>
<td>Date Created</td>
</tr>
-<@saf.iterator id="room" value="%{availableRooms}" status="stat">
+<@s.iterator id="room" value="%{availableRooms}" status="stat">
<tr class="tableContent">
<#if stat.isOdd()>
<td class="tableOperationColumnOdd">
<#else>
<td class="tableOperationColumnEven">
</#if>
- <@saf.url id="url" action="enterRoom" namespace="/chat">
- <@saf.param name="roomName" value="%{#room.name}" />
- </...@saf.url>
- <@saf.a href="%{url}">Enter</...@saf.a>
+ <@s.url id="url" action="enterRoom" namespace="/chat">
+ <@s.param name="roomName" value="%{#room.name}" />
+ </...@s.url>
+ <@s.a href="%{url}">Enter</...@s.a>
</td>
<#if stat.odd>
<td class="tableNameColumnOdd">
<#else>
<td class="tableNameColumnEven">
</#if>
- <@saf.property value="%{#room.name}" />
+ <@s.property value="%{#room.name}" />
</td>
<#if stat.odd>
<td class="tableDescriptionColumnOdd">
<#else>
<td class="tableDescriptionColumnEven">
</#if>
- <@saf.property value="%{#room.description}" />
+ <@s.property value="%{#room.description}" />
</td>
<#if stat.odd>
<td class="tableDateCreatedColumnOdd">
<#else>
<td class="tableDateCreateColumnEven">
</#if>
- <@saf.property value="%{#room.creationDate}" />
+ <@s.property value="%{#room.creationDate}" />
</td>
</tr>
-</...@saf.iterator>
+</...@s.iterator>
</table>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/sendMessageToRoomResult.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/sendMessageToRoomResult.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/sendMessageToRoomResult.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/sendMessageToRoomResult.ftl Sat Aug 19 15:03:04 2006
@@ -1,2 +1,2 @@
-<@saf.fielderror />
+<@s.fielderror />
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl Sat Aug 19 15:03:04 2006
@@ -2,7 +2,7 @@
<html>
<head>
<title>Showcase - Chat - Show Room </title>
- <@saf.head theme="ajax" />
+ <@s.head theme="ajax" />
<style type="text/css">
div.box {
border: 1px solid darkblue;
@@ -99,43 +99,43 @@
<div class="left">
<div class="box">
<h3>Operation</h3>
- <@saf.url id="url" action="exitRoom" namespace="/chat">
- <@saf.param name="roomName" value="%{roomName}" />
- </...@saf.url>
+ <@s.url id="url" action="exitRoom" namespace="/chat">
+ <@s.param name="roomName" value="%{roomName}" />
+ </...@s.url>
<ul>
- <li><@saf.a href="%{#url}">Exit Room</...@saf.a></li>
+ <li><@s.a href="%{#url}">Exit Room</...@s.a></li>
</ul>
</div>
<div class="box">
<h3>Users Available In Chat</h3>
- <@saf.div id="usersAvailable" href="/chat/ajax/usersAvailable.action"
+ <@s.div id="usersAvailable" href="/chat/ajax/usersAvailable.action"
theme="ajax" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}">
Initial Users Available ...
- </...@saf.div>
+ </...@s.div>
</div>
</div>
<div class="center">
<div class="box">
<h3>Messages Posted In Room [${roomName?default('')}]</h3>
- <@saf.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="false">
- <@saf.param name="roomName" value="%{roomName}" />
- </...@saf.url>
- <@saf.div id="messagesInRoom" href="%{#url}" includeContext="false"
+ <@s.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="false">
+ <@s.param name="roomName" value="%{roomName}" />
+ </...@s.url>
+ <@s.div id="messagesInRoom" href="%{#url}" includeContext="false"
theme="ajax" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
listenTopics="topicMessageSend">
Initial Messages In Room ...
- </...@saf.div>
+ </...@s.div>
</div>
<div class="box">
<h3>Send Messages</h3>
- <@saf.form id="sendMessageForm" action="sendMessageToRoom" namespace="/chat/ajax" method="POST" theme="ajax">
+ <@s.form id="sendMessageForm" action="sendMessageToRoom" namespace="/chat/ajax" method="POST" theme="ajax">
<div id="sendMessageResult"></div>
- <@saf.textarea label="Message"name="message" theme="xhtml" />
- <@saf.hidden name="roomName" value="%{roomName}" />
- <@saf.submit id="submit" theme="ajax" resultDivId="sendMessageResult" notifyTopics="topicMessageSend" value="%{'Send'}" />
- </...@saf.form>
+ <@s.textarea label="Message"name="message" theme="xhtml" />
+ <@s.hidden name="roomName" value="%{roomName}" />
+ <@s.submit id="submit" theme="ajax" resultDivId="sendMessageResult" notifyTopics="topicMessageSend" value="%{'Send'}" />
+ </...@s.form>
</div>
</div>
@@ -143,13 +143,13 @@
<div class="right">
<div class="box">
<h3>Users Available In Room [${roomName?default('')}]</h3>
- <@saf.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="false">
- <@saf.param name="roomName" value="%{roomName}" />
- </...@saf.url>
- <@saf.div id="usersAvailableInRoom" href="%{#url}" includeContext="false"
+ <@s.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="false">
+ <@s.param name="roomName" value="%{roomName}" />
+ </...@s.url>
+ <@s.div id="usersAvailableInRoom" href="%{#url}" includeContext="false"
theme="ajax" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}">
Initial Users Available In Room ...
- </...@saf.div>
+ </...@s.div>
</div>
</div>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/chat/usersAvailableInRoom.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/chat/usersAvailableInRoom.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/chat/usersAvailableInRoom.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/chat/usersAvailableInRoom.ftl Sat Aug 19 15:03:04 2006
@@ -1,8 +1,8 @@
<ul>
-<@saf.iterator id="member" value="%{usersAvailableInRoom}">
- <li><@saf.property value="%{#member.name}" /></li>
-</...@saf.iterator>
+<@s.iterator id="member" value="%{usersAvailableInRoom}">
+ <li><@s.property value="%{#member.name}" /></li>
+</...@s.iterator>
</ul>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/continuations/guess.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/continuations/guess.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/continuations/guess.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/continuations/guess.ftl Sat Aug 19 15:03:04 2006
@@ -9,10 +9,10 @@
${msg}
</#list>
-<@saf.form action="guess" method="post">
- <@saf.textfield label="Guess" name="guess"/>
- <@saf.submit value="Guess"/>
-</...@saf.form>
+<@s.form action="guess" method="post">
+ <@s.textfield label="Guess" name="guess"/>
+ <@s.submit value="Guess"/>
+</...@s.form>
</body>
</html>
<!-- END SNIPPET: example -->
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl Sat Aug 19 15:03:04 2006
@@ -2,7 +2,7 @@
<html>
<head>
<title>Showcase - Hangman</title>
- <@saf.head theme="ajax" debug="false" />
+ <@s.head theme="ajax" debug="false" />
</head>
<body>
@@ -18,7 +18,7 @@
guessMadeFunc: function(sourceId) {
var requestAttr = { character: sourceId };
dojo.io.bind({
- url: "<@saf.url action="guessCharacter" namespace="/hangman" />",
+ url: "<@s.url action="guessCharacter" namespace="/hangman" />",
load: function(type, data, event) {
},
@@ -28,7 +28,7 @@
},
updateCharacterAvailable: function(sourceId) {
dojo.io.bind({
- url: "<@saf.url action="updateCharacterAvailable" namespace="/hangman/ajax" />",
+ url: "<@s.url action="updateCharacterAvailable" namespace="/hangman/ajax" />",
load: function(type, data, event) {
var div = dojo.byId("updateCharacterAvailableDiv");
div.innerHTML = data;
@@ -53,7 +53,7 @@
},
updateVocab: function(sourceId) {
dojo.io.bind({
- url: "<@saf.url action="updateVocabCharacters" namespace="/hangman/ajax" />",
+ url: "<@s.url action="updateVocabCharacters" namespace="/hangman/ajax" />",
load: function(type, data, event) {
var div = dojo.byId("updateVocabDiv");
div.innerHTML = data;
@@ -77,7 +77,7 @@
},
updateScaffold: function(sourceId) {
dojo.io.bind({
- url: "<@saf.url action="updateScaffold" namespace="/hangman/ajax" />",
+ url: "<@s.url action="updateScaffold" namespace="/hangman/ajax" />",
load: function(type, data, event) {
var div = dojo.byId("updateScaffoldDiv");
div.innerHTML = data;
@@ -101,7 +101,7 @@
},
updateGuessLeft: function(sourceId) {
dojo.io.bind({
- url: "<@saf.url action="updateGuessLeft" namespace="/hangman/ajax" />",
+ url: "<@s.url action="updateGuessLeft" namespace="/hangman/ajax" />",
load: function(type, data, event) {
var div = dojo.byId("updateGuessLeftDiv");
div.innerHTML = data;
@@ -135,23 +135,23 @@
<table bgcolor="green">
<tr>
<td>
- <@saf.url id="url" value="/hangman/images/hangman.png" />
- <img alt="Hangman" src="<@saf.property value="%{#url}" />"
+ <@s.url id="url" value="/hangman/images/hangman.png" />
+ <img alt="Hangman" src="<@s.property value="%{#url}" />"
width="197" height="50" border="0"/>
</td>
<td width="70" align="right">
<#-- Guesses Left -->
<div id="updateGuessLeftDiv">
- <@saf.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" />
+ <@s.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" />
<img alt="No. Guesses Left"
- src="<@saf.property value="%{#url}"/>" width="20" height="20" border="0" />
+ src="<@s.property value="%{#url}"/>" width="20" height="20" border="0" />
</div>
</td>
<td>
- <@saf.url id="url" value="/hangman/images/guesses-left.png" />
+ <@s.url id="url" value="/hangman/images/guesses-left.png" />
<img alt="Guesses Left"
- src="<@saf.property value="%{#url}" />" width="164" height="11" border="0"/>
+ src="<@s.property value="%{#url}" />" width="164" height="11" border="0"/>
</td>
</tr>
<tr>
@@ -159,9 +159,9 @@
<td align="left">
<#-- Display Scaffold -->
<div id="updateScaffoldDiv">
- <@saf.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" />
- <img src="<@saf.property value="%{#url}" />" border="0"/>
+ <@s.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" />
+ <img src="<@s.property value="%{#url}" />" border="0"/>
</div>
</td>
<td></td>
@@ -169,33 +169,33 @@
<tr>
<td width="160">
<p align="right">
- <@saf.url id="url" value="/hangman/images/guess.png" />
- <img alt="Current Guess" src="<@saf.property value="%{#url}" />"
+ <@s.url id="url" value="/hangman/images/guess.png" />
+ <img alt="Current Guess" src="<@s.property value="%{#url}" />"
align="MIDDLE" width="127" height="20" border="0"/></p>
</td>
<td>
<#-- Display Vacab -->
<div id="updateVocabDiv">
- <@saf.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat">
+ <@s.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat">
<#if hangman.characterGuessedBefore(currentCharacter)>
- <@saf.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter.toString()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#chalkboardImageName}" />
- <img height="36" alt="<@saf.property value="%{#currentCharacter}" />"
- src="<@saf.property value="%{#url}" />" width="36" border="0"/>
+ <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter.toString()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#chalkboardImageName}" />
+ <img height="36" alt="<@s.property value="%{#currentCharacter}" />"
+ src="<@s.property value="%{#url}" />" width="36" border="0"/>
<#else>
- <@saf.url id="url" value="/hangman/images/Chalkboard_underscroll.png" />
+ <@s.url id="url" value="/hangman/images/Chalkboard_underscroll.png" />
<img height="36" alt="_"
- src="<@saf.property value="%{#url}" />" width="36" border="0"/>
+ src="<@s.property value="%{#url}" />" width="36" border="0"/>
</#if>
- </...@saf.iterator>
+ </...@s.iterator>
</div>
</td>
</tr>
<tr>
<td valign="top">
<p align="right">
- <@saf.url id="url" value="/hangman/images/choose.png" />
- <img alt="Choose" src="<@saf.property value="%{#url}" />"
+ <@s.url id="url" value="/hangman/images/choose.png" />
+ <img alt="Choose" src="<@s.property value="%{#url}" />"
height="20" width="151" border="0"/>
</p>
</td>
@@ -203,19 +203,19 @@
<#-- Show Characters Available -->
<div id="updateCharacterAvailableDiv">
- <@saf.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat">
- <@saf.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" />
- <@saf.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" />
- <@saf.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
+ <@s.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat">
+ <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" />
+ <@s.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" />
+ <@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
- <@saf.a theme="ajax"
+ <@s.a theme="ajax"
href="ajax/blank.action"
id="%{#currentCharacter}"
notifyTopics="topicGuessMade"
showErrorTransportText="true">
- <img height="36" alt="" src="<@saf.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
- </...@saf.a>
- </...@saf.iterator>
+ <img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
+ </...@s.a>
+ </...@s.iterator>
</div>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanMenu.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanMenu.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanMenu.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanMenu.ftl Sat Aug 19 15:03:04 2006
@@ -6,12 +6,12 @@
<body>
<ul>
<li>
- <@saf.url id="url" action="hangmanAjax" namespace="/hangman" />
- <@saf.a href="%{#url}">Hangman (Ajax)</...@saf.a>
+ <@s.url id="url" action="hangmanAjax" namespace="/hangman" />
+ <@s.a href="%{#url}">Hangman (Ajax)</...@s.a>
</li>
<li>
- <@saf.url id="url" action="hangmanNonAjax" namespace="/hangman" />
- <@saf.a href="%{#url}">Hangman (Non Ajax)</...@saf.a>
+ <@s.url id="url" action="hangmanNonAjax" namespace="/hangman" />
+ <@s.a href="%{#url}">Hangman (Non Ajax)</...@s.a>
</li>
</ul>
</body>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanNonAjax.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanNonAjax.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanNonAjax.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanNonAjax.ftl Sat Aug 19 15:03:04 2006
@@ -1,31 +1,31 @@
<html>
<head>
<title>Showcase - Hangman</title>
- <@saf.head theme="xhtml" />
+ <@s.head theme="xhtml" />
</head>
<body>
<table bgcolor="green">
<tr>
<td>
- <@saf.url id="url" value="/hangman/images/hangman.png" />
- <img alt="Hangman" src="<@saf.property value="%{#url}" />"
+ <@s.url id="url" value="/hangman/images/hangman.png" />
+ <img alt="Hangman" src="<@s.property value="%{#url}" />"
width="197" height="50" border="0"/>
</td>
<td width="70" align="right">
<#-- Guesses Left -->
<div id="updateGuessLeftDiv">
<#if (hangman.guessLeft() >= 0)>
- <@saf.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" />
+ <@s.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" />
<img alt="No. Guesses Left"
- src="<@saf.property value="%{#url}"/>" width="20" height="20" border="0" />
+ src="<@s.property value="%{#url}"/>" width="20" height="20" border="0" />
</#if>
</div>
</td>
<td>
- <@saf.url id="url" value="/hangman/images/guesses-left.png" />
+ <@s.url id="url" value="/hangman/images/guesses-left.png" />
<img alt="Guesses Left"
- src="<@saf.property value="%{#url}" />" width="164" height="11" border="0"/>
+ src="<@s.property value="%{#url}" />" width="164" height="11" border="0"/>
</td>
</tr>
<tr>
@@ -33,9 +33,9 @@
<td align="left">
<#-- Display Scaffold -->
<div id="updateScaffoldDiv">
- <@saf.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" />
- <img src="<@saf.property value="%{#url}" />" border="0"/>
+ <@s.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" />
+ <img src="<@s.property value="%{#url}" />" border="0"/>
</div>
</td>
<td></td>
@@ -43,32 +43,32 @@
<tr>
<td width="160">
<p align="right">
- <@saf.url id="url" value="/hangman/images/guess.png" />
- <img alt="Current Guess" src="<@saf.property value="%{#url}" />"
+ <@s.url id="url" value="/hangman/images/guess.png" />
+ <img alt="Current Guess" src="<@s.property value="%{#url}" />"
align="MIDDLE" width="127" height="20" border="0"/></p>
</td>
<td>
<#-- Display Vacab -->
<div id="updateVocabDiv">
<#if hangman.gameEnded()>
- <@saf.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat">
- <@saf.url id="url" value="%{'/hangman/images/Chalkboard_'+#currentCharacter.toString()+'.png'}" />
- <img height="36" alt="<@saf.property value="%{#currentCharacter}" />"
- src="<@saf.property value="%{#url}" />" width="36" border="0" />
- </...@saf.iterator>
+ <@s.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat">
+ <@s.url id="url" value="%{'/hangman/images/Chalkboard_'+#currentCharacter.toString()+'.png'}" />
+ <img height="36" alt="<@s.property value="%{#currentCharacter}" />"
+ src="<@s.property value="%{#url}" />" width="36" border="0" />
+ </...@s.iterator>
<#else>
- <@saf.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat">
+ <@s.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat">
<#if hangman.characterGuessedBefore(currentCharacter)>
- <@saf.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter.toString()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#chalkboardImageName}" />
- <img height="36" alt="<@saf.property value="%{#currentCharacter}" />"
- src="<@saf.property value="%{#url}" />" width="36" border="0"/>
+ <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter.toString()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#chalkboardImageName}" />
+ <img height="36" alt="<@s.property value="%{#currentCharacter}" />"
+ src="<@s.property value="%{#url}" />" width="36" border="0"/>
<#else>
- <@saf.url id="url" value="/hangman/images/Chalkboard_underscroll.png" />
+ <@s.url id="url" value="/hangman/images/Chalkboard_underscroll.png" />
<img height="36" alt="_"
- src="<@saf.property value="%{#url}" />" width="36" border="0"/>
+ src="<@s.property value="%{#url}" />" width="36" border="0"/>
</#if>
- </...@saf.iterator>
+ </...@s.iterator>
</#if>
</div>
</td>
@@ -76,8 +76,8 @@
<tr>
<td valign="top">
<p align="right">
- <@saf.url id="url" value="/hangman/images/choose.png" />
- <img alt="Choose" src="<@saf.property value="%{#url}" />"
+ <@s.url id="url" value="/hangman/images/choose.png" />
+ <img alt="Choose" src="<@s.property value="%{#url}" />"
height="20" width="151" border="0"/>
</p>
</td>
@@ -86,37 +86,37 @@
<#-- Show Characters Available -->
<div id="updateCharacterAvailableDiv">
<#if hangman.gameEnded()>
- <@saf.set name="winImageName" value="%{'you-win.png'}" />
- <@saf.set name="looseImageName" value="%{'you-lose.png'}" />
- <@saf.set name="startImageName" value="%{'start.png'}" />
- <@saf.url id="winImageUrl" value="%{'/hangman/images/'+#winImageName}" />
- <@saf.url id="looseImageUrl" value="%{'/hangman/images/'+#looseImageName}" />
- <@saf.url id="startImageUrl" value="%{'/hangman/images/'+#startImageName}" />
- <@saf.url id="startHref" action="hangmanNonAjax" namespace="/hangman" />
+ <@s.set name="winImageName" value="%{'you-win.png'}" />
+ <@s.set name="looseImageName" value="%{'you-lose.png'}" />
+ <@s.set name="startImageName" value="%{'start.png'}" />
+ <@s.url id="winImageUrl" value="%{'/hangman/images/'+#winImageName}" />
+ <@s.url id="looseImageUrl" value="%{'/hangman/images/'+#looseImageName}" />
+ <@s.url id="startImageUrl" value="%{'/hangman/images/'+#startImageName}" />
+ <@s.url id="startHref" action="hangmanNonAjax" namespace="/hangman" />
<#if hangman.isWin()>
- <img src="<@saf.property value="%{#winImageUrl}" />" width="341" height="44" />
+ <img src="<@s.property value="%{#winImageUrl}" />" width="341" height="44" />
<#else>
- <img src="<@saf.property value="%{#looseImageUrl}" />" width="381" height="44" />
+ <img src="<@s.property value="%{#looseImageUrl}" />" width="381" height="44" />
</#if>
- <@saf.a href="%{#startHref}">
- <img src="<@saf.property value="%{#startImageUrl}" />" width="250" height="43" />
- </...@saf.a>
+ <@s.a href="%{#startHref}">
+ <img src="<@s.property value="%{#startImageUrl}" />" width="250" height="43" />
+ </...@s.a>
<#else>
- <@saf.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat">
- <@saf.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" />
- <@saf.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" />
- <@saf.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
- <@saf.url id="url" action="guessCharacterNonAjax" namespace="/hangman">
- <@saf.param name="character" value="%{#currentCharacter}" />
- </...@saf.url>
+ <@s.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat">
+ <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" />
+ <@s.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" />
+ <@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
+ <@s.url id="url" action="guessCharacterNonAjax" namespace="/hangman">
+ <@s.param name="character" value="%{#currentCharacter}" />
+ </...@s.url>
- <@saf.a href="%{#url}"
+ <@s.a href="%{#url}"
id="%{#currentCharacter}"
>
- <img height="36" alt="" src="<@saf.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
- </...@saf.a>
- </...@saf.iterator>
+ <img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
+ </...@s.a>
+ </...@s.iterator>
</#if>
</div>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl Sat Aug 19 15:03:04 2006
@@ -1,7 +1,7 @@
<html>
<head>
- <@saf.head theme="ajax" debug="true" />
+ <@s.head theme="ajax" debug="true" />
</head>
<body>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl Sat Aug 19 15:03:04 2006
@@ -1,47 +1,47 @@
<#if hangman.gameEnded()>
- <@saf.set name="winImageName" value="%{'you-win.png'}" />
- <@saf.set name="looseImageName" value="%{'you-lose.png'}" />
- <@saf.set name="startImageName" value="%{'start.png'}" />
- <@saf.url id="winImageUrl" value="%{'/hangman/images/'+#winImageName}" />
- <@saf.url id="looseImageUrl" value="%{'/hangman/images/'+#looseImageName}" />
- <@saf.url id="startImageUrl" value="%{'/hangman/images/'+#startImageName}" />
- <@saf.url id="startHref" action="hangmanAjax" namespace="/hangman" />
+ <@s.set name="winImageName" value="%{'you-win.png'}" />
+ <@s.set name="looseImageName" value="%{'you-lose.png'}" />
+ <@s.set name="startImageName" value="%{'start.png'}" />
+ <@s.url id="winImageUrl" value="%{'/hangman/images/'+#winImageName}" />
+ <@s.url id="looseImageUrl" value="%{'/hangman/images/'+#looseImageName}" />
+ <@s.url id="startImageUrl" value="%{'/hangman/images/'+#startImageName}" />
+ <@s.url id="startHref" action="hangmanAjax" namespace="/hangman" />
<#if hangman.isWin()>
- <img src="<@saf.property value="%{#winImageUrl}" />" width="341" height="44" />
+ <img src="<@s.property value="%{#winImageUrl}" />" width="341" height="44" />
<#else>
- <img src="<@saf.property value="%{#looseImageUrl}" />" width="381" height="44" />
+ <img src="<@s.property value="%{#looseImageUrl}" />" width="381" height="44" />
</#if>
- <@saf.a href="%{#startHref}">
- <img src="<@saf.property value="%{#startImageUrl}" />" width="250" height="43" />
- </...@saf.a>
+ <@s.a href="%{#startHref}">
+ <img src="<@s.property value="%{#startImageUrl}" />" width="250" height="43" />
+ </...@s.a>
<#else>
-<@saf.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat">
- <@saf.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" />
- <@saf.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" />
- <@saf.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
+<@s.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat">
+ <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" />
+ <@s.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" />
+ <@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
- <@saf.a theme="ajax"
+ <@s.a theme="ajax"
id="%{#currentCharacter}"
href="ajax/blank.action"
notifyTopics="topicGuessMade"
showErrorTransportText="true">
- <img height="36" alt="" src="<@saf.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
- </...@saf.a>
+ <img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
+ </...@s.a>
<#--
- <a href="#" id="<@saf.property value="%{#currentCharacter}"/>" >
- <img height="36" alt="" src="<@saf.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
+ <a href="#" id="<@s.property value="%{#currentCharacter}"/>" >
+ <img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
</a>
<script>
- // var anchor = dojo.byId("<@saf.property value="%{#currentCharacter}" />");
- var anchor = document.getElementById("<@saf.property value="%{#currentCharacter}" />");
+ // var anchor = dojo.byId("<@s.property value="%{#currentCharacter}" />");
+ var anchor = document.getElementById("<@s.property value="%{#currentCharacter}" />");
dojo.event.connect(anchor, "onclick", function(event) {
- dojo.event.topic.publish("topicGuessMade", "<@saf.property value="%{#currentCharacter}" />");
+ dojo.event.topic.publish("topicGuessMade", "<@s.property value="%{#currentCharacter}" />");
});
</script>
-->
-</...@saf.iterator>
+</...@s.iterator>
</#if>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateGuessLeft.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateGuessLeft.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateGuessLeft.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateGuessLeft.ftl Sat Aug 19 15:03:04 2006
@@ -1,7 +1,7 @@
<#if (hangman.guessLeft() >= 0)>
- <@saf.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" />
+ <@s.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" />
<img alt="No. Guesses Left"
- src="<@saf.property value="%{#url}"/>" width="20" height="20" border="0" />
+ src="<@s.property value="%{#url}"/>" width="20" height="20" border="0" />
</#if>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateScaffold.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateScaffold.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateScaffold.ftl (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateScaffold.ftl Sat Aug 19 15:03:04 2006
@@ -1,3 +1,3 @@
- <@saf.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" />
- <@saf.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" />
- <img src="<@saf.property value="%{#url}" />" border="0"/>
+ <@s.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" />
+ <@s.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" />
+ <img src="<@s.property value="%{#url}" />" border="0"/>