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 Can't render custom facelet component in IceFaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Can Watch "Can New topic
Author

Can't render custom facelet component in IceFaces

Carlos Conti
Ranch Hand

Joined: Apr 21, 2010
Posts: 112
Hi greenhorns,

I have been looking some tutorials on this issue but am not getting through.... can anyone please help??

I am trying to set up a custom JSF/IceFaces facelets component, and although following the steps in the official IceFaces guide (which must say is too basic and lacks many details) I don't get to render the tag, or only get thrown exceptions on non found facelet definitions.

Here are the relevant parts of my sources:

I) In /WEB-INF/ I define the file custom.taglib.xml:



II) In /WEB-INF/web.xml I point to the taglib file like:



III) In the folder
comunes/taglib/
I define the jspx file that contains the component specificacion:




IV) Finally I call the custom tag from another facelet file like :



The last error I got looked like this...

com.sun.facelets.tag.TagException: /entradas/SeccionDatosEntrada.jspx @69,44 <cst:selectPlantilla> Facelet Not Found: jndi:/comunes/taglib/selectPlantilla.jspx


I work with NetBeans6.8. My main problem is that the facelet is either not rendered or not found. Additionally if anyone could point me on how to make NB recognize the tags would be fantastic. However that's not the main problem. I believe this last issue could be solved defining a normal tld file right?, I have read somewhere that IDE's prefer tld files for tagname resolution.

Thanks for your insights.

Carlos.
Carlos Conti
Ranch Hand

Joined: Apr 21, 2010
Posts: 112
SOLVED! can't believe it...

the solution was to type '../' at the beginning of the <source> path in the customs.taglib.xml file. Amazing. Struggling with this for hours...
Why aren't such things specified in the documentation? Depending on the context you must play around with different path setting rules... can't they come together for the sake of simplicity??

Hope nobody lost as long as I did with it!
Marek Bedkowski
Greenhorn

Joined: Aug 28, 2011
Posts: 1
Carlos Conti wrote:SOLVED! can't believe it...

the solution was to type '../' at the beginning of the <source> path in the customs.taglib.xml file. Amazing. Struggling with this for hours...
Why aren't such things specified in the documentation? Depending on the context you must play around with different path setting rules... can't they come together for the sake of simplicity??

Hope nobody lost as long as I did with it!


Thanks Carlos... you saved me couple of hours...
Carlos Conti
Ranch Hand

Joined: Apr 21, 2010
Posts: 112
I have been advised many times in this forum... so I am happy that from time to time I can pay a bit of it back...

Regards,
Carlos.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't render custom facelet component in IceFaces
 
Similar Threads
Tag doesn´t works
[facelets] custom taglibrary not recognized
Include JSP/JSF pages into other JSP/JSF pages
facelets and custom tags
problems with <f:subview>