I've been working
with display tag code and want to add an attribute to it. The attribute I want
to add needs to go in the display:table tag. I've added the getter and setter
methods to the TableTag class and added the attribute to the display.tld file,
but when I add it to my jsp and try and compile I get this
error:
"deletePage
is not a property of
org.apache.taglibs.display.TableTag"
DeletePage is the
name of the attribute that I want to add. Also, TableTag compiles w/o any errors
or warnings.
Here's some code
from my jsp using the DisplayTag lib:
<display:table
width="75%" name="test" deletePage="test.html">
<display:column property="id" title="ID" headerStyleClass="ListTableHeader"/>
<display:column property="name" headerStyleClass="ListTableHeader" />
<display:column property="email" headerStyleClass="ListTableHeader"/>
<display:column property="status" headerStyleClass="ListTableHeader"/>
<display:column property="description" title="Comments" headerStyleClass="ListTableHeader"/>
</display:table>
<display:column property="id" title="ID" headerStyleClass="ListTableHeader"/>
<display:column property="name" headerStyleClass="ListTableHeader" />
<display:column property="email" headerStyleClass="ListTableHeader"/>
<display:column property="status" headerStyleClass="ListTableHeader"/>
<display:column property="description" title="Comments" headerStyleClass="ListTableHeader"/>
</display:table>
(If I remove the
deletePage attribute from the tag, it compiles w/o errors or
warnings)
Here's what's in the
display.tld:
<?xml version="1.0"
encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>display</shortname>
<uri>\WEB-INF\display.tld</uri>
<info>A description of the display tag library goes here...</info>
<tag>
<name>table</name>
<tagclass>org.apache.taglibs.display.TableTag</tagclass>
<teiclass>org.apache.taglibs.display.TableTagExtraInfo</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>john</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>display</shortname>
<uri>\WEB-INF\display.tld</uri>
<info>A description of the display tag library goes here...</info>
<tag>
<name>table</name>
<tagclass>org.apache.taglibs.display.TableTag</tagclass>
<teiclass>org.apache.taglibs.display.TableTagExtraInfo</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>john</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
...
And here's what's in
the TableTag.java:
private
String deletePage = null;
private void
setDeletePage(String thePage)
{
this.deletePage = thePage;
}
{
this.deletePage = thePage;
}
private String
getDeletePage()
{
return this.deletePage;
}
{
return this.deletePage;
}
The rest of the code
has remained intact from when I downloaded it. Also, I ran the code without any
problems to see how it worked before I added the deletePage stuff. Any idea as
to why it's not working? Thanks.
John Yearous
E-Business Developer
507-453-8356

