Register | Log in | Password |

365 projects | 71 services | 215 websites | 1073 freelancers | 2755 topics | advertise


Purchase JoomlaWatch:
30 day money-back guarantee
Read more...
9 EUR lifetime license
Buy Now

15 EUR lifetime license
Buy Now
(nofollow link from sponsors page)

Login:

23.4%United States United States
15.4%India India
7.3%Russian Federation Russian Federation
7.1%Colombia Colombia
6.1%Germany Germany
5.2%United Kingdom United Kingdom
4.4%Poland Poland
3.5%Netherlands Netherlands
3.1%France France
2.9%Canada Canada

Today: 168
Yesterday: 1413
This Week: 8231
Last Week: 10267
This Month: 4871
Total: 28185

Users

Most active users today from total of 10:
mlewis, Gomjerk, swaffel, specialone, strategist, leoaraujo, bbfpl, hanji, fddeltenre, Denclub
About JoomlaWatch:
JoomlaWatch is popular joomla visitor tracking and live stats component. It provides several features such as spam blocking, goals tracking, charts, nightly email reports, latest visit map, interactive HTML5 traffic flow graph and many other useful functionalities, which will help you to optimize your site.
RSS Feeds:

rss Freelance
rss Projects
rss Forum
rss Resources

Home

Icefaces custom tag with facelets

I've been struggling with creating my own icefaces tag that I could use everywhere it's needed. There are many tutorials on the internet, BUT.. I couldn't get it work anyway.

When I looked at the sourcecode on the webpage, the tag     <ticker:ticker />  was there directly in the HTML sourcecode. This is wrong, because I expected the rendered ouput there.

One whole week I tried to solve this problem trying almost everything. But then, finally, I found it.

So, what was the problem? When you are using Facelets with your JSF/Icefaces, the TLD (tag library descriptor) files are for nothing. Even if I tried to place them everywhere. You have to create the equivalent of the TLD file for the Facelets - the XML file describing the tag structure. In this case it's ticker.taglib.xml

 

ticker.taglib.xml
The tag descriptor for the facelets

 

 There you specify the component's class - Ticker, and it's renderer - TickerRenderer. Now, you don't need the TickerTag as suggested when using JSP in many tutorials around the internet.


Also don't forget to tell the JSF to recognize your taglib and place this XML snippet into web.xml (just the first reference to xml, the second is when you want to use also another taglib - eg. the tomahawk components)
web.xml facelets libraries
Put the reference to your tag descriptor into web.xml

  

    <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>
            /WEB-INF/ticker.taglib.xml;/WEB-INF/tomahawk.taglib.xml
        </param-value>
    </context-param>

 

  JSF source
JSF source with a custom tag



rendered output
Rendered output

 

I wonder why this 'trick' hasn't been described yet in some tutorial. So, I hope you will find this remark useful and it will help you when creating your own JSF components.

 

 

 

Comments  

 
0 #1 Jeff 2007-11-09 22:35
This was very helpful. Thanks so much for sharing this!!
Quote
 
 
0 #2 Tam 2008-05-23 22:10
Thanks for you answer. I was wondering if you can explain how to write the renderer for the class as most JSF custom components tutorials explain how to build a Tag file.
thanks
Quote
 
 
0 #3 michelle 2008-05-28 13:56
TLD's seem to be a major headache the only way we've been able to deploy icefaces custom components, we're working on our 3rd custom component is to include the tld, faces-config and the facelets tags in the icefaces-comp-jar itself. The other issue is its really a pain to create the necessary tag java module. On the bright side the api is very rich and coding icefaces components are easier than traditional jsf components.
Quote
 
 
0 #4 Java dev 2009-10-13 23:41
Thanks. This was great and very helpful!
Quote
 
 
0 #5 Deckard 2011-01-17 10:13
Thanks, that helped a lot. But now I'm struggeling on the packaging:
For now I am packaging a simple jar file, containing the facelets taglib, a managedbeand and some resources (css and images). The code runs fine, but does not load the resources packaged in the jar.
How would I reference to a gif located in the Component-jar, say in a folder called "resources" when using "ice:graphicImag e": What url should I use in the components xhtml-file?
And, to have it a bit more complex: I don't know whether the component would be used in a simple servlet or in a portlet-application: Are there any differences?
Any idea?
Thanks in advance
Det
Quote
 

Add comment


Security code
Refresh


no license?

Recommended: (advertise)
Joomlawatch 1.2.17 Demo (PRO: 9/15 EUR)
Download Joomlawatch 1.2.17 (PRO: 9/15 EUR)

Rate this extension ...


Stay in touch:

New article about JoomlaWatch Live Stats feature: (link)
16 hours ago from web

Tested versions 1.2.12 FREE, 1.2.17 PRO, 1.2.18 BETA on Joomla 2.5 and older Joomla 1.5 - confirmed to work on both Joomla versions

Small installer fixes - added JoomlaWatch compatibility with Joomla 2.5

New article on JoomlaWatch Traffic Flow feature: (link) ... All features of JoomlaWatch will be documented this way.

Another minor fixes for version 1.2.17 and 1.2.18, added functionality to display only changed values in SEO report - important keyprases
2 weeks ago from web

Minor fixes for JoomlaWatch version 1.2.17 (language files), you can find the latest package in customer zone ((link)
2 weeks ago from web

If you'd like to help with testing of the latest 1.2.18 BETA with new features (Joomla/Wordpress),please add me on skype: matto3c.Thank you!
3 weeks ago from web

New article on JoomlaWatch SEO (Search Engine Optimization) report functionality - (link)

JoomlaWatch 1.2.18 is out now! Features new click heatmap feature, SEO report - how people find you on google, and many other improvements

Reorganized the menu items. Now you'll be able to easily find most requested links

JoomlaWatch 1.2.18 BETA now ready! Main features: - Heatmap integration - SEO reports - Anti-spam section visualization (link)

Fixed one issue: no unique visits recorded; PHP $_SERVER['REMOTE_ADDR'] doesn't always return remote IP address! using HTTP_X_FORWARDED_FOR

Christmas Special - 19% OFF from all licenses until 25th of December 2011

JoomlaWatch Heatmap functionality nearly done. Works with all client resolutions. Will be available in next version. (link)

Simple customer zone - (link) is now ready. Users who purchased the PRO version can now download newest version from there.

Because of the problems with payments and forwarding. We are using (link) service to deliver you the files after purchase.

Tracking Expenses from SMS android application is now published on android market :) and it's completely free !

(link) user information now protected with UserCrypt 1.1

UserCrypt version 1.1 released: Added query log, jos_users decryption on database interceptor plugin deactivation (link)

Timezone issue now fixed. Tested on canadian server which has hosting in the USA. Also module class suffix parameter now works for J1.7



Partners:
Freelance ColdFusion, Flex, PHP

Olejomalby, abstraktne obrazy

Camping Europe

WinAsm Studio

Vyšné Ružbachy

Sochy, Reštaurovanie

R.E.M.

Valid XHTML 1.0 Transitional

RSS feed:

Statistics:
Search Engine Genie Promotion Widget
Privacy policy | Advertise | Donate

Locations of visitors to this page


©2003-2010 Codegravity.com