[
http://jira.codehaus.org/browse/DISPL-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159446#action_159446
]
Mark Zusman commented on DISPL-579:
-----------------------------------
Example - The code in large text is where the exact change is used
#1 - <display:table name="sessionScope.stateGroup" outputAttr="tidData">
#2 - TableModel tidData = (TableModel) session.getAttribute( "tidData" );
---------------------------
<testreport:query outputAttr="Output" queryString="<%=query%>" />
<%
String path = TRPropertiesManager.getProperty(
TRPropertiesManager.TR_PROPS, TRPropertiesManager.TR_REPORT_FILE_PATH );
ArrayList<?> result = (ArrayList<?>) session.getAttribute( "Output"
);
IExcelReportBuilder reportBuilder = new ABCTidExcel();
reportBuilder.setReportType( ReportTypeEnum.RTAREXCEL );
reportBuilder.setFileName( path + fileName );
reportBuilder.setReportStartTime( startTime );
reportBuilder.setReportEndTime( endTime );
ISummaryUIHelper helper = reportBuilder.getSummaryUIHelper();
ArrayList<?> tidSummaryList = helper.prepareReportSummary( result,
startTime, endTime );
String states[] = helper.getStatesList( tidSummaryList );
for( int i = 0; states != null && states.length > 0 && i <
states.length; i++ )
{
ArrayList<?> state_data = helper.doGroupSummaryByState(
tidSummaryList, states[i] );
out.println("State:"+states[i]);
session.setAttribute( "stateGroup", state_data );
%>
<display:table name="sessionScope.stateGroup" outputAttr="tidData">
<display:setProperty name="download" value="true" />
<display:column property="tauid" />
<display:column property="attempt" total="true" />
<display:column property="success" total="true" />
<display:column property="deny" total="true" />
<display:column property="prohibit" total="true" />
<display:column property="failure" total="true" />
<display:column property="commfail" total="true" />
<display:column property="timeout" total="true" />
</display:table>
<%
TableModel tidData = (TableModel) session.getAttribute( "tidData" );
tidData.setSortFullTable( true );
tidData.setSortedColumnNumber( 2 );
tidData.setSortOrderAscending( false );
tidData.sortFullList();
reportBuilder.setTableDataModel( tidData );
reportBuilder.setSheetName( states[i] );
reportBuilder.savePartialReport();
tidData = null;
}
%>
> Code contribution - multi-tab Excel spreadsheets
> ------------------------------------------------
>
> Key: DISPL-579
> URL: http://jira.codehaus.org/browse/DISPL-579
> Project: DisplayTag
> Issue Type: Improvement
> Components: Export
> Affects Versions: 1.1
> Reporter: Mark Zusman
> Priority: Minor
> Fix For: TBD
>
> Attachments: displaytag.tld, svn-diff-displaytag-tld.txt,
> svn-diff-TableTag.txt, TableTag.java
>
>
> my name is Mark Zusman, and I'm a Principal Software Engineer in JDSU. We're
> using DisplayTag 1.1 in one of our
> products and very happy with it. As part of our usage, we've added a couple
> of small features to it (for example, we
> added support for export into multi-tab Excel spreadsheets) - what is the
> best way to contribute them back to
> overall DisplayTag library? Should we send our code for review to a
> DisplayTag developer?
> regards,
> Mark.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel