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
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
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
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
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
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
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
Thank you Craig for making it clear.
--
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
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
Thanks a lot. Your answer really eliminates some of my confusions about
JSF.
--
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
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?
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?
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
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
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
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
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.
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
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
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
Thanks a lot.
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
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
25 matches
Mail list logo