-
1. Re: Specifying Excel Filename
danielc.roth Sep 23, 2008 7:14 PM (in response to mdesignz)Nope, there isn't (except for renaming your xhtml). File a JIRA :)
-
2. Re: Specifying Excel Filename
nickarls Sep 23, 2008 9:06 PM (in response to mdesignz)I added a filename attribute to e:workbook which is passed into the DocumentData filename. I'll have to test it before committing it, though ;-)
-
3. Re: Specifying Excel Filename
danielc.roth Sep 23, 2008 9:58 PM (in response to mdesignz)Document it well. If a developer has a document store servlet that matches *.xls, but enters filename=
myOwnThing.doc
, the file won't be accessible. -
4. Re: Specifying Excel Filename
mdesignz Sep 24, 2008 12:47 AM (in response to mdesignz)That's great! Thanks. Unfortunately, until I can get resolution to https://jira.jboss.org/jira/browse/JBSEAM-3450 I won't be able to use it.
-
5. Re: Specifying Excel Filename
danielc.roth Sep 24, 2008 9:21 AM (in response to mdesignz)Robert: Does the excel/mail examples that comes with Seam work?
-
6. Re: Specifying Excel Filename
mdesignz Sep 24, 2008 11:04 PM (in response to mdesignz)I just tried the Excel example, and it works perfectly. I'm beginning to think that something strange may be going on because I'm using Maven2 to build my project. I'm grasping for answers if you haven't noticed. Perhaps something is being brought in as a dependency that shouldn't. I'll check the exploded EAR to see if I notice anything. I haven't looked at the Excel source example, but I'll try to emulate it exactly. Once again, thanks for all the replies and support.
-robert. -
7. Re: Specifying Excel Filename
mdesignz Sep 25, 2008 12:38 AM (in response to mdesignz)I slightly modified the excel example. I added this to ExcelTest:
@In
private Renderer renderer;public void renderTest()
{
System.out.println(Getting ready to render file
);
renderer.render(repeat.xhtml
);
System.out.println(Back from render
);
}and then added this to the home.xhtml
<h:outputLink action="#{excelTest.renderTest}"> <h:outputText>Try to render it</h:outputText> </h:outputLink>
Deployed it to 4.2.2.GA and it doesn't throw an exception, but it also doesn't render the Excel sheet.
I know it processes the .xhtml file because if I drop one of my .xhtml files into the example, it complains about not resolving some of the components, but it does NOT throw an exception. This is very odd. I'm still going to check if something is being included that shouldn't be from the Maven dependencies. -
8. Re: Specifying Excel Filename
danielc.roth Sep 25, 2008 9:35 AM (in response to mdesignz)I'll have a look at it today. If you haven't changed anything else in the example, it should work fine.
-
9. Re: Specifying Excel Filename
mdesignz Sep 25, 2008 5:08 PM (in response to mdesignz)Well, here's the good news. I scraped all of my POMs to build my project, and grabbed the example that Andreas Eriksson (http://iamandreas.blogspot.com) posted, and rebuilt. Now, the application doesn't throw an exception during the render, but it doesn't produce any output, so it appears to be behaving like the example. I'll update the JIRA I created, since it's now a new issue. Once again, thanks for everyone's help.
-robert. -
10. Re: Specifying Excel Filename
danielc.roth Sep 25, 2008 7:20 PM (in response to mdesignz)- outputLink can't have an action. I used a commandLink instead (nested in a h:form)
- renderer.render(
repeat.xhtml
); is wrong. shuold be renderer.render(/repeat.xhtml
);
Changing accordingly, it works fine.
-
11. Re: Specifying Excel Filename
mdesignz Sep 25, 2008 7:57 PM (in response to mdesignz)Sorry about the outputLink reference. I also had it as a commandButton within the form, and then added the commandLink within the form. I modified the render parameter with and without the forward slash. I still get nothing rendered. I'm doing this under Mac OS X, but I doubt that's the issue. I'll try the latest snapshot to see if that matters. Very weird.
-
12. Re: Specifying Excel Filename
nickarls Sep 25, 2008 9:13 PM (in response to mdesignz)Tried the
currently not that well documented
experimental feature of setting exportKey=something
on workbook, rendering, and then checking if a DocumentData object has appeared in the event context under thesomething
key? -
13. Re: Specifying Excel Filename
mdesignz Sep 26, 2008 4:04 AM (in response to mdesignz)This is very odd. Downloaded a new JBoss AS 4.2.2.GA, latest Seam 2.1 Snapshot. Made the above changes to ExcelTest.java and home.xhtml. Ran ant, started the server, clicked on the link to invoke renderTest(). I have println statements that indicate renderTest() is getting invoked. The render method gets called without error. I put a println in the getRepeat() and it's getting called, yet nothing gets generated. If I click on the other link that invokes the repeat.xhtml file directly, it works just fine. Mac OS X, with latest Firefox and Safari. That can't be it...can it?
-
14. Re: Specifying Excel Filename
danielc.roth Sep 26, 2008 7:43 AM (in response to mdesignz)I might misunderstand, but too me, everything works fine for you. You won't
get anything back
calling renderer.render, if thats what you think. Renderer.render renders the document, it doesn't send it to the user. For that top work, you need to go torepeat.seam
, or send the created excel file to the user yourself (accessible using an exportKey).To be perfectly clear, the following code shouldn't send an the excel file to the user:
public void renderTest() { System.out.println("Getting ready to render file"); renderer.render("repeat.xhtml"); System.out.println("Back from render"); }
It will just creata an excel file.