Hello,
I am having some problems using spring-js and tiles. I don't think that this is a problem because of tiles, i have tried using spring-js without tiles with the same result. So, i am receiving an javascript error when my bage is loade :
This is what i have done :Code:Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E) Timestamp: Mon, 10 May 2010 18:01:16 UTC Message: Could not load 'dijit.MultiSelect'; last tried '../dijit/MultiSelect.js' Line: 16 Char: 5948 Code: 0 URI: http://localhost:8080/fm/resources/dojo/dojo.js
tiles main template :
my jsp file :Code:<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <html> <head> <title><tiles:getAsString name="title" /></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Spring Travel: Spring MVC and Web Flow Reference Application</title> <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/dijit/form/MultiSelect.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"></script> <link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" /> <style type="text/css" media="screen"> @import url("<c:url value="/resources/css-framework/css/tools.css" />"); @import url("<c:url value="/resources/css-framework/css/typo.css" />"); @import url("<c:url value="/resources/css-framework/css/forms.css" />"); @import url("<c:url value="/resources/css-framework/css/layout-navtop-localleft.css" />"); @import url("<c:url value="/resources/css-framework/css/layout.css" />"); @import url("<c:url value="/resources/styles/booking.css" />"); </style> </head> <body> <div id="header"> <div id="headerTitle"><tiles:insertAttribute name="header" /></div> </div> <div id="menu"> <tiles:insertAttribute name="menu" /> </div> <div id="content"> <td><tiles:insertAttribute name="body" /> </div> <div id="footer"> <tiles:insertAttribute name="footer" /> </div> </body> </html>
I see a small boxe on the right of my textbox saying that they are mandatory, but widget seems to be unformated.Code:<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%--<%@ include file="/taglibs.jsp" %> <head> <!-- extra --> <%@ include file="/extra_head.jsp" %> </head>--%> <script type="text/javascript">dojo.require("dijit.TitlePane"); dojo.require("dijit.MultiSelect");</script> <div dojoType="dijit.TitlePane" style="width: 100%" title="Abonare newsletter"> <form:form action="/${ctx}/newsletter/add" method="POST" modelAttribute="newsletter"> <form:errors path="*" cssClass="errors"/><br/> <div> <label for="nume">First Name:</label> <form:input id="nume" cssStyle="width:250px" maxlength="30" path="nume" size="30"/> <form:errors path="nume" cssClass="errors"/> <script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration( {elementId : "nume", widgetType : "dijit.form.ValidationTextBox", widgetAttrs : {promptMessage: "First name is mandatory", required : true}})); </script> </div> <div> <label for="prenume">Last Name:</label> <form:input id="prenume" cssStyle="width:250px" maxlength="30" path="nume" size="30"/> <form:errors path="prenume" cssClass="errors"/> <script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration( {elementId : "prenume", widgetType : "dijit.form.ValidationTextBox", widgetAttrs : {promptMessage: "Last name is mandatory", required : true}})); </script> </div> </form:form> </div>
You can see the message in the screenshot.
Anyone can provide any solution. Thx.


Reply With Quote