You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Prashant Samant <Pr...@mphasis.com> on 2003/07/25 08:13:22 UTC
Hello group,
I have a problem in using logic:iterate.
I have a following class
public class DataWrapper implements Serializable {
private int iID;
private String strDescription;
public int getID() {
return iID;
} // DataWrapper : getID
public void setiID(int iID) {
this.iID = iID;
} // DataWrapper : setiID
public String getDescription() {
return strDescription;
} // DataWrapper : getDescription
public void setDescription(String strDescription) {
this.strDescription = strDescription;
} // DataWrapper : setDescription
} // DataWrapper
In my ActionForm i am creating 5 objects of the above class and settting the values for iID
and strDescription.
After this i am putting this objects in a vector and this vector i am putting inside request
object(saying request.setAttribute("vect",vector) ).
The ActionForm than calls a jsp page in which i want to populate a drop-down box
with the values of iId variable of the above bean.
I am trying to do something like this
<logic:iterate id="myObj" name="vect" type="DataWrapper">
<html:option value="1"><bean:write name="myObj" property="iId"/></html:option>
</logic:iterate>
if i execute the above code than i get the following error
No getter method for property iId of bean myObj
Pls Help .
Prashant S
MphasiS India
IInd Floor, Leela Business Park,
Opp. 'The Leela'
Andheri Kurla Road,
Andheri (E), Mumbai.
INDIA.
www.mphasis.com <http://www.mphasis.com>
Architecting Value
SEI Level 5 ISO 9001
Information transmitted by this e-mail is proprietary to MphasiS and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailmaster@mphasis.com <ma...@mphasis.com> and delete this mail from your records.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re:
Posted by Vinit Sharma <ma...@yahoo.com>.
Watch out your method
public int getID()
It should be public int getiID() instead. This should work.
Regards
Prashant Samant <Pr...@mphasis.com> wrote:
Hello group,
I have a problem in using logic:iterate.
I have a following class
public class DataWrapper implements Serializable {
private int iID;
private String strDescription;
public int getID() {
return iID;
} // DataWrapper : getID
public void setiID(int iID) {
this.iID = iID;
} // DataWrapper : setiID
public String getDescription() {
return strDescription;
} // DataWrapper : getDescription
public void setDescription(String strDescription) {
this.strDescription = strDescription;
} // DataWrapper : setDescription
} // DataWrapper
In my ActionForm i am creating 5 objects of the above class and settting the values for iID
and strDescription.
After this i am putting this objects in a vector and this vector i am putting inside request
object(saying request.setAttribute("vect",vector) ).
The ActionForm than calls a jsp page in which i want to populate a drop-down box
with the values of iId variable of the above bean.
I am trying to do something like this
if i execute the above code than i get the following error
No getter method for property iId of bean myObj
Pls Help .
Prashant S
MphasiS India
IInd Floor, Leela Business Park,
Opp. 'The Leela'
Andheri Kurla Road,
Andheri (E), Mumbai.
INDIA.
www.mphasis.com
Architecting Value
SEI Level 5 ISO 9001
Information transmitted by this e-mail is proprietary to MphasiS and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailmaster@mphasis.com and delete this mail from your records.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software