You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jvsrvcs <jv...@gmail.com> on 2009/12/09 16:44:28 UTC

How to display a table (data grid) using Struts2 - Is there a tag?

We need to pull a large amount of data from a database and display in a
table.

We would like, on click of a hyperlink for a submission to happen to go to
the server to fetch the next set of data that has been either cached or
to query the db.

I am sure someone has done this before as it is quite a common use case.

We need the following features:
	- an html table with grid (a jsp tag if there is one)
	- headers (html, different color backround) - nothing new here
	- clickable headers that will sort the list ascending, descending
	- pagination
		- 1, 2    <= Each number is a hyperlink
		- Next 10 of <total>   <= is a hyperlink
		- Last    <= is also a hyperlink
		
	Is there a way to do this using some built-in struts2 feature or tag?
	
	If not, is there another plugin to struts2 that can provide this?
----
-- 
View this message in context: http://old.nabble.com/How-to-display-a-table-%28data-grid%29-using-Struts2---Is-there-a-tag--tp26712342p26712342.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: How to display a table (data grid) using Struts2 - Is there a tag?

Posted by Chris Pratt <th...@gmail.com>.
We use DisplayTag, http://www.displaytag.org/
  (*Chris*)

On Wed, Dec 9, 2009 at 7:44 AM, jvsrvcs <jv...@gmail.com> wrote:

>
> We need to pull a large amount of data from a database and display in a
> table.
>
> We would like, on click of a hyperlink for a submission to happen to go to
> the server to fetch the next set of data that has been either cached or
> to query the db.
>
> I am sure someone has done this before as it is quite a common use case.
>
> We need the following features:
>        - an html table with grid (a jsp tag if there is one)
>        - headers (html, different color backround) - nothing new here
>        - clickable headers that will sort the list ascending, descending
>        - pagination
>                - 1, 2    <= Each number is a hyperlink
>                - Next 10 of <total>   <= is a hyperlink
>                - Last    <= is also a hyperlink
>
>        Is there a way to do this using some built-in struts2 feature or
> tag?
>
>        If not, is there another plugin to struts2 that can provide this?
> ----
> --
> View this message in context:
> http://old.nabble.com/How-to-display-a-table-%28data-grid%29-using-Struts2---Is-there-a-tag--tp26712342p26712342.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How to display a table (data grid) using Struts2 - Is there a tag?

Posted by Chris Pratt <th...@gmail.com>.
We use jQuery to add that functionality.
  (*Chris*)

On Thu, Dec 10, 2009 at 8:04 AM, jvsrvcs <jv...@gmail.com> wrote:

>
> Thanks for the link.  I have some simple demos working.  Now we need
> onClick,
> onHover etc on some items in the row.  I tried a few things but nothing
> works.
>
> Is it possible to take a column and make the  data there links that also
> have onLoad, onClick, onHover depending on our needs for that column?
>
> onHover for example would popup a small message window with a help snippet,
> and go away when the mouse leaves a certain area.
>
> onClick I want a javascript window to popup with some info - if this can be
> done, can some samples from working code for the displaytag be posted?
>
>
> thanks
>
> jv
>
>
>
> jvsrvcs wrote:
> >
> > We need to pull a large amount of data from a database and display in a
> > table.
> >
> > We would like, on click of a hyperlink for a submission to happen to go
> to
> > the server to fetch the next set of data that has been either cached or
> > to query the db.
> >
> > I am sure someone has done this before as it is quite a common use case.
> >
> > We need the following features:
> >       - an html table with grid (a jsp tag if there is one)
> >       - headers (html, different color backround) - nothing new here
> >       - clickable headers that will sort the list ascending, descending
> >       - pagination
> >               - 1, 2    <= Each number is a hyperlink
> >               - Next 10 of <total>   <= is a hyperlink
> >               - Last    <= is also a hyperlink
> >
> >       Is there a way to do this using some built-in struts2 feature or
> tag?
> >
> >       If not, is there another plugin to struts2 that can provide this?
> > ----
> >
>
> --
> View this message in context:
> http://old.nabble.com/How-to-display-a-table-%28data-grid%29-using-Struts2---Is-there-a-tag--tp26712342p26729893.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How to display a table (data grid) using Struts2 - Is there a tag?

Posted by jvsrvcs <jv...@gmail.com>.
Thanks for the link.  I have some simple demos working.  Now we need onClick,
onHover etc on some items in the row.  I tried a few things but nothing
works.

Is it possible to take a column and make the  data there links that also
have onLoad, onClick, onHover depending on our needs for that column?

onHover for example would popup a small message window with a help snippet,
and go away when the mouse leaves a certain area.

onClick I want a javascript window to popup with some info - if this can be
done, can some samples from working code for the displaytag be posted?


thanks

jv



jvsrvcs wrote:
> 
> We need to pull a large amount of data from a database and display in a
> table.
> 
> We would like, on click of a hyperlink for a submission to happen to go to
> the server to fetch the next set of data that has been either cached or
> to query the db.
> 
> I am sure someone has done this before as it is quite a common use case.
> 
> We need the following features:
> 	- an html table with grid (a jsp tag if there is one)
> 	- headers (html, different color backround) - nothing new here
> 	- clickable headers that will sort the list ascending, descending
> 	- pagination
> 		- 1, 2    <= Each number is a hyperlink
> 		- Next 10 of <total>   <= is a hyperlink
> 		- Last    <= is also a hyperlink
> 		
> 	Is there a way to do this using some built-in struts2 feature or tag?
> 	
> 	If not, is there another plugin to struts2 that can provide this?
> ----
> 

-- 
View this message in context: http://old.nabble.com/How-to-display-a-table-%28data-grid%29-using-Struts2---Is-there-a-tag--tp26712342p26729893.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: How to display a table (data grid) using Struts2 - Is there a tag?

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Nice work! I also have integrated jqGrid into a struts taglib

http://code.google.com/p/antilia-struts

but have followed a different approach. Configuration is done at the server
side...

http://code.google.com/p/antilia-struts/wiki/SearchPage

Best,

Ernesto

On Thu, Dec 10, 2009 at 6:51 PM, Johannes Geppert <jo...@web.de> wrote:

>
> Since today the struts2 jQuery Plugin brings a grid tag based on jQuery
> Grid
> Plugin to you.
>
> http://code.google.com/p/struts2-jquery/wiki/GridTag
>
> You can find various samples in the Showcase
> http://www.weinfreund.de/struts2-jquery-showcase/
>
> Best Regards
>
> Johannes Geppert
>
>
> jvsrvcs wrote:
> >
> > We need to pull a large amount of data from a database and display in a
> > table.
> >
> > We would like, on click of a hyperlink for a submission to happen to go
> to
> > the server to fetch the next set of data that has been either cached or
> > to query the db.
> >
> > I am sure someone has done this before as it is quite a common use case.
> >
> > We need the following features:
> >       - an html table with grid (a jsp tag if there is one)
> >       - headers (html, different color backround) - nothing new here
> >       - clickable headers that will sort the list ascending, descending
> >       - pagination
> >               - 1, 2    <= Each number is a hyperlink
> >               - Next 10 of <total>   <= is a hyperlink
> >               - Last    <= is also a hyperlink
> >
> >       Is there a way to do this using some built-in struts2 feature or
> tag?
> >
> >       If not, is there another plugin to struts2 that can provide this?
> > ----
> >
>
>
> -----
> ---
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
>
> --
> View this message in context:
> http://old.nabble.com/How-to-display-a-table-%28data-grid%29-using-Struts2---Is-there-a-tag--tp26712342p26731706.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How to display a table (data grid) using Struts2 - Is there a tag?

Posted by Johannes Geppert <jo...@web.de>.
Since today the struts2 jQuery Plugin brings a grid tag based on jQuery Grid
Plugin to you.

http://code.google.com/p/struts2-jquery/wiki/GridTag

You can find various samples in the Showcase
http://www.weinfreund.de/struts2-jquery-showcase/

Best Regards

Johannes Geppert


jvsrvcs wrote:
> 
> We need to pull a large amount of data from a database and display in a
> table.
> 
> We would like, on click of a hyperlink for a submission to happen to go to
> the server to fetch the next set of data that has been either cached or
> to query the db.
> 
> I am sure someone has done this before as it is quite a common use case.
> 
> We need the following features:
> 	- an html table with grid (a jsp tag if there is one)
> 	- headers (html, different color backround) - nothing new here
> 	- clickable headers that will sort the list ascending, descending
> 	- pagination
> 		- 1, 2    <= Each number is a hyperlink
> 		- Next 10 of <total>   <= is a hyperlink
> 		- Last    <= is also a hyperlink
> 		
> 	Is there a way to do this using some built-in struts2 feature or tag?
> 	
> 	If not, is there another plugin to struts2 that can provide this?
> ----
> 


-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep

-- 
View this message in context: http://old.nabble.com/How-to-display-a-table-%28data-grid%29-using-Struts2---Is-there-a-tag--tp26712342p26731706.html
Sent from the Struts - User mailing list archive at Nabble.com.


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