I found it. Never mind.
And thank you a lot for your help.


[EMAIL PROTECTED] wrote:
Hartrich, James CTR USTRANSCOM J6 wrote:
So you are going from the jsp to the action, correct?
That being the case, you are doing this correctly so far. Make certain
to have an encapsulated property for accountBean in your accountManager
action. On submit the accountBean object will be constructed and
setFirstName will be called. The bean will be set on your accountManager
action.
that's exactly what I am doing. But it's not populating the field. The field still shows null.
Here's a code from my AccountManager:


public class AccountManager   extends ActionSupport{

   private Account account ;
   private AccountBean accountBean ;
     public String execute()
   {
       // TODO - read the coments
//if there's account number then retrieve the correspondiing account and dislay //if there's field for the accout then create the account and dislay
       //if none then forward to the new account page
       return "SUCCESS" ;  //temporarily
   }

   public AccountBean getAccountBean() {
       return accountBean;
   }

   public void setAccountBean(AccountBean accountBean) {
       this.accountBean = accountBean;
   }
  }


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 06, 2007 11:32 AM
To: Struts Users Mailing List
Subject: populating a bean

how do I populate a bean values from a jsp page ?

here's what I need to do:


<s:form action="accountManager"  method="post" >
<s:textfield name="accountBean.firstName" label="First Name" />
<s:submit> </s:submit>
</s:form>


this page http://struts.apache.org/2.0.6/docs/how-do-i-populate-a-form-bean-and-ge
t-the-value-using-the-taglib.html
how to read the values from the bean but not how to populate them. Or may be I am not getting it...






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to