• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Jsp translation error

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in my custom tag, i just added an attribute, for which i made an entry in the tld file and implemented the setter for it in the implementation java file.
When i use this attribute in the jsp page it says
Jsp translate:Error failed to locate setter method for attribute in tag class

what could be the reson for it.
The java file is present in the project in the form of jar files which i have imported in the project.

the jsp code is :

<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>

<display:table name="requestScope.list" cellpadding="3" cellspacing="0" id="row" excludedParams="*" requestURI="javascript:submitPage()" requestURIcontext="false" columnLimit="4">

the tld file is :
<tag>
<name>table</name>
<tag-class>org.displaytag.tags.TableTag</tag-class>
<tei-class>org.displaytag.tags.TableTagExtraInfo</tei-class>
<body-content>JSP</body-content>
<display-name>table</display-name>
<description>
Displays a list in an html table, formatting each item in the list according to the Column tags nested inside of
this tag. Use the list attribute to indicate the Collection of data, in some scope, that the tag should operate
on. Supports the export of the list data to alternative formats such as CSV, Excel, and XML. The contents of the
list can be sorted, and the list can be broken into individual pages for display. If you use this tag in Struts,
or in some other framework where the page is included via a jsp:include, you should use the requestURI attribute
to indicate where tag generated links should point.
</description>
<attribute>
<name>columnLimit</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
<description>user can specify the max number of column above which the pagination will appear on both ends. </description>
</attribute>
other arrtibute tags
</tag>

The java file(TableTag.java) has this entry:

public void setColumnLimit(String columnLimit) {
this.columnLimit = columnLimit;
}

Can you help me out where am i doing wrong.....
[ June 14, 2007: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When posting code, it makes the code a lot easier to read if you use UBB code tags. Please read this for more information.
 
We don't have time for this. We've gotta save the moon! Or check this out:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic