Re: Where dose JSP works in JSF request lifecycle?

2006-05-03 Thread Craig McClanahan
On 5/3/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: But the prerender() is called before the tag being processed. when the prerender() is called, the reference is still null if this is an initial request. Tree hasn't been constructed, when the prerender() is called. I guess maybe if I want to s

Re: Where dose JSP works in JSF request lifecycle?

2006-05-03 Thread 王曾wang_zeng
But the prerender() is called before the tag being processed. when the prerender() is called, the reference is still null if this is an initial request. Tree hasn't been constructed, when the prerender() is called. I guess maybe if I want to set a initial value of a component when the page is v

Re: Where dose JSP works in JSF request lifecycle?

2006-05-03 Thread Craig McClanahan
On 5/3/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: Oh,yeah,I see, that's why you use "new" keyword in the code above. >private HtmlOutputText dynamicText = new HtmlOutputText(); Then,I have a pretty weird idea. If you dosen't new a HtmlOutputText,will there be a NullpointerException popped up i

Re: Where dose JSP works in JSF request lifecycle?

2006-05-03 Thread 王曾wang_zeng
Oh,yeah,I see, that's why you use "new" keyword in the code above. private HtmlOutputText dynamicText = new HtmlOutputText(); Then,I have a pretty weird idea. If you dosen't new a HtmlOutputText,will there be a NullpointerException popped up in this case? -- Wang Zeng

Re: Where dose JSP works in JSF request lifecycle?

2006-05-02 Thread Craig McClanahan
On 5/2/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: Graig, that's very kind of you. Are these aproachs feasible,when the page is requested by an inital request? When an inital request arrives, the view restoring phase is skipped and JSF goes to the response rendering phase directly. Then there sho

Re: Where dose JSP works in JSF request lifecycle?

2006-05-02 Thread 王曾wang_zeng
Graig, that's very kind of you. Are these aproachs feasible,when the page is requested by an inital request? When an inital request arrives, the view restoring phase is skipped and JSF goes to the response rendering phase directly. Then there should be no component tree constructed at all ,when pr

Re: Where dose JSP works in JSF request lifecycle?

2006-05-01 Thread Craig McClanahan
On 5/1/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: 2006/4/28, Craig McClanahan <[EMAIL PROTECTED]>: > > You are correct. There is special handling defined in the Restore View > phase. If that phase discovers that there is no state to be restored > , then JSF will immediately forward to Render R

Re: Where dose JSP works in JSF request lifecycle?

2006-05-01 Thread 王曾wang_zeng
2006/4/28, Craig McClanahan <[EMAIL PROTECTED]>: You are correct. There is special handling defined in the Restore View phase. If that phase discovers that there is no state to be restored , then JSF will immediately forward to Render Response phase. So, how do you make sure that the right dy

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread 王曾wang_zeng
Thank you Craig for making it clear. -- Wang Zeng

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Craig McClanahan
On 4/28/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: 2006/4/29, Craig McClanahan <[EMAIL PROTECTED]>: > > You also have to remember that your listener is going to receive > beforePhase() calls for *all* simultaneously active requests, not just the > one page you might be interested in. And, don't

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread 王曾wang_zeng
2006/4/29, Craig McClanahan <[EMAIL PROTECTED]>: You also have to remember that your listener is going to receive beforePhase() calls for *all* simultaneously active requests, not just the one page you might be interested in. And, don't forget to deregister yourself as a listener when the reque

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Hubert Rabago
On 4/28/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: Sorry for not being clearer. You can indeed register a listener with a declaration -- you get an application wide singleton that has the same lifetime as your application. However, it's also possible to add a phase listener programmatical

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Craig McClanahan
On 4/28/06, Hubert Rabago <[EMAIL PROTECTED]> wrote: On 4/28/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > Yes. The way to do this would be to define a phase listener for Render > Response phase, and do your data collection in the beforePhase event > handler. You also have to remember th

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Hubert Rabago
On 4/28/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: Yes. The way to do this would be to define a phase listener for Render Response phase, and do your data collection in the beforePhase event handler. You also have to remember that your listener is going to receive beforePhase() calls for

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Craig McClanahan
On 4/28/06, Bernhard Slominski <[EMAIL PROTECTED]> wrote: > So, how do you make sure that the right dynamic data gets > loaded so that the > page displays the right stuff? That's where Shale comes in > handy. If your > backing bean implements the ViewController interface, then > prerender() wi

Re: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Craig McClanahan
On 4/27/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: Thank you,Craig. What do you mean by setup action? Is that the kind of action which grabs some data, do some encapsilation work, and stuff them into JSP scopes. Yes, that's what I meant. You say we can archive the goal with shale as well a

AW: Where dose JSP works in JSF request lifecycle?

2006-04-28 Thread Bernhard Slominski
> So, how do you make sure that the right dynamic data gets > loaded so that the > page displays the right stuff? That's where Shale comes in > handy. If your > backing bean implements the ViewController interface, then > prerender() will > get called just before the JSP page is invoked. This

Re: Where dose JSP works in JSF request lifecycle?

2006-04-27 Thread 王曾wang_zeng
Thank you,Craig. What do you mean by setup action? Is that the kind of action which grabs some data, do some encapsilation work, and stuff them into JSP scopes. You say we can archive the goal with shale as well as without shale. I remeber that between phases a Phase Event will be fired. When J

Re: Where dose JSP works in JSF request lifecycle?

2006-04-27 Thread Craig McClanahan
On 4/27/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote: > > In JSF, when a request arrives, it should go through 6 phases to process > the > request. The first stage is called Restore the View , and the last stage > is > called Render the Response. I wonder where JSP works in these 6 > phases. If > JSP

Where dose JSP works in JSF request lifecycle?

2006-04-27 Thread 王曾wang_zeng
In JSF, when a request arrives, it should go through 6 phases to process the request. The first stage is called Restore the View , and the last stage is called Render the Response. I wonder where JSP works in these 6 phases. If JSP only works in the last phase, how can JSF restore the view first