0

JSP exception when wrapping custom ZK component in JSP tag

asked 2009-11-11 04:12:47 +0800

marcelk gravatar image marcelk
58 1 1 1

updated 2009-11-11 04:16:05 +0800

Hi,

I want to wrap a ZK macro component into a jsp tag using ZK 3.6.3 pro and zuljsp version 1.0.0

I've followed the instructions on page http://www.zkoss.org/smalltalks/zuljsp/

I've created this class:
public class UploadComponentTag extends BranchTag {
@Override
protected Component newComponent(Class clazz) throws Exception {
return new UploadComponent();
}
}

And this tld:
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.3</jsp-version>
<tag>
<name>UploadComponent</name>
<tag-class>nl.contentarchitects.module.upload.UploadComponent
</tag-class>
<body-content>scriptless</body-content>
<dynamic-attributes>true</dynamic-attributes>
<attribute>
<description>
If false, this tag is ignored. Default: true.
</description>
<name>if</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
If true, this tag is ignored. Default: false.
</description>
<name>unless</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Default : Zul Component .
</description>
<name>use</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>

I get this error:
org.apache.jasper.JasperException: /upload.jsp(13,0) The u:UploadComponent tag declares that it accepts dynamic attributes but does not implement the required interface

But I thought because I extend BranchTag the interface DynamicAttributes is already implemented by that one?

How to fix this?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-11-16 03:10:22 +0800

iantsai gravatar image iantsai
2755 1

How you use your custom JSP tag in your jsp file?

Maybe there's something wrong on it.

link publish delete flag offensive edit

answered 2009-11-17 01:56:11 +0800

marcelk gravatar image marcelk
58 1 1 1

This is the source for my jsp:

<%@ taglib uri="http://www.contentarchitects.nl/uploadcomponent" prefix="c" %>

<c:UploadComponent/>

My class contains this:


The tld:
Source Code
public class UploadComponentTag extends BranchTag {
    @Override
   protected Component newComponent(Class clazz) throws Exception {
      return new UploadComponent();
   }
}

The tld is:

<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.3</jsp-version>
<tag>
  <name>UploadComponent</name>
  <tag-class>nl.contentarchitects.module.upload.UploadComponent
  </tag-class>
  <body-content>scriptless</body-content>
  <dynamic-attributes>true</dynamic-attributes>
  <attribute>
    <description>
If false, this tag is ignored. Default: true.
</description>
<name>if</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
If true, this tag is ignored. Default: false.
</description>
<name>unless</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Default : Zul Component .
</description>
<name>use</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-11-11 04:12:47 +0800

Seen: 584 times

Last updated: Nov 17 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More