Re: Issue with checkboxes!

2006-05-07 Thread wang_zeng
The reason is that the form bean is configed to be saved in session scope, and the reset() method is not called when the form is submitted. action path=/UserManager type=org.springframework.web.struts.DelegatingActionProxy parameter=method scope=session

Re: Issue with checkboxes!

2006-05-07 Thread wang_zeng
you can also override the reset() method like this: public void reset(ActionMapping mapping, HttpServletRequest request){ this.initialize(); } in the dynamic form class ,there is a initialize() method which will clear all the properties. The initialize() is called only when the bean is

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-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

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

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

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

Re: Where dose JSP works in JSF request lifecycle?

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

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

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

Re: How dose JFS deal with multi-threads

2006-04-24 Thread wang_zeng
Thanks a lot. Your answer really eliminates some of my confusions about JSF. -- Wang Zeng

How dose JFS deal with multi-threads

2006-04-23 Thread wang_zeng
JSF provides us with a collection of standard UI components, and these components are integrated with JSP via JSF tag. when the JSP is executed, a tree of components will be constructed on the server. I wonder how many copies of this tree should be preserved on the server to remember the status

Re: How dose JFS deal with multi-threads

2006-04-23 Thread wang_zeng
Graig,thank you for your answer. Acorrding to your answer, JSF component tree should be created everytime a request arrives. Will it be a waste of time. Asp.net use hidden-type input html tag to record the status of the component tree. Dose JSF do it the same way?

Re: How dose JFS deal with multi-threads

2006-04-23 Thread wang_zeng
Thank you, Craig. If we preserve the tree on the server, then the tree sholud be saved in session scope. If we don't save the tree on server, then everytime a request arrives, the tree should be reconstructed using the value of the hidden field. Am I right?

Re: jsp:include or tile

2006-04-15 Thread wang_zeng
by using tiles, you can define components. A component has a layout and a few jsp. Actually, the layout itself is a jsp written with tiles tags. A component can be nested in another component, just like swing. jsp:include is so simple, and to archive the same goal as tiles, you should do a lot of

Re: [URGEN] Validation in Action and using redirection to view result page :(

2006-04-14 Thread wang_zeng
You worry too much! You can use forward. Even if the user refresh the page when the url dosen't corresponds to the current page, no big problem will occur. the IE will resend the data that is collected from the previous page to the server. The only thing will happen is the error-messages showing

Re: struts and javascript

2006-04-14 Thread wang_zeng
html:select name=Form1 property=typeselected onchange='showPopup(html:rewrite action=/PrepareSchedule.do/);' this is wrong. because as far as I know, a struts tag's atrribute sholud not be filled with mixed stuff by jsp codes and plain text. if you write this way: html:select name=Form1

Re: how to include a do url?

2006-04-10 Thread wang_zeng
OK. I have checked it out,so great. Sorry, I reply so late. cos the place where I live is opposite to the place where you live on this earth. When you get up,I am going to sleep. 2006/4/10, Michael Jouravlev [EMAIL PROTECTED]: You can check out how I use it. This is main website of my

Re: how to include a do url?

2006-04-09 Thread wang_zeng
That's great! Thank you,Michael,for using your time. This approach is kind of novel, I have nerver seen this kind of usage before. Actually,it's not my ideal, one of my coworker teachs me to do that. I am really moved. 2006/4/9, Michael Jouravlev [EMAIL PROTECTED]: I use it. Works well for me.

Re: Struts newbee

2006-04-09 Thread wang_zeng
hi,Ted Do you mean in your solution that one bean is not only action form bean,but also a business object? Because it extends ActinForm and implement business object interface. 2006/4/6, Ted Husted [EMAIL PROTECTED]: If the beans you want to nest are being passed to the business logic

how to include a do url?

2006-04-08 Thread wang_zeng
I am developing a web site, and my work is based on the prototype already made by people who are in charge of designing UI. All my work start from the point when I get these 11 beautifully designed but static pages, and my task is to make them dynamic and have real meaning. To achive this

Re: how to include a do url?

2006-04-08 Thread wang_zeng
hi: I think all of you have known what I mean well.I think the problem is caused by including an action which in the end will forward the request to another jsp page.That means you can't include a forward. Actually this problem is solved by the modified codes I have shown you. First,I include

Re: html:multibox is not sending the checked checkboxes value

2006-04-02 Thread wang_zeng
Thanks a lot.

Re: html:multibox is not sending the checked checkboxes value

2006-04-01 Thread wang_zeng
hi: i have a question. in a multibox,the property attribute should be pointed to an array in the form bean,and this array will be checked to see if there exists such a element who's value equals to the value set in the multibox. my question is how to set the value of multibox which will be used

java.lang.VerifyError: Cannot inherit from final class

2006-03-12 Thread wang_zeng
I am developing a small web application with tomcat,struts and hibernate. At first,I am working at home useing the Jcreator as IDE,and there were no problems. Then I want to work at my company using myeclipse as IDE. I carefully transplant the code,jars and xml files to the eclipse project. When I