• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't Pass object to custom tag attribute

 
Milo Timbol
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I get this error when i try to pass an object in the custom tags attribute.


[show] /signmodule/campaign/signsList.jsp:14: expected '<%= ... %>' at '#{signsBean.folderTreeDataModel}'
for tag attribute setter 'setDataModel(com.jscape.framework.galileo.components.treemodel.BaseTreeDataModel)'.
Tag attributes which can't be converted from strings must use a runtime
attribute expression.

12:
13: <body style="margin-left:12px;">
14: <sample:hello dataModel="#{signsBean.folderTreeDataModel}" />
15: </body>
16: </html>


Here's my Code
JSP




Hello.java


TLD file




This is the old code that worked. It used a different tree component that we are trying to replace.




The closest related topic I found on the internet is this one

http://www.mail-archive.com/resin-interest@caucho.com/msg00283.html

They were talking about resin settings (changes in web.xml) which I tried to but didnt work. Do you guys know how to solve this?

Im running resin 3.2.1.

Thanks in advance.

Milo
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65122
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Milo!

I suspect that your primary problem is that this view isn't being routed through the FacesServlet and the stock JSP processor didn't like your JSF-style EL.

A bigger issue, however, is that I seriously doubt that a standard JSP custom tag is going to work at all well on a JSF View definition. While JSF may have started out from a JSP perspective, it has diverged considerably since then. And done so in so messy a manner that I always caution people to try to avoid developing binary-level custom JSF tags and instead use Facelets xthml tag definitions or similar mechanisms wherever possible. Among other things, a proper JSF custom tag has to be set up to allow a plug-in rendering engine, and not the "brute force" simple scheme that ordinary JSPs do.

On the plus side, however, there are a number of JSF extension tagsets that come with their own tree controls already debugged and ready to use. Not to mention tons of other useful control types.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic