Community
Participate
Working Groups
1. Create a Dynamic Web Project. 2. Turn on Semantic Validation. 3. In a JSP page add the following in the body tag: <script type="text/javascript"> function MyClass() { this.a = "a"; } var my = new MyClass(); </script> There are no errors at first. 4. Change the following line as so: var my = new MyClass2(); You should now see an error message about invalid type. 5. Fix the error so that it is correct again. The error message does not go away.
Seems like there are some invalid snytax errors being reported from webpages... I created a JS file under WebContent: function Person(first, last) { this.firstName = first; this.lastName = last; this.getFirstName = function() { return this.firstName; } this.getLastName = function() { return this.lastName; } } Person.prototype.getFullName = function() { return this.firstName + " " + this.lastName; }; Then in a web page I added: <script type="text/javascript" src = "script1.js"> var p = new Person("Chris", "Jaun"); alert(p.getFirstName()); </script> I'm getting errors saying I need to insert a ')'. Must be something wrong with the translator.
Clear the problemCache in reconcileCompilationUnit() of JsTranslation.