File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Custom Tag won't display the attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Custom Tag won Watch "Custom Tag won New topic
Author

Custom Tag won't display the attributes

Cori Eckel
Greenhorn

Joined: Aug 18, 2006
Posts: 1
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

Joined: Jun 25, 2001
Posts: 15957
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom Tag won't display the attributes
 
Similar Threads
Why is EL so good, and scriptlets so bad
Tag file deployed in a JAR?
Problem with taglibs
Not able to configure taglib
Passing java collection object using EL to a custom tag