JSP validator - Undefined attribute name [message #189032] |
Fri, 02 March 2007 20:08  |
Eclipse User |
|
|
|
Originally posted by: kevin.ilsen.mckesson.com
In my JSP files, when I'm using form fields and need to programmatically
(server-side) set certain tag attributes (e.g., checked, disabled, selected,
etc.), I often do it using embedded JSP scriptlet code. For example:
<input type="checkbox" name="MyOption" value="true"
<%=isMyOptionChecked?"checked":""%>>
(where 'isMyOptionChecked' is a variable previously set in the file).
The JSP editor validator is reporting the error
Undefined attribute name (<%=isMyOptionChecked?"checked":""%>).
Is there some other way that I can do what I'm trying to do, without causing
a validation error?
|
|
|
Re: JSP validator - Undefined attribute name [message #189065 is a reply to message #189032] |
Sat, 03 March 2007 22:03   |
Eclipse User |
|
|
|
Originally posted by: eclipse5.rizzoweb.com
Kevin wrote:
> In my JSP files, when I'm using form fields and need to programmatically
> (server-side) set certain tag attributes (e.g., checked, disabled, selected,
> etc.), I often do it using embedded JSP scriptlet code. For example:
>
> <input type="checkbox" name="MyOption" value="true"
> <%=isMyOptionChecked?"checked":""%>>
>
> (where 'isMyOptionChecked' is a variable previously set in the file).
>
> The JSP editor validator is reporting the error
>
> Undefined attribute name (<%=isMyOptionChecked?"checked":""%>).
>
> Is there some other way that I can do what I'm trying to do, without causing
> a validation error?
I don't think the JSP editor should report an error. File a bug report
in Bugzilla.
But in any case, you should look into using taglibs instead of
scriptlet. The JSTL tags have all that you need to accomplish this kind
of simple presentation-layer logic. And there are lots of other taglibs
out there to do all kinds of things with no scriptlet code in the JSP.
Google for "JSTL" and/or "JSP tags" and you'll find lots of info and
tutorials.
Hope this helps,
Eric
|
|
|
Re: JSP validator - Undefined attribute name [message #189088 is a reply to message #189032] |
Mon, 05 March 2007 06:44  |
Eclipse User |
|
|
|
Kevin wrote:
> In my JSP files, when I'm using form fields and need to programmatically
> (server-side) set certain tag attributes (e.g., checked, disabled, selected,
> etc.), I often do it using embedded JSP scriptlet code. For example:
>
> <input type="checkbox" name="MyOption" value="true"
> <%=isMyOptionChecked?"checked":""%>>
>
> (where 'isMyOptionChecked' is a variable previously set in the file).
>
> The JSP editor validator is reporting the error
>
> Undefined attribute name (<%=isMyOptionChecked?"checked":""%>).
>
> Is there some other way that I can do what I'm trying to do, without causing
> a validation error?
If you're on 1.5.2, update to 1.5.3--this is already fixed.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159926
--
Nitin Dahyabhai
Structured Source Editor
|
|
|
Powered by
FUDForum. Page generated in 0.03843 seconds