Thanx very much Chris, it almost did it. Could you please look at another
bug...
Code (with the corrections applied):
String stageLabelRow = "";
if (appendInstanceToPath && appendUserToPath &&
appendIDToPath) {
stageLabelRow = "<TD> <a href=\"" +
stagingRef + "\" target=\"_new\" class=\"cmdA\">" + (si.description == null)
? "<i>no label</i>" : si.description + "</a> </TD>";
} else {
stageLabelRow = "<TD> " +
(si.description == null ? "<i>no label</i>" : si.description) +
" </TD>";
}
Produces the following error:
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for
JSPc:\d\editor\tomcat\work\localhost_8080%2Fsms\_0002feditor_0002fbin_0002fs
taging_0002fstagingForm_0002ejspstagingForm_jsp_7.java:199: Incompatible
type for ?:. Can't convert java.lang.String to boolean.
stageLabelRow = " " +
(si.description == null) ? "no label" : si.description + " ";
^
1 error
-----Original Message-----
From: Christian Roslawski [mailto:[EMAIL PROTECTED]]
Sent: marted� 11 settembre 2001 13.48
To: [EMAIL PROTECTED]
Subject: Re: syntax error
Hi Alexey
> <%
> ......
>
> String stageLabelRow = "";
> if (appendInstanceToPath && appendUserToPath &&
> appendIDToPath) {
> stageLabelRow = "<TD> <a href=\"" + stagingRef + ""
> target="_new" class="cmdA">" + (si.description == null) ? "<i>no
label</i>"
> : si.description +; "</a> </TD>";
> } else {
> stageLabelRow = "<TD> " + (si.description == null) ? "<i>no
> label</i>" : si.description + " </TD>";
> }
> ......
> %>
Hmm, missing backslashes and a misplaced semicolon I would say.
stageLabelRow =
"<TD> <a href=\"" + stagingRef + "\" target=\"_new\" class=\"cmdA\">"
+
(si.description == null) ? "<i>no label</i>" : si.description +
"</a> </TD>";
Chris
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets