You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kevin Duffey <kd...@buymedia.com> on 2000/08/23 05:19:46 UTC

JavaBean auto-population occurence..how often does it try to do this?

Hi,

One of our engineers has asked a question I can't answer. If I use a bean on
a JSP page that is Struts aware (impelements Action), and that page doesn't
have a form on it..but instead say a link to something.do, does Struts
attempt to autopopulate the bean on EVERY request to the something.do
action, even if the item clicked is a link? In action.xml you define a bean
session name and the class. How exactly is Struts handling the
auto-population? We would like it to happen only when we "update" or "add"
on a form. If the user hits CANCEL, we don't want the Struts framework to
try to auto-populate the bean with form elements again. Same thing if they
hit a link that is routed to a .do action..does it attempt to auto-populate
the bean..even if there isn't a form on the page, or if there is one but it
was not submitted? Is there a difference between get and post as well?

Thanks.