struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Kiley <jhki...@summa-tech.com>
Subject Re: I need to set <s:property> value in the action class
Date Mon, 25 May 2009 14:39:59 GMT
As a side note to Dave's point, opening a unique database connection within
every execute() method of every action class is an extraordinary waste of
your time, and will make debugging pretty painful.  You'd be much better off
writing a single service object to handle that stuff for you, and call the
service object from your action classes.

On Sun, May 24, 2009 at 9:53 AM, Dave Newton <newton.dave@yahoo.com> wrote:

> Prashant Singh wrote:
>
>>     <s:iterator value="products" >          <tr><td><a
>> href="astralpharma/showpdtsupp.action">              <s:property
>> value="productName"/></a></td></tr>
>>      </s:iterator>
>>
>
> There are a few ways to do it; here's two.
>
> <s:iterator value="products" >
>  <a href="astralpharma/showpdtsupp.action?productId=<s:property
> value='productId'/>">
>    <s:property value="productName"/>
>  </a>
>
>  <s:url var="pidUrl" action="showpdtsupp" namespace="/astralpharma">
>    <s:param name="productId" value="productId"/>
>  </s:url>
>  <a href='<s:property value="pidUrl"/>'>
>    <s:property value="productName"/>
>  </a>
> </s:iterator>
>
> All of these topics are covered in the Struts 2 documentation, which I'd
> recommend reading before getting too much further into your project. There
> are at least a couple more variations, but this should be enough to get you
> started.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com

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