addDecoration method throughout
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<div class="input">
|
||||
<form:input path="checkinDate"/>
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "checkinDate",
|
||||
widgetType : "dijit.form.DateTextBox",
|
||||
widgetAttrs : { value : dojo.date.locale.parse(dojo.byId("checkinDate").value, {selector : "date", datePattern : "yyyy-MM-dd"}), required : true }}));
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="input">
|
||||
<form:input path="checkoutDate"/>
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "checkoutDate",
|
||||
widgetType : "dijit.form.DateTextBox",
|
||||
widgetAttrs : { value : dojo.date.locale.parse(dojo.byId("checkoutDate").value, {selector : "date", datePattern : "yyyy-MM-dd"}), required : true }}));
|
||||
@@ -84,11 +84,11 @@
|
||||
<form:radiobutton id="smoking" path="smoking" label="Smoking" value="true"/>
|
||||
<form:radiobutton id="non-smoking" path="smoking" label="Non Smoking" value="false"/>
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : 'smoking',
|
||||
widgetType : "dijit.form.RadioButton",
|
||||
widgetModule : "dijit.form.CheckBox" }));
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : 'non-smoking',
|
||||
widgetType : "dijit.form.RadioButton",
|
||||
widgetModule : "dijit.form.CheckBox" }));
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="input">
|
||||
<form:input path="creditCard"/>
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "creditCard",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { required : true, invalidMessage : "A 16-digit credit card number is required.",
|
||||
@@ -118,7 +118,7 @@
|
||||
<div class="input">
|
||||
<form:input path="creditCardName" maxlength="40"/>
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "creditCardName",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { required : true }}));
|
||||
@@ -157,7 +157,7 @@
|
||||
<input type="submit" id="proceed" name="_eventId_proceed" value="Proceed"/> 
|
||||
<input type="submit" name="_eventId_cancel" value="Cancel"/> 
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ValidateAllDecoration({event : 'onclick', elementId : 'proceed'}));
|
||||
Spring.addDecoration(new Spring.ValidateAllDecoration({event : 'onclick', elementId : 'proceed'}));
|
||||
</script>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<fieldset>
|
||||
<form:input path="searchString"/>
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "searchString",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { promptMessage : "Search hotels by name, address, city, or zip." }}));
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<definition name="hotels/search" extends="standard-layout">
|
||||
<put-attribute name="body" value="search.body" />
|
||||
</definition>
|
||||
|
||||
<definition name="search.body" template="/WEB-INF/hotels/search.jsp">
|
||||
<put-attribute name="hotelResults" value="/WEB-INF/hotels/hotelResults.jsp" />
|
||||
</definition>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="output">
|
||||
<input type="text" name="j_username" id="j_username" <c:if test="${not empty param.login_error}">value="<%= session.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY) %>"</c:if> />
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoratio(new Spring.ElementDecoration({
|
||||
elementId : "j_username",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { promptMessage : "Your username", required : true }}));
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="output">
|
||||
<input type="password" name="j_password" id="j_password" />
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ElementDecoration({
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "j_password",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { promptMessage : "Your password", required : true}}));
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="buttonGroup">
|
||||
<input name="submit" id="submit" type="submit" value="Login" />
|
||||
<script type="text/javascript">
|
||||
Spring.decorations.push(new Spring.ValidateAllDecoration({event : 'onclick', elementId : 'submit'}));
|
||||
Spring.addDecoration(new Spring.ValidateAllDecoration({event : 'onclick', elementId : 'submit'}));
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user