[JBoss Seam] - Re:
by binabik
pete,
thanks for the info. the comment in the wiki certainly makes more sense now. it seems to be more appropriate for static data though (or am i being dense again?).
the example posted in the wiki seems to be exactly what i need, as i'm programmatically generating a PDF on the fly depending on data a user has selected. the high-level PDF integration is not powerful enough for what i need, so i'm generating the PDF in java code and piping that into the Resource class. is that the right way to do it, or should i be subclassing AbstractResource?
that would involve implementing getResource and piping my byte[]-array into response.getOutputStream, if i'm reading the code correctly. but how do i tell seam to use this PDFResource? (can org.jboss.seam.servlet.SeamResourceServlet work that out automagically?)
right now, however, the approach in the wiki works a treat for me, but if the other way is the _correct_ way to do it, i don't mind giving that a try.
thanks again,
sb
p.s.: on the topic of documentation, would this be the right place to volunteer to work on adding/extending javadoc to the seam code? if so, i wouldn't mind getting involved with the project.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081421#4081421
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081421
18 years, 7 months
[JBoss Seam] - renew the @Factory
by srpantano
I´m trying to make a page to insert data and when submitted it returns to the same page insert other one. But when return the object has the data of previous object.
The object was created by @Factory:
| @Factory("license")
| public License work() {
| return getInstance();
| }
When submit the action method do:
| public String persistAndContinue(){
| super.persist();
| setInstance(new License());
| }
The getInstance has a new License object but the "license" still has the previous data.
How to do this correct?
Ps.: I´m using Jboss Framework
The code of pages.xml is
| <navigation from-action="#{licenseHome.persistAndContinue}">
| <end-conversation/>
| <redirect view-id="/license/add.xhtml"/>
| </navigation>
thanks for help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081415#4081415
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081415
18 years, 7 months