struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aftab Vhora <aftab.vh...@oracle.com>
Subject Re: R: Dynamically Generated html:Text
Date Mon, 18 Sep 2006 10:29:31 GMT
Hi Savino,

Thanks for the reply. Could u please provide me an example my test.jsp 
using indexed properties.

Thanks & Regards,
Aftab Vhora




Marcello Savino wrote:

>1) You have some kind of getter and setter for txt property not for txt1, txt2, ....txt3
property
>You'd better look for indexed properties
>
>-----Messaggio originale-----
>Da: Aftab Vhora [mailto:aftab.vhora@oracle.com] 
>Inviato: lunedì 18 settembre 2006 12.06
>A: Struts Users Mailing List
>Oggetto: Dynamically Generated html:Text
>
>Hi,
>
>I m dynamically generating the html:text , i have made correct entry in 
>the struts config.xml and also implemented the Action Form and Action 
>class.
>
>But I m getting below error, request you to kindly provide me the solution.
>
>===========ERROR============
>
>javax.servlet.jsp.JspException: No getter method for property txt1 of 
>bean org.apache.struts.taglib.html.BEAN
>at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968)
>at 
>org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:176)
>at _test._jspService(_test.java:63)
>[/test.jsp]
>.................
>
>=====action form=========
>public class myMapForm extends ActionForm
>{
>  private final Map values = new HashMap();
>
>      public void setTxt(String key, Object value) {
>          values.put(key, value);
>      }
>
>      public String getTxt(String key) {
>          return (String)values.get(key);
>      }
>
>}
>
>========JSP file(test.jsp)=============
>
><html>
>  <head>
>    <meta http-equiv="Content-Type" content="text/html; 
>charset=windows-1252"/>
>    <title>Google Client</title>
>  </head>
>  <body>
>  <html:form action="process">
>     <%
>     for(i=0;i<1;i++)
>     %>
>     <html:text property='<%="txt" + i %>' />
>  </html:form>
>    </body>
></html>
>
>
>  
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message