You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Henry Park <He...@isd.lacounty.gov> on 2007/09/25 20:05:34 UTC

select list help

How can I modify the following select list to display '1 of 10, 2 of 10,
etc' instead of just the page numbers?

<s:select label="Page" 
          name="page" 
          list="pageList" 
          required="false" 
value="%{page.toString()}" />

The list is populated with an Integer array list.

List<Integer> pageList new ArrayList<Integer>();

Thanks in advance,

Henry

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


Re: select list help

Posted by Dave Newton <ne...@yahoo.com>.
--- Henry Park <He...@isd.lacounty.gov> wrote:
> How can I modify the following select list to
> display '1 of 10, 2 of 10, etc' instead of just the 
> page numbers?

Change the list you pass to it.

Or use OGNL to project across a list and create a new
list with the number plus the additional info[1] if
you're feeling sassy.

d.

[1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/projection.html

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