• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Tag won't display the attributes

 
Cori Eckel
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick summary: I can't refer to the attributes passed in to by custom tag.

I have a .jsf page that is passing two strings. One is from the backingBean and the other is hardcoded.




The --<hutputText value="#{item.title}"/>-- shows that I do have a value when call this custom tag with item.title passed as varid.

Now the tag looks like this: custom.tag located in /WEB-INF/tags/



I was told I needed to have an implicit.tld file and I read it also here (http://blogs.sun.com/roller/page/jluehe?entry=implicit_tag_libraries_require_and)

So here's my implicit.tld (also located under /WEB-INF/tags/




So the problem is when I refer varid - I get nothing (nothing writes out in either case using outputText or just ${varid}).

And when I refer to hardid, I get nothing for the outputText test but I do get something for the ${hardid} test.

I don't see this a reference to this problem alot on the web so I figure I must be missing something obvious but I just don't know what.

Does anyone have any ideas?

Thanks.

C
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't looked lately, but I think you need to declare the attributes you're going to support. In other words, the example you used is a "do-nothing" skeleton that requires you to add stuff that makes it do something useful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic