In your preceeding example code, it didn't work because you were calling
it a a locally created form, not the one that the JSP saw. If you call
it on the form Struts passes into your action, it should work fine.
L.
Thibaut wrote:
ok I understand
but why "form.set("partner_id",secteurDefault);
ok I understand
but why "form.set("partner_id",secteurDefault);" doesn't work ?
"
public ActionForward execute(..., ActionForm form,...)
{
...
form.set("partner_id",secteurDefault);
...
}
"
Where form is a DynaForm
Thank you
Laurie Harper a écrit :
Thibaut wrote:
Thank you for your quick r
Thibaut wrote:
Thank you for your quick reply.
I use dyna form. Therefore i have to create a new instance of the dynaform.
You should never have to do this manually. Struts will create the form
for you provided your action mapping specifies the form name via the
'name' attribute.
//get th
Thank you for your quick reply.
I use dyna form. Therefore i have to create a new instance of the dynaform.
//get the parameter I want to put by default
String secteurDefault = request.getParameter("secteur");
if(secteurDefault!=null)
{
if(form == null)
{
FormBeanConfig cfg =
mapping.get
Thibaut wrote the following on 1/19/2006 1:09 PM:
Hi,
I'd like to choose the default value of my html:select in the action
class. What is the parameter to set ?
Set the value of the form bean property in your Action before you go to
the form and that will be the default. Or, you could even s
Hi,
I'd like to choose the default value of my html:select in the action
class. What is the parameter to set ?
Action :
request.setAttribute("partnerslist",
getPartnerListFromDataBase(dataSource));
JSP:
labelProperty="label"/>
Thanks.
-
6 matches
Mail list logo