Author: musachy
Date: Mon May 28 14:38:46 2007
New Revision: 542323
URL: http://svn.apache.org/viewvc?view=rev&rev=542323
Log:
Fix hangman example to use Dojo plugin tags
Modified:
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl
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?view=diff&rev=542323&r1=542322&r2=542323
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl
(original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl
Mon May 28 14:38:46 2007
@@ -2,7 +2,7 @@
<html>
<head>
<title>Showcase - Hangman</title>
- <@s.head theme="ajax" debug="false" />
+ <@sx.head />
</head>
<body>
@@ -17,14 +17,13 @@
}
var _listeners = {
- guessMade: function(sourceId, type) {
- if(type == "before") {
- this.guessMadeFunc(sourceId);
- this.updateCharacterAvailable(sourceId);
- this.updateVocab(sourceId);
- this.updateScaffold(sourceId);
- this.updateGuessLeft(sourceId);
- }
+ guessMade: function(request, widget) {
+ var sourceId = widget.widgetId;
+ this.guessMadeFunc(sourceId);
+ this.updateCharacterAvailable(sourceId);
+ this.updateVocab(sourceId);
+ this.updateScaffold(sourceId);
+ this.updateGuessLeft(sourceId);
},
guessMadeFunc: function(sourceId) {
var requestAttr = { character: sourceId
};
@@ -216,13 +215,11 @@
<@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
<@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" />
- <@s.a theme="ajax"
- href="%{blankUrl}"
- id="%{#currentCharacter}"
- notifyTopics="topicGuessMade"
+ <@sx.a id="%{#currentCharacter}"
+ beforeNotifyTopics="topicGuessMade"
showErrorTransportText="true">
<img height="36" alt="" src="<@s.property
value="%{#chalkboardImageUrl}" />" width="36" border="0" />
- </@s.a>
+ </@sx.a>
</@s.iterator>
</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?view=diff&rev=542323&r1=542322&r2=542323
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl
(original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/test.ftl Mon May
28 14:38:46 2007
@@ -1,7 +1,7 @@
<html>
<head>
- <@s.head theme="ajax" debug="true" />
+ <@sx.head />
</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?view=diff&rev=542323&r1=542322&r2=542323
==============================================================================
---
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl
(original)
+++
struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/updateCharacterAvailable.ftl
Mon May 28 14:38:46 2007
@@ -22,13 +22,11 @@
<@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
<@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" />
- <@s.a theme="ajax"
- id="%{#currentCharacter}"
- href="%{blankUrl}"
- notifyTopics="topicGuessMade"
+ <@sx.a id="%{#currentCharacter}"
+ afterNotifyTopics="topicGuessMade"
showErrorTransportText="true">
<img height="36" alt="" src="<@s.property
value="%{#chalkboardImageUrl}" />" width="36" border="0" />
- </@s.a>
+ </@sx.a>
<#--
<a href="#" id="<@s.property value="%{#currentCharacter}"/>" >