You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Neil Meyer <ne...@cxchange.co.za> on 2005/04/11 09:21:19 UTC

Struts FormBean

Hi All,

 

I have a problem trying to write back to my form bean. Please tell me if the
following is possible.

 

I have the following formbean : 

 

    private UserObject UserObject;

    private ArrayList userDetails;

    private String mustDisplayButton1;

    private String mustDisplayButton2;

    private List usersid;

    private String otherUserId;

    private String subView;

 

 

The Object UserObject:

Is something like the following:

    private String description; 

    private String controllerFirstname;

    private String controllerSurname;

    private String ownerBranchName;

    private String ownerBranchShortName;

    private String ownerCompanyShortName;

    private String ownerCompanyName;

 

With the getter and setter methods.

 

On my JSP page I extract values out of the UserObject parameters.

 

How do I set a property within my JSP page to the  UserObject.

 

Regards

Neil Meyer

Project Manager

 

 


Re: Struts FormBean

Posted by Hubert Rabago <hr...@gmail.com>.
It sounds like what you're trying to do can be done, but it would be
better if you clarify what you mean by setting a property within your
jsp to the userobject.  Are you trying to populate a page variable in
the jsp, or are you trying to populate the userobject when the form in
the jsp is submitted?

Hubert

On Apr 11, 2005 2:21 AM, Neil Meyer <ne...@cxchange.co.za> wrote:
> Hi All,
> 
> I have a problem trying to write back to my form bean. Please tell me if the
> following is possible.
> 
> I have the following formbean :
> 
>     private UserObject UserObject;
> 
>     private ArrayList userDetails;
> 
>     private String mustDisplayButton1;
> 
>     private String mustDisplayButton2;
> 
>     private List usersid;
> 
>     private String otherUserId;
> 
>     private String subView;
> 
> The Object UserObject:
> 
> Is something like the following:
> 
>     private String description;
> 
>     private String controllerFirstname;
> 
>     private String controllerSurname;
> 
>     private String ownerBranchName;
> 
>     private String ownerBranchShortName;
> 
>     private String ownerCompanyShortName;
> 
>     private String ownerCompanyName;
> 
> With the getter and setter methods.
> 
> On my JSP page I extract values out of the UserObject parameters.
> 
> How do I set a property within my JSP page to the  UserObject.
> 
> Regards
> 
> Neil Meyer
> 
> Project Manager
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts FormBean

Posted by Christine Huang <ch...@gmail.com>.
If you want to set the description property of userObject: 

property="userObject.description" 

On Apr 11, 2005 2:21 AM, Neil Meyer <ne...@cxchange.co.za> wrote:
> Hi All,
> 
> I have a problem trying to write back to my form bean. Please tell me if the
> following is possible.
> 
> I have the following formbean :
> 
>     private UserObject UserObject;
> 
>     private ArrayList userDetails;
> 
>     private String mustDisplayButton1;
> 
>     private String mustDisplayButton2;
> 
>     private List usersid;
> 
>     private String otherUserId;
> 
>     private String subView;
> 
> The Object UserObject:
> 
> Is something like the following:
> 
>     private String description;
> 
>     private String controllerFirstname;
> 
>     private String controllerSurname;
> 
>     private String ownerBranchName;
> 
>     private String ownerBranchShortName;
> 
>     private String ownerCompanyShortName;
> 
>     private String ownerCompanyName;
> 
> With the getter and setter methods.
> 
> On my JSP page I extract values out of the UserObject parameters.
> 
> How do I set a property within my JSP page to the  UserObject.
> 
> Regards
> 
> Neil Meyer
> 
> Project Manager
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org