Laurie Harper a écrit :
Sure.
DynaActionForm dForm = (DynaActionForm) form;
dForm.set( name, person.getName() );
You can also use BeanUtils to copy properties from the Person to the
Form bean:
BeanUtils.copyProperties( dForm, person );
Il get this error:
javax.servlet.ServletException:
Laurie Harper a écrit :
Emmanuel.Leguy wrote:
Hello,
I use the following code in a jsp:
logic:present name=person
html:text property=name value='%= person.getName() %'/
/logic:present
If 'person' is not present %= person.getName() % is compiled and I
get this error: membreLIFL
From: Emmanuel.Leguy [EMAIL PROTECTED]
Laurie Harper a écrit :
Did you try this?
logic:present name=person
html:text name=person property=name/
/logic:present
No. I didn't try this. That works but if an error ocure (validate), the
form is displayed with the person.name value
Wendy Smoak a écrit :
From: Emmanuel.Leguy [EMAIL PROTECTED]
Laurie Harper a écrit :
Did you try this?
logic:present name=person
html:text name=person property=name/
/logic:present
No. I didn't try this. That works but if an error ocure (validate),
the form is displayed
From: Emmanuel.Leguy [EMAIL PROTECTED]
Wendy wrote:
In Action code, before forwarding to the JSP, look up the Person object
and pre-populate the form bean's 'name' property.
Is it possible with a dynaActionForm?
Sure.
DynaActionForm dForm = (DynaActionForm) form;
dForm.set( name,
Wendy Smoak a écrit :
From: Emmanuel.Leguy [EMAIL PROTECTED]
Wendy wrote:
In Action code, before forwarding to the JSP, look up the Person
object and pre-populate the form bean's 'name' property.
Is it possible with a dynaActionForm?
Sure.
DynaActionForm dForm = (DynaActionForm) form;
Emmanuel.Leguy wrote:
[nothing]
Why do I not see anything for Emmanuel's emails? I'm running Thunderbird
on XP SP2.
Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Emmanuel.Leguy wrote:
Wendy Smoak a écrit :
From: Emmanuel.Leguy [EMAIL PROTECTED]
Wendy wrote:
In Action code, before forwarding to the JSP, look up the Person
object and pre-populate the form bean's 'name' property.
Is it possible with a dynaActionForm?
Sure.
DynaActionForm dForm
It doesn't work because person is not declared in Java. Maybe person is
in session scope (or request scope).
It's not a good solution using scriptlets but if you want, you have to put
something like this:
html:text property=name values='%=((Person) request.getSession
If Person object is null, he will get the same NPE. Nice thing about
JSTL is that:
* JSTL looks in different contexts;
* JSTL does not throw NPE if accessed object was null
Michael.
On 10/15/05, Aldo Vadillo Batista [EMAIL PROTECTED] wrote:
It doesn't work because person is not declared in
Try using the -el taglib:
%@ taglib uri=/tags/struts-html-el prefix=html-el %
...
html-el:text property=name value=${person.name} /
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Emmanuel.Leguy wrote:
Hello,
I use the following code in a jsp:
logic:present name=person
html:text property=name value='%= person.getName() %'/
/logic:present
If 'person' is not present %= person.getName() % is compiled and I get
this error: membreLIFL cannot be resolved
If i use
12 matches
Mail list logo