hi, i have a Tag Handler called simpleTab who just has to do the
following :
public void doTag() throws JspException, IOException {
etJspContext().getOut().write(
"<td width=\"6\" img src =\"images/tab-left_active.gif\" border=\"0\">
</td><td align =\"center\" class=\"tab\" style=\"cursor: pointer;
background: url(images/tab_bg_active.gif)\"
onClick=\"TAB.changeActive(this)\">" + this.title +
"</td><td width=\"6\" img src=\"images/tab-right_active.gif\"
border=\"0\"></td> ");
Now title is a tag Atrribute i'm passing from a jsp, now there are 2
problems :
1. i can see this html in the source of the page i want this html to be
in, but it is not showing up on the page!!!
2. the source doesnt have the "title" i plug into it in the doTag
method.
whats da problem?
ilkinulas - 24 Jan 2006 07:43 GMT
it is really hard to read code like this.
if you need to generate html from java you can write something like
this:
etJspContext().getOut().write("<td width='6' img src
='images/tab-left_active.gif' border='0'>");
I mean try using ' ' instead of " ". It makes your code more readable.
shruds - 24 Jan 2006 08:21 GMT
okie now?
public void doTag() throws JspException, IOException {
getJspContext().getOut().write(
'<td width="6"><img src="images/tab-left_active.gif"
border="0"></td><td align="center" class="tab" style="cursor: pointer;
background: url(images/tab-bg_active.gif)"
onclick="TAB.changeActive(this)">' + this.title+' </td><td
width="6"><img src="images/tab-right_active.gif" border="0" ></td>');
shruds - 24 Jan 2006 09:01 GMT
no its not i know! should read like this :
"<td width='6'><img src='images/tab-left_active.gif'
border='0'></td><td align='center' class='tab' style='cursor: pointer;
background: url(images/tab-bg_active.gif)'
onclick='TAB.changeActive(this)'>"+ this.title+' </td><td
width='6'><img src='images/tab-right_active.gif' border='0' ></td>");
sorry for da earlier post.