This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 212668 - [hotbug] JavaScript validation error on JSPs
Summary: [hotbug] JavaScript validation error on JSPs
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal with 2 votes (vote)
Target Milestone: 3.0.4   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Phil Berkland CLA
URL:
Whiteboard: PMC
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-11 16:25 EST by Kathy Chan CLA
Modified: 2010-03-03 11:13 EST (History)
8 users (show)

See Also:
thatnitind: pmc_approved? (david_williams)
thatnitind: pmc_approved? (naci.dai)
deboer: pmc_approved+
neil.hauge: pmc_approved+
raghunathan.srinivasan: pmc_approved+


Attachments
disables JavaScript validation by default (849 bytes, patch)
2009-02-12 01:32 EST, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Chan CLA 2007-12-11 16:25:11 EST
This is a follow-on to bug 207589:

I just tried the 12/06 WTP 3.0 build and the Axis2 JSPs (added to Web project
when the Axis2 facet was addd) are still being flagged as error:

Description     Resource        Path    Location        Type13The function
back() is undefined for the type Array       adminheader.jsp
a2b/WebContent/axis2-web/include        line 39 Validation Message13The
function reload(boolean) is undefined   link-footer.jsp
a2b/WebContent/axis2-web/include        line 23 Validation Message13The
function submit() is undefined  upload.jsp      a2b/WebContent/axis2-web       
line 29 Validation Message13The type Document is not visible    upload.jsp     
a2b/WebContent/axis2-web        line 25 Validation Message13The type Document
is not visible    upload.jsp      a2b/WebContent/axis2-web        line 29
Validation Message13Void functions cannot return a value        link-footer.jsp
a2b/WebContent/axis2-web/include        line 23 Validation Message13
Comment 1 Bradley Childs CLA 2008-11-20 15:46:27 EST
hi Kathy,

I downloaded the newest version of Axis2 to see if these errors still exist, and they don't.  It seems that the offending JavaScript listed above has been removed.
Comment 2 Kathy Chan CLA 2008-11-21 12:36:12 EST
I tried with the 2008 11/20 WTP 3.1 driver with Axis2 v1.4.1 and still got the error:

Description	Resource	Path	Location	Type
The function submit() is undefined	upload.jsp	a2a/WebContent/axis2-web	line 30	Validation Message

Please note that after re-enabling the JavaScript validation, you would have to manually select the WebContent/axis2-web folder and choose Validation in order to trigger validation.  We have programmatically turned off validation of this folder since there are many warnings in the JSP.

You would get the same result using WTP 3.0.3 driver as well.
Comment 3 Yen Lu CLA 2009-02-09 12:06:15 EST
We're seeing this in our adoption of WTP 3.1 as well. We don't have Axis 2 but we rely on the WTP Web services code for sample JSP generation and this javascript error is popping up:

"The function submit() is undefined for the type Element"
Comment 4 Keith Chong CLA 2009-02-11 09:19:44 EST
I'd like to see this fixed for 3.1 M6, for the reasons mentioned in the comments made above.
Comment 5 Yen Lu CLA 2009-02-11 09:22:38 EST
Eric has seen this on a 3.0.4 version of WTP. This is a regression from WTP 3.0 and contributes to bad out-of-the-box experience for our customers who want to generate and use Web service client sample JSPs.
Comment 6 Keith Chong CLA 2009-02-11 11:32:24 EST
Marking this as a hotbug for WTP 3.0.4.  Adding David Williams to the cc list.
Comment 7 Keith Chong CLA 2009-02-11 11:35:08 EST
(In reply to comment #5)
> Eric has seen this on a 3.0.4 version of WTP. This is a regression from WTP 3.0
> and contributes to bad out-of-the-box experience for our customers who want to
> generate and use Web service client sample JSPs.

Yen, I've marked this as a hotbug_request for 3.0.4, as per the reasons you've stated.
Comment 8 Nitin Dahyabhai CLA 2009-02-12 01:31:58 EST
Regression from fixing bug 241794, which involved moving the JS validator to the V2 framework, but left it enabled by default.
Comment 9 Nitin Dahyabhai CLA 2009-02-12 01:32:41 EST
Created attachment 125490 [details]
disables JavaScript validation by default
Comment 10 Nitin Dahyabhai CLA 2009-02-12 02:35:39 EST
From the PMC questionnaire, this is stop ship by virtue of being a regression.  It has been tested by myself, and simply sets the JavaScript validator to be disabled by default.  It's as close to zero risk as anything can be.
Comment 11 Nitin Dahyabhai CLA 2009-02-12 14:14:55 EST
Released to 3.0.4
Comment 12 Mark Hutchinson CLA 2009-02-24 16:03:46 EST
I've verified that validation is now off by default.  I don't get an error marker in the problems view, and there are no red error decorators on the file or project.

But if I open the file in the JSP editor, there is still a red squiggly line under some of my javascript indicating there is an error.  If I mouse over the error I see "The function submit() is undefined for the type Element".  It looks to me like whatever contributes the error "red underline" is not respecting the preference that turns of JS validation.

Should I open a separate bug for this?
Comment 13 Nitin Dahyabhai CLA 2009-02-24 16:39:42 EST
(In reply to comment #12)
> Should I open a separate bug for this?

I think it's covered under bug 174740 .