aspose file tools*
The moose likes JSF and the fly likes Custom tags : when  does JSF call 'decode' ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Custom tags : when  does JSF call Watch "Custom tags : when  does JSF call New topic
Author

Custom tags : when does JSF call 'decode' ?

Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Hi,

I'm new to JSF.
I'm following a tutorial for implementing my own (custom) JSF tags.
It works, but I don't really understanding what happens behind the scenes :

My tutorial creates a customized *input* compoenet.
It inherit from UIInput (javax.faces.component.UIInput), and implements encoding/decoding methods.

My problem is just the *decoding* method:
when would the JSF framework call it ?
I mean, the controller servlets gets various HTTP requests from browsers. How does it decide which UI components should get a chance to 'decode()' this HTTP request ?
Is it based on some hidden parameter in the request ?

Thanks.
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
Register the phase listener in your application and you can see what happens and when. This is an URL to a ready-to-use phaseTracker:

http://www.jsftutorials.net/faces-config/phaseTracker.html

--
Sergey : https://ajax4jsf.dev.java.net/
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Thanks, I actually did this...
My problem is not seeing *when* things are called, but rather understanding *why* the JSF spec decides to call them...

I other words, I'm looking for information from the following perspective:
An HTTP request arrives to the controller servlet. What would the servlet do - how would it decide which UIComponents need their 'decode()' method to be called now ?
Would it rely on request parameters ? session data ? etc...
sandy li
Greenhorn

Joined: May 08, 2006
Posts: 3
That is very reasonable.


<a href="http://www.sugoo.com" target="_blank" rel="nofollow">Sugoo</a>
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
JSF as such is a component framework and has a processing life cycle.
I think this might help you http://java.sun.com/javaee/javaserverfaces/reference/docs/customRenderKit.html

See the section "Performing Decoding"
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Thanks very much
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom tags : when does JSF call 'decode' ?