You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sylvia <sy...@gmail.com> on 2010/08/05 19:25:05 UTC

BIRT Wicket Integration

I have a wicket web app that displays a BIRT report based mostly on the
information found here:
http://java.dzone.com/articles/integrating-birt-your-wicket
http://java.dzone.com/articles/integrating-birt-your-wicket 

This works OK, but it sends the report to the OutputStream and takes the
user away from the web app. I would prefer to have the BIRT report display
in a div or an iframe, but I am having trouble making it happen in wicket.
Has anyone here done something like this?

Essentially I have a page with a number of report parameters on a wicket
page and would like the report to display below these parameters. Then the
user would be able to just modify the parameters that are still visible and
re-run the report.

Any help would be appreciated. 
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315184.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by sylvia <sy...@gmail.com>.
By the way, i'm just returning html, not the pdf. I have a pdf as a separate
report option. So really I would just like to take the html version of my
report and put it in a div tag. 
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2316437.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by sylvia <sy...@gmail.com>.
Yes, i was able to re-arrange my code to get to what I needed. Now I'm trying
to get it into a div or panel instead of an iframe. I tried creating a
DocumentDiv, similar to your DocumentInlineFrame and using that, but it
doesn't seem to be working. Is there a limitation on what I can send the
byte array to? Thanks for help.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2316411.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Sylvia,

On the article on the dzone you have

options.setOutputStream(os);

Where os is an OutputStream. What stop you from creating a
ByteArrayOutputString and do the same as above? The you could use it
to retrieve the bytes.

Ernesto


On Thu, Aug 5, 2010 at 8:53 PM, sylvia <sy...@gmail.com> wrote:
>
> I can't get the outputstream from the BIRT code to give to the getBytes
> method. Thanks though. I will see if I can render the BIRT report  a
> different way.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315458.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by sylvia <sy...@gmail.com>.
I can't get the outputstream from the BIRT code to give to the getBytes
method. Thanks though. I will see if I can render the BIRT report  a
different way.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315458.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Sylvia,

Isn't it enough to return PDF bytes on getData bellow?

return new ResourceState() {
			
			@Override
			public String getContentType() {
				return "application/pdf";
			}
			
			@Override
			public byte[] getData() {
				// return PDF bytes here... e.g generate the PDF into an output
ByteArrayOutputStream and the call
                                // return out.toByteArray();
			}
		};

Best,

Ernesto

On Thu, Aug 5, 2010 at 8:19 PM, sylvia <sy...@gmail.com> wrote:
>
> Thanks Ernesto, I did see your article. I was unable to figure out how to get
> the two options to work together. In the solution I currently have, it seems
> to hijack the outputstream and doesn't give you a way to re-direct it to
> your DisplayResource.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315410.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by sylvia <sy...@gmail.com>.
Thanks Ernesto, I did see your article. I was unable to figure out how to get
the two options to work together. In the solution I currently have, it seems
to hijack the outputstream and doesn't give you a way to re-direct it to
your DisplayResource. 
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315410.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BIRT Wicket Integration

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Sylvia,

Maybe this link might be of some help: just combine what you have with
the approach described here...

https://cwiki.apache.org/confluence/display/WICKET/Displaying+content++(e.g.+PDF,+Excel,+Word)+in+an+IFRAME

Best,

Ernesto

On Thu, Aug 5, 2010 at 7:25 PM, sylvia <sy...@gmail.com> wrote:
>
> I have a wicket web app that displays a BIRT report based mostly on the
> information found here:
> http://java.dzone.com/articles/integrating-birt-your-wicket
> http://java.dzone.com/articles/integrating-birt-your-wicket
>
> This works OK, but it sends the report to the OutputStream and takes the
> user away from the web app. I would prefer to have the BIRT report display
> in a div or an iframe, but I am having trouble making it happen in wicket.
> Has anyone here done something like this?
>
> Essentially I have a page with a number of report parameters on a wicket
> page and would like the report to display below these parameters. Then the
> user would be able to just modify the parameters that are still visible and
> re-run the report.
>
> Any help would be appreciated.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315184.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org