You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by tj...@autozone.com on 2004/02/24 17:27:14 UTC

list navigation in struts

Hello..

I am in need of a struts Best Practice...   Here is a brief description of
the scenario:

1.  Display a list of items on a page in table format.  Default to show the
first 50 items.  This master list of items has 1000+ entries.  These
'items' are basically just columns from a relational table.
2.  Provide  '>>', '>', '<', '<<' buttons to allow navigation through the
list. Also provide a html text box to allow changing of the default 50
items in the list.
It would look something like this in HTML:
<input type="button" name="beginning" value="&lt;&lt;" />
<input type="button" name="prev" value="&lt;" />
<input type="text" name="numitems" size="3" maxlength="3" value="50" />
<input type="button" name="next" value="&gt;" />
<input type="button" name="end" value="&gt;&gt;" />
3.  This functionality will be used on many pages/actions throughout my web
application.

Questions...
Is it best to handle this logic in the Action classes?  How?
Should I add the functionality to a Base Action class?
Is DispatchAction useful here?
Is there a good example of this scenario available anywhere?
Is there a Best practice recommened for this scenario?


Thanks in advance for your help!


tj.herring@autozone.com
------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.



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


Re: list navigation in struts

Posted by Richard Yee <ry...@yahoo.com>.
TJ,
Take a look at the displaytag library 
(http://www.displaytag.org/index.jsp)

or
the Pager Tag library at
http://jsptags.com/tags/navigation/pager/index.jsp

If you search the archives, you will also find lots of
discussions about this topic too.

Regards,

Richard

--- tj.herring@autozone.com wrote:
> Hello..
> 
> I am in need of a struts Best Practice...   Here is
> a brief description of
> the scenario:
> 
> 1.  Display a list of items on a page in table
> format.  Default to show the
> first 50 items.  This master list of items has 1000+
> entries.  These
> 'items' are basically just columns from a relational
> table.
> 2.  Provide  '>>', '>', '<', '<<' buttons to allow
> navigation through the
> list. Also provide a html text box to allow changing
> of the default 50
> items in the list.
> It would look something like this in HTML:
> <input type="button" name="beginning"
> value="&lt;&lt;" />
> <input type="button" name="prev" value="&lt;" />
> <input type="text" name="numitems" size="3"
> maxlength="3" value="50" />
> <input type="button" name="next" value="&gt;" />
> <input type="button" name="end" value="&gt;&gt;" />
> 3.  This functionality will be used on many
> pages/actions throughout my web
> application.
> 
> Questions...
> Is it best to handle this logic in the Action
> classes?  How?
> Should I add the functionality to a Base Action
> class?
> Is DispatchAction useful here?
> Is there a good example of this scenario available
> anywhere?
> Is there a Best practice recommened for this
> scenario?
> 
> 
> Thanks in advance for your help!
> 
> 
> tj.herring@autozone.com


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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