struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josep García <jgar...@isigma.es>
Subject Re: Data Grids & Excel Exports
Date Fri, 13 Apr 2012 13:26:22 GMT
Use conditionals in you jsp, combined with displaytag. For instance, I use
this:

<%
if (request.isUserInRole("ROLE_ONE")) {
%>
    <display:column titleKey="mybean.actions" property="status" />
<%
}
%>

As for performance, did you try external sorting and pagination?

Cheers,
Josep


El 12 de abril de 2012 21:30, CRANFORD, CHRIS
<Chris.Cranford@setech.com>escribió:

> I'm actually using DisplayTag in fact; however, the performance to
> export to Excel 50,000+ records wasn't ideal or fast.
>
> -----Original Message-----
> From: Chris Pratt [mailto:thechrispratt@gmail.com]
> Sent: Thursday, April 12, 2012 1:15 PM
> To: Struts Users Mailing List
> Subject: Re: Data Grids & Excel Exports
>
> You might want to look into something like DisplayTag or JQGrid.
>  (*Chris*)
>
> On Thu, Apr 12, 2012 at 7:24 AM, CRANFORD, CHRIS
> <Chris.Cranford@setech.com>wrote:
>
> > I have several queries that I perform against my SQL database to get a
>
> > list of records and then iterate over them in a paginated way in JSPs.
> > Presently, I have a JSP for each query's output because there are
> > various different columns being shown depending upon the report;
> > however I am wondering if there is a better streamlined approach to
> > this rather than relying heavily on the JSP to control the columns
> displayed?
> >
> > Taking this one step forward, I've added Excel exports; however it's
> > reliant on the report export service to iterate the result set (just
> > like the JSP does) and add the column headings, values for each row
> > and perform any formatting needed.  The service then hands the struts
> > action a ByteArrayOutputStream object that gets streamed back to the
> > browser through the action.
> >
> > In both cases, the JSP/service are driving what columns are shown,
> > controls formatting, etc.  This means should a new column be added,
> > formatting changed, or a column removed from the JSP, one has to
> > remember to update the adjacent export service as well and from a
> > design perspective that seems redundant.  I'd rather have a single
> > place that controls what columns are shown/hidden, manages formatting,
> etc.
> >
> > How has others tackled similar designs in the past?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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