struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Tedone" <mted...@jemos.org>
Subject Re: logic:iterate and html:submit
Date Sun, 08 Jun 2003 23:00:09 GMT
Try:

<logic:iterate name="valueObject"property="addresses"id="address">
  <bean:define id="buttonName" name="address" property="hash" />
  <tr>
   <td>
   </td>
   <td>
     <html:submit property="editAddress" value='<%= buttonName %>'
title="Alterar"/>Alterar</html:submit>
   </td>
 </tr>
</logic:iterate>


----- Original Message ----- 
From: "Rodrigo di Lorenzo Lopes" <rlopes@linux.ime.usp.br>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Sunday, June 08, 2003 11:51 PM
Subject: Re: logic:iterate and html:submit


> Thanx for your attention...
>
>
>
> Still not compiling:
> Actually, the last message error is:
>
>
> [ServletException in:/common/partyCollection.jsp] Unable to compile class
for JSPNote: sun.tools.javac.Main has been deprecated.
>
>
> An error occurred at line: 18 in the jsp file: /common/partyCollection.jsp
>
> Generated servlet error:
>
C:\DOCUME~1\RODRIG~1\CONFIG~1\Temp\Jetty_0_0_0_0_8080__web-client\common\par
tyCollection$jsp.java:104: Method getHash() not found in class
java.lang.Object.
>                 _jspx_th_html_submit_0.setValue(address.getHash());
>                                                                ^
> 1 error, 1 warning
> '
> org.apache.jasper.JasperException: Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated.
>
>
> An error occurred at line: 18 in the jsp file: /common/partyCollection.jsp
>
> Generated servlet error:
>
C:\DOCUME~1\RODRIG~1\CONFIG~1\Temp\Jetty_0_0_0_0_8080__web-client\common\par
tyCollection$jsp.java:104: Method getHash() not found in class
java.lang.Object.
>                 _jspx_th_html_submit_0.setValue(address.getHash());
>                                                                ^
> 1 error, 1 warning
>
>
>
> The jsp is ...
> <%@ taglib uri="/WEB-INF/struts-bean.tld"prefix="bean"%>
> <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld"prefix="html"%>
> <%@ taglib uri="/WEB-INF/sslext.tld"prefix=├čslext"%>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld"prefix="tiles"%>
>
>     <tr>
> <td>
> Lista de Enderegos:
>       </td>
>       </tr>
>      <logic:iterate name="valueObject"property="addresses"id="address">
>       <tr>
> <td>
> </td>
> <td>
> <html:submit property="editAddress" value='<%=address.getHash()%>'
title="Alterar"/>Alterar</html:submit>
> </td>
>        </tr>
>       </logic:iterate>
>
>
> My real problem is... call an action with two parameters: "Action" and
"hash"
> where, hash must be value equal to property hash from bean address.
>
> ok ?
>
> Marco Tedone writes:
> > So if this is java code, you should use:
> >
> > <html:submit property='<%= buttonAddress(address.hash).name%>' >Edit
> > </html:submit>
> >
> > Am I wrong? In any case, if it's a name that you need, have you tried
> > <bean:message key="foo">?
> >
> > Hope it will help,
> >
> > Marco
> > ----- Original Message ----- 
> > From: "Rodrigo di Lorenzo Lopes" <rlopes@linux.ime.usp.br>
> > To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > Sent: Sunday, June 08, 2003 10:56 PM
> > Subject: Re: logic:iterate and html:submit
> >
> >
> > > Marco Tedone writes:
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Rodrigo di Lorenzo Lopes" <rlopes@linux.ime.usp.br>
> > > > To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > > > Sent: Sunday, June 08, 2003 10:34 PM
> > > > Subject: logic:iterate and html:submit
> > > >
> > > >
> > > > > Friendly developers,
> > > > >
> > > > > I am substituting html:link to html:submit, to populate the
actionForm
> > > > before to change the action.
> > > > > I would like use html:submit button to edit items of a collection.
> > > > > When I ws using html:link I had specified a property of this item
to
> > find
> > > > its.
> > > > > So... how could I substitute html:link to html:submit ???
> > > > >
> > > > >
> > > > > I was using ...
> > > > >   <sslext:link
> > > > >            page="/addresses/main.do"
> > > > >            paramId="hash"
> > > > >            paramName="address"
> > > > >            paramProperty="hash">
> > > > >           <bean:write name="address"property="streetAddress"/>
> > > > > </sslext:link>
> > > > >
> > > > > And I am trying using ...
> > > > >       <html:submit
property="buttonAddress(address.hash).name">Edit
> > > > >       </html:submit>
> > > > > but it doesnt work
> > > >
> > > >     What does 'buttonAddress(address.hash).name ' represent? It
seems to
> > me
> > > > that this kind of code couldn't be used neither for a javascript nor
for
> > a
> > > > java code.
> > > >
> > > > Marco
> > > > >
> > >
> > > ok .. I specified getButtonAddress(String hash) that returns an
ButtonBean
> > > ButtonBean has a method getName... But, if you have other suggestion,
I
> > will be very happy.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
> -- 
> Rodrigo di Lorenzo Lopes (Mineirinho) - ICQ 52982003
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>




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


Mime
View raw message