Re: Fwd: Re: Fwd: Re: Re: RE: how to represent nested bean properties in a jsp form

2005-09-10 Thread Laurie Harper

temp temp wrote:

I  solved the problem by creating an instance of
AddressVO in the formbean.

Here  is my code  after modifications.


  public class ServiceSelectionForm extends ActionForm
{

private AddressVO  addressVO  = new  AddressVO();   
public AddressVO getAddressVO() {
return addressVO;
}
public void setAddressVO(AddressVO addressVO) {
this.addressVO = addressVO;
}   
  } 
I am wondering is this the right approach or is there 
a better way to deal with   nestedbean in a  formbean 
or how to create  an instance of   nestedbean in a

formbean.

Note: forwarded message attached.


The normal way to setup your form beans is to have an action that is 
called before the page which displays the form -- in other words, your 
HTTP request is mapped to a Struts action; the action creates and 
populates the form bean, then forwards to the JSP to display it.


If you only ever need to have an empty AddressVO instance (i.e. you 
don't need to pre-load / pre-populate data in that AddressVO object) 
then what you've done is fine, though note that you should probably also 
have a reset() method that re-initialises the addressVO member field so 
you don't get unexpected results if a form bean instance is reused.


See the Struts User Guide [1] for more information, particularly 
sections on building form beans [2] and using them [3].


L.

[1] http://struts.apache.org/userGuide/index.html
[2] http://struts.apache.org/userGuide/building_model.html#actionform
[3] http://struts.apache.org/userGuide/building_view.html#form_beans


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



Fwd: Re: Fwd: Re: Re: RE: how to represent nested bean properties in a jsp form

2005-09-09 Thread temp temp

I  solved the problem by creating an instance of
AddressVO in the formbean.

Here  is my code  after modifications.


  public class ServiceSelectionForm extends ActionForm
{

private AddressVO  addressVO  = new  AddressVO();   
public AddressVO getAddressVO() {
return addressVO;
}
public void setAddressVO(AddressVO addressVO) {
this.addressVO = addressVO;
}   
  } 
I am wondering is this the right approach or is there 
a better way to deal with   nestedbean in a  formbean 
or how to create  an instance of   nestedbean in a
formbean.

Note: forwarded message attached.





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/--- Begin Message ---
That suggests that one of the classes or getter methods isn't declared 
public (the sample source you posted does that, so that's probably not 
it) or that addressVO is null in the form bean. How do you populate the 
form bean? What happens if you call getAddressVO().getState() on the 
form bean directly?


L.

temp temp wrote:
I get the following error 



[Invalid argument looking up property addressVO.state
of bean serviceSelectionForm]:
javax.servlet.jsp.JspException: Invalid argument
looking up property addressVO.state of bean
serviceSelectionForm
at
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1036)



Note: forwarded message attached.
thanks & regards

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





Subject:
Re: Re: RE: how to represent nested bean properties in a jsp form
From:
Michael Jouravlev <[EMAIL PROTECTED]>
Date:
Thu, 8 Sep 2005 12:05:36 -0700
To:
Struts Users Mailing List 

To:
Struts Users Mailing List 


So, what happens if you use 



Put a debug statement in the setter just in case, is it called?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:



here is my struts config










Note: forwarded message attached.
thanks & regards





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/


-- Forwarded message --
From: Michael Jouravlev <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Date: Thu, 8 Sep 2005 11:50:06 -0700
Subject: Re: RE: how to represent nested bean properties in a jsp form
What, it does not work? How about setting form name explicitly:



You have defined the formbean in the struts config, have you?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:


 This is my jsp
 
  
  
 

  I want  input textfield  from  jsp to represent porperty  state  of
AddressVO.

  I mean when the form is submitted  I want property state from AddressVO
to get populated with the value of the textfiled.How can I acheive this.


-
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]



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


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

Re: Fwd: Re: Re: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread Laurie Harper
That suggests that one of the classes or getter methods isn't declared 
public (the sample source you posted does that, so that's probably not 
it) or that addressVO is null in the form bean. How do you populate the 
form bean? What happens if you call getAddressVO().getState() on the 
form bean directly?


L.

temp temp wrote:
I get the following error 



[Invalid argument looking up property addressVO.state
of bean serviceSelectionForm]:
javax.servlet.jsp.JspException: Invalid argument
looking up property addressVO.state of bean
serviceSelectionForm
at
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1036)



Note: forwarded message attached.
thanks & regards

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





Subject:
Re: Re: RE: how to represent nested bean properties in a jsp form
From:
Michael Jouravlev <[EMAIL PROTECTED]>
Date:
Thu, 8 Sep 2005 12:05:36 -0700
To:
Struts Users Mailing List 

To:
Struts Users Mailing List 


So, what happens if you use 



Put a debug statement in the setter just in case, is it called?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:



here is my struts config










Note: forwarded message attached.
thanks & regards





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/


-- Forwarded message --
From: Michael Jouravlev <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Date: Thu, 8 Sep 2005 11:50:06 -0700
Subject: Re: RE: how to represent nested bean properties in a jsp form
What, it does not work? How about setting form name explicitly:



You have defined the formbean in the struts config, have you?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:


 This is my jsp
 
  
  
 

  I want  input textfield  from  jsp to represent porperty  state  of
AddressVO.

  I mean when the form is submitted  I want property state from AddressVO
to get populated with the value of the textfiled.How can I acheive this.


-
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]



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



Fwd: Re: Re: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread temp temp

I get the following error 


[Invalid argument looking up property addressVO.state
of bean serviceSelectionForm]:
javax.servlet.jsp.JspException: Invalid argument
looking up property addressVO.state of bean
serviceSelectionForm
at
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1036)



Note: forwarded message attached.
thanks & regards

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com --- Begin Message ---
So, what happens if you use 


Put a debug statement in the setter just in case, is it called?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:
> 
> 
> here is my struts config
> 
>  type="com.bankerssystems.pac.onlinetrans.service.forms.ServiceSelectionForm">
> 
> 
> 
>  name="serviceSelectionForm"
> type="com.bankerssystems.pac.onlinetrans.service.actions.ServiceSelectionAction"
> input="/jsp/onlinetrans/serviceSelection.jsp"
> scope="request">
>  path="/jsp/onlinetrans/test.jsp" />
> 
> 
> 
> Note: forwarded message attached.
> thanks & regards
> 
> 
> 
> 
> 
> __
> Click here to donate to the Hurricane Katrina relief effort.
> http://store.yahoo.com/redcross-donate3/
> 
> 
> ---------- Forwarded message ------
> From: Michael Jouravlev <[EMAIL PROTECTED]>
> To: Struts Users Mailing List 
> Date: Thu, 8 Sep 2005 11:50:06 -0700
> Subject: Re: RE: how to represent nested bean properties in a jsp form
> What, it does not work? How about setting form name explicitly:
> 
> 
> 
> You have defined the formbean in the struts config, have you?
> 
> Michael.
> 
> On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:
> >   This is my jsp
> >   
> >
> >
> >   
> >
> >I want  input textfield  from  jsp to represent porperty  state  of
> > AddressVO.
> >
> >I mean when the form is submitted  I want property state from AddressVO
> > to get populated with the value of the textfiled.How can I acheive this.
> 
> -
> 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]


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

Re: Re: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread Michael Jouravlev
So, what happens if you use 


Put a debug statement in the setter just in case, is it called?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:
> 
> 
> here is my struts config
> 
>  type="com.bankerssystems.pac.onlinetrans.service.forms.ServiceSelectionForm">
> 
> 
> 
>  name="serviceSelectionForm"
> type="com.bankerssystems.pac.onlinetrans.service.actions.ServiceSelectionAction"
> input="/jsp/onlinetrans/serviceSelection.jsp"
> scope="request">
>  path="/jsp/onlinetrans/test.jsp" />
> 
> 
> 
> Note: forwarded message attached.
> thanks & regards
> 
> 
> 
> 
> 
> __
> Click here to donate to the Hurricane Katrina relief effort.
> http://store.yahoo.com/redcross-donate3/
> 
> 
> ---------- Forwarded message --
> From: Michael Jouravlev <[EMAIL PROTECTED]>
> To: Struts Users Mailing List 
> Date: Thu, 8 Sep 2005 11:50:06 -0700
> Subject: Re: RE: how to represent nested bean properties in a jsp form
> What, it does not work? How about setting form name explicitly:
> 
> 
> 
> You have defined the formbean in the struts config, have you?
> 
> Michael.
> 
> On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:
> >   This is my jsp
> >   
> >
> >
> >   
> >
> >I want  input textfield  from  jsp to represent porperty  state  of
> > AddressVO.
> >
> >I mean when the form is submitted  I want property state from AddressVO
> > to get populated with the value of the textfiled.How can I acheive this.
> 
> -
> 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]



Fwd: Re: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread temp temp


here is my struts config  






 



Note: forwarded message attached.
thanks & regards





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/--- Begin Message ---
What, it does not work? How about setting form name explicitly:



You have defined the formbean in the struts config, have you?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:
>   This is my jsp
>   
>
>
>   
>   
>I want  input textfield  from  jsp to represent porperty  state  of
> AddressVO.
> 
>I mean when the form is submitted  I want property state from AddressVO
> to get populated with the value of the textfiled.How can I acheive this.

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


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

Re: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread Michael Jouravlev
What, it does not work? How about setting form name explicitly:



You have defined the formbean in the struts config, have you?

Michael.

On 9/8/05, temp temp <[EMAIL PROTECTED]> wrote:
>   This is my jsp
>   
>
>
>   
>   
>I want  input textfield  from  jsp to represent porperty  state  of
> AddressVO.
> 
>I mean when the form is submitted  I want property state from AddressVO
> to get populated with the value of the textfiled.How can I acheive this.

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



RE: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread temp temp
I am intrested only in nested elements how can I
represent them in jsp .


As I said I have a property called state in 
AddressVO.  AddressVO is a bean in my formbean. So
AddressVO is a nestedbean. My question is how can I
represent the nestedbean property (state) in my jsp.
thanks®ards


--- Greg Pelly <[EMAIL PROTECTED]> wrote:

> Temp temp,
> 
> I'll need some more information from you before I
> can be much help.
> 
> Is the Form class (ServiceSelectionForm) being
> invoked properly?
> Are non-nested elements being populated correctly?
> Are you getting any errors?
> 
> -Greg
> 
> -Original Message-
> From: temp temp [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 08, 2005 10:54 AM
> To: user@struts.apache.org
> Subject: Fwd: RE: how to represent nested bean
> properties in a jsp form
> 
> 
> No I have no problem with property NEWSEARCH . I
> want to know how can my
> jsp represent nested property state (property from
> AddressVO ) ?
> thanks & regards
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: RE: how to represent nested bean properties in a jsp form

2005-09-08 Thread Greg Pelly
Temp temp,

I'll need some more information from you before I can be much help.

Is the Form class (ServiceSelectionForm) being invoked properly?
Are non-nested elements being populated correctly?
Are you getting any errors?

-Greg

-Original Message-
From: temp temp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 08, 2005 10:54 AM
To: user@struts.apache.org
Subject: Fwd: RE: how to represent nested bean properties in a jsp form


No I have no problem with property NEWSEARCH . I want to know how can my
jsp represent nested property state (property from AddressVO ) ?
thanks & regards


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

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