struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: request.getParameterValues OGNL ?
Date Wed, 04 Apr 2007 22:55:33 GMT
--- Will Berger <will@premierobjects.com> wrote:
> When processing a post from a form that has check 
> boxes, being able to specifiy which boxes were 
> checked for a confirmation page is a common 
> occurence.  What I am trying to do.  I could create 
> an action class to return an iterator. A lot of work

> for something so simple.

Type conversion does this for you; all you need to do
is provide get/sets on something List-y.

I seriously think you're making an end-run around some
useful stuff that would make this easier.

http://localhost:8080/s2samples/ognl/reqParams1.action?foo=hi&email[0]=T&email[1]=F
    
<ul>
  <s:iterator value="#parameters" id="p">
    <s:if test="%{#p.key.startsWith('email')}">
      <li><s:property value="#p.value"/></li>
    </s:if>
  </s:iterator>
</ul>

will display

* T
* F

d.



 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

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


Mime
View raw message