• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Custom Tag won't display the attributes

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 --<h:outputText 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
 
Saloon Keeper
Posts: 27819
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic