Hi!
I think I have found the problem, I shouldnt use:

<input type="text" name="currentUser.login" size="10"

maxlength="40" value=''>

what i shoud use is:

<input type="text" name="login" size="10"
maxlength="40" value=''>

It seems to work... but �is it the best way of doing it?
�what if i have to expose as FormBeans 2 different beans of
different classes that have a property with the same name, and
I need to expose both of them in the same Action? how do I
distinguish beanOne.login from beanTwo.login if I have to put only <<name="login">>
�Any Ideas?
bye
Frank


Francisco Jose Peredo Noguez wrote:

Hi!
Is there a way to do this:
http://wiki.opensymphony.com/space/Populate+Form+Bean+and+access+its+value

With WebWork 1.4, using Velocity (*.vm) (people here do NOT like JSPs (*.jsp))

Or.. is it just impossible?

I have tried putting the path to the property in the name
Example:

Extracted from userAdmin.vm:

<input type="text" name="currentUser.login" size="10"
maxlength="40" value=''>


public class UserAdmin extends ActionSupport {
public UserAdmin(){
//This should add current User to Value Stack...why doesn't work? ActionContext.getValueStack().pushValue(getCurrentUser());
}


private User user;

public User getCurrentUser(){
if(user==null){
user = new User(); System.out.println("Creating User!!!");
}
System.out.println("Getting Created User!!!");
return user; }


protected String doExecute() throws Exception {
myBean = new TestBean(); BeanUtil.setProperties(ActionContext.getContext().getParameters(), getCurrentUser()); return SUCCESS; }
}
But it just DOES NOT Work, the CurrentUser NEVER gets the values from the form :'( what else do I have to do?
Thanx a lot!
Bye
Frank









-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to