Fix hangman example to use Dojo plugin tags

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@542323 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Musachy Barroso
2007-05-28 21:38:46 +00:00
parent d404f524e9
commit 9542de73aa
3 changed files with 15 additions and 20 deletions
@@ -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>
@@ -1,7 +1,7 @@
<html>
<head>
<@s.head theme="ajax" debug="true" />
<@sx.head />
</head>
<body>
@@ -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}"/>" >