-
15. Re: export to pdf or excel from rich:dataTable
infinity2heaven Aug 7, 2008 9:45 PM (in response to infinity2heaven)could that behave differently in different browsers?
-
16. Re: export to pdf or excel from rich:dataTable
nickarls Aug 7, 2008 9:50 PM (in response to infinity2heaven)Not impossible. The 404 indicates that a page is not found. The same redirect that goes to the correct place in another browser apparently.
But in order to do the redirect correctly it would be nice to know what goes wrong. Is the 404 on wrong protocol, wrong port or what?
-
17. Re: export to pdf or excel from rich:dataTable
infinity2heaven Aug 7, 2008 10:57 PM (in response to infinity2heaven)I haven't mentioned it to be a
404
problem. Why do you ask? -
18. Re: export to pdf or excel from rich:dataTable
nickarls Aug 8, 2008 9:24 AM (in response to infinity2heaven)
Priya M wrote on Aug 07, 2008 22:57:
I haven't mentioned it to be a404
problem. Why do you ask?OK, my bad, I thought it was some
friendly
IE http error message since you didn't correct me directly whan I started talking about the 404.Anyways, tried it under IE7 on https on 8443 and it worked for me so I'll have to ask you to file a JIRA under the excel module with xhtml/bean code and as much info on browser, AS, AS conf, JRE etc as possible. Could be some IE security
feature
also, please try setting security as low as possible (allow redirects etc). -
19. Re: export to pdf or excel from rich:dataTable
infinity2heaven Sep 4, 2008 3:20 AM (in response to infinity2heaven)I got this working. It wasn't a problem with Seam's code (although it should be carefully underlined as a note somewhere in the docs).
The security constraints used in Internet explorer is quite different from that of Firefox, Safari and even the latest Google Chrome (yes, the reports work well with Google Chrome as it's using Apple's Webkit).
Here's what I found after reading a bit about restricting access to clipboards in IE. Read here also. My webapp has security constraints ON as follows
<security-constraint> <display-name>Restrict raw XHTML Documents</display-name> <web-resource-collection> <web-resource-name>Security Resource</web-resource-name> <url-pattern>/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
As you see above, everything was restricted outside of WEB-INF. Now, I'm guessing that the excel generator was generating on the clipboard or temp file on the root and the constraint was not allowing it. I was getting these errors from IEMicrosoft excel cannot access the file "https:// " There are several possible reasons
The file name or path does not exist
The file is being used by another program
The workbook you are trying to save has the same name as a currently open workbookI changed the restriction to
<url-pattern>*.xhtml</url-pattern> <url-pattern>*.css</url-pattern> <url-pattern>*.img</url-pattern>
and now, it works like a charm.
Note to Nicklas Karlsson -- You might want to add this in the reference doc.
-
20. Re: export to pdf or excel from rich:dataTable
nickarls Sep 4, 2008 9:24 AM (in response to infinity2heaven)Thanks for the investigation.
I added it to the documention. I'll move it to a Common Issues section once I get a more clear picture of what the common issues in general are.
-
21. Re: export to pdf or excel from rich:dataTable
kstoneman Sep 30, 2008 9:08 PM (in response to infinity2heaven)I am new to seam and I am trying to export search results to excel, I followed the instruction set in this post, and when I export to excel the excel sheet is not getting all of the data in the result list. It should be getting two columns each with a column header, instead it gets this:
Role Name Select
Select
Select
Select
Select
Select
Role Name should have "Roles" under it and the column with all the Selects should have "Action" as the header.
Here is the xhtml that I am using:
<h:form id="excelExport">
<h:outputText value="The RBAC Roles search returned no results." rendered="#{empty rbacRolesList.resultList}"/>
<rich:dataTable id="rbacRolesList" var="rbacRoles" value="#{rbacRolesList.resultList}" rendered="#{not empty rbacRolesList.resultList}">
<h:column>
<f:facet name="header">
<s:link styleClass="columnHeader" value="Role Name #{rbacRolesList.order=='rolename asc' ? messages.down : ( rbacRolesList.order=='rolename desc' ? messages.up : '' )}">
<f:param name="order" value="#{rbacRolesList.order=='rolename asc' ? 'rolename desc' : 'rolename asc'}"/>
</s:link>
</f:facet>
#{rbacRoles.rolename}
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<s:link view="/#{empty from ? 'RbacRoles' : from}.xhtml" value="Select" id="rbacRoles">
<f:param name="rbacRolesRolename" value="#{rbacRoles.rolename}"/>
</s:link>
</h:column>
</rich:dataTable>
<h:commandLink value="Export table" action="#{org.jboss.seam.excel.excelExporter.export('excelExport:rbacRolesList')}" />
</h:form> -
22. Re: export to pdf or excel from rich:dataTable
nickarls Sep 30, 2008 9:32 PM (in response to infinity2heaven)Related to this. The export looks for children of UIOutput for data (meaning it doesn't see your s:link and inline text. It's high on my priority list...
-
23. Re: export to pdf or excel from rich:dataTable
kstoneman Sep 30, 2008 9:39 PM (in response to infinity2heaven)So does that mean that I there is no way for me to accomplish this? Or is there a workaround?
Thanks. -
24. Re: export to pdf or excel from rich:dataTable
danielc.roth Sep 30, 2008 9:48 PM (in response to infinity2heaven)Exchange s:link with h:outputText and it will work :-)
-
25. Re: export to pdf or excel from rich:dataTable
kstoneman Sep 30, 2008 9:52 PM (in response to infinity2heaven)This is not the same subject, but I am also stuck on a drop down menu. I am trying to populate a drop down with data from a database table.
When I use this:
<h:selectOneMenu id="rolename" styleClass="text" value="#{rbacRolesList.rbacRoles.rolename}">
<s:selectItems value="#{roleNameList.resultList}" var="roleName" label="#{roleName.description}"noSelectionLabel="None"/>
</h:selectOneMenu>
I get just the "None" in the drop down box.
Any ideas? Or could you point me in the right direction?
Thanks. -
26. Re: export to pdf or excel from rich:dataTable
kstoneman Sep 30, 2008 9:56 PM (in response to infinity2heaven)Daniel, that still did not work. I got the same result as before.
You mean just the s:link within the h:column tag correct?
-
27. Re: export to pdf or excel from rich:dataTable
kstoneman Sep 30, 2008 10:25 PM (in response to infinity2heaven)Daniel,
How would this be reformatted to work with the export using h:outputText:
<h:column>
<f:facet name="header">
<s:link styleClass="columnHeader" value="Role Name #{rbacRolesList.order=='rolename asc' ? messages.down : ( rbacRolesList.order=='rolename desc' ? messages.up : '' )}">
<f:param name="order" value="#{rbacRolesList.order=='rolename asc' ? 'rolename desc' : 'rolename asc'}"/>
</s:link>
</f:facet>
#{rbacRoles.rolename}
</h:column>
Thanks for the help. -
28. Re: export to pdf or excel from rich:dataTable
danielc.roth Sep 30, 2008 10:40 PM (in response to infinity2heaven)<h:column> <f:facet name="header"> <h:outputText value="text you want"> <a:support event="onclick" reRender="thisContainersId"> additional actionparam if needed to send to bean </a:support> </h:outputText> </f:facet> <h:outputText value="someValue"/> </h:column>
-
29. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 27, 2008 9:49 PM (in response to infinity2heaven)We are currently on Seam 2.0, with no current plans to move to 2.1 on the radar. Any chance of my getting the source for the 2.x compatible version?