My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 117: Exports not working in Tiles views (taglib)
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Jul 2008


 
Reported by d...@christianbollmeyer.de, Jul 17, 2008
What steps will reproduce the problem?

1. Put a JMesa table (using the taglib) in a Tiles view (Struts 1.3.8)
2. Add the standard export javascript handler code
3. Press one of the export icons (csv, excel)

What is the expected output? What do you see instead?

A download dialog should appear, just like in the JSP demo.
Instead, the originating table vanishes and garbage output is
written to where it once was. Results differ, depending on the
export type:

a) CSV: a line appears, obviously containing all the table data,
(including links and mini icons), in a single row on top

b) Excel: the following string appears:
org.apache.poi.hssf.usermodel.HSSFWorkbook@1489c06 (obviously .toString())

What version of the product are you using? On what operating system?

Latest, 2.3.3. Tomcat 6.0.16, JRE 1.6, Struts 1.3.8, Spring 2.5,
using Spring's DelegatingTilesRequestProcessor and Tiles XML defs.

Please provide any additional information below.

Same issue with Glassfish v2ur2, btw.

-- Ch.
Jul 17, 2008
#1 extremec...@gmail.com
Are you defining your exports in the controller? If so could I see how you have your
exports defined in your Controller (or Action if using Struts)?


Jul 18, 2008
#2 d...@christianbollmeyer.de
Nope, I'm using JMesa as a tag currently (just like eXtremeTable), basically like this:

<form name="matterListForm" action="${pageContext.request.contextPath}/search.do">

<jmesa:tableFacade items="${matterList}" id="matterList" var="current"
exportTypes="csv,excel">

<jmesa:htmlTable captionKey="label.search.title.matters">

<jmesa:htmlRow>

  <jmesa:htmlColumn titleKey="label.search.column.projectnr" style="width:70px;"
property="projectnr">
    <a href="${getMatterUrl}">${current.projectnr}</a>
  </jmesa:htmlColumn>

[...]

</jmesa:htmlRow>
</jmesa:htmlTable>
</jmesa:tableFacade>
</form>

Export handler code is:

<script type="text/javascript">
function onInvokeAction(id, action) {
    setExportToLimit(id, '');
    createHiddenInputFieldsForLimitAndSubmit(id);
}
function onInvokeExportAction(id, action) {
    var parameterString = createParameterStringForLimit(id);
    location.href = '${pageContext.request.contextPath}/search.do?' + parameterString;
}
</script>

No controller code involved, currently. jQuery version is 1.6.2, if that matters.
The table works ok, basically; its just the exports that behave strange. I can
also provide screenshots of the results if needed :-)

Thanks for your help,

-- Ch.
Jul 18, 2008
#3 extremec...@gmail.com
Here is a tutorial on doing exports...it will be different than the eXtremeTable.

https://code.google.com/p/jmesa/wiki/ExportTutorial
Jul 21, 2008
#4 extremec...@gmail.com
(No comment was entered for this change.)
Status: Invalid

Powered by Google Project Hosting