Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Embedding reports in a JSF 2.0 facelet.
llazzeri
I can successfully embed a Birt report in a JSF 2.0 facelet via a tag
<h:outputText escape="false" value="#{...}">
whose value is the String resulting from an embeddable HTML Birt report.
This technique fails when the report is provided via ajax and it contains some javascript (such as, for example, a chart with interactivity).
The reason of failure is that JSF inserts the ajax response in a XML file, enclosed in a CDATA section.
If the report contains some javascript, Birt encloses it in a CDATA section.
The result is an XML file containing two nested CDATA sections, which is wrong.
Any idea to solve this issue will be really appreciated.
Thanks in advance and regards,
Livio
Find more posts tagged with
Comments
JasonW
Can you open an enhancement request in bugzilla for this?
BTW have you tried:
http://exadel.org/jsf4birt
Jason
llazzeri
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="92012" data-time="1323963936" data-date="15 December 2011 - 08:45 AM"><p>
Can you open an enhancement request in bugzilla for this?<br />
BTW have you tried:<br />
<a class='bbc_url' href='
http://exadel.org/jsf4birt'>http://exadel.org/jsf4birt</a><br
/>
<br />
Jason<br /></p></blockquote>
Jason,<br />
thank you for your reply.<br />
<br />
JSF4BIRT supports JSF 1.2 only and there are no plans to support JSF 2.0.<br />
<br />
As far as my problem is concerned, I am not sure that it is a Birt's issue. It could be an issue of Mojarra, which should take care of eventual CDATA sections in the HTML fragment. It would be nice to see if MyFaces has the same problem. I'll try when I'll have time. As a matter of facts, MyFaces addressed this problem, as is documented here: <a class='bbc_url' href='
https://issues.apache.org/jira/browse/MYFACES-2835.'>https://issues.apache.org/jira/browse/MYFACES-2835.</a><br
/>
From here I borrowed the idea to transform the nested CDATA in two adiacent CDATA, with just one simple method call:<br />
embeddableHtml = embeddableHtml.replace("]]>", "]]><![CDATA[]]]]><![CDATA[>");<br />
and it works fine!<br />
<br />
Jason, please let me know whether you think still appropriate to post this on bugzilla.<br />
<br />
Best regards,<br />
Livio
JasonW
Nice work around. I would still like to get it recorded in bugzilla and put in your work around. The bug may get closed but at least it will be in for others. Do you mind?
Jason
llazzeri
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="92197" data-time="1324336931" data-date="19 December 2011 - 04:22 PM"><p>
Nice work around. I would still like to get it recorded in bugzilla and put in your work around. The bug may get closed but at least it will be in for others. Do you mind?<br />
<br />
Jason<br /></p></blockquote>
Posted on bugzilla at N. 367192.<br />
<br />
The link to MyFaces in my previous post was incomplete. The right one is <a class='bbc_url' href='
https://issues.apache.org/jira/browse/MYFACES-2835'>here</a><br
/>
<br />
Best regards,<br />
Livio
sakkie6yster
<blockquote class='ipsBlockquote' data-author="'llazzeri'" data-cid="91990" data-time="1323933718" data-date="15 December 2011 - 12:21 AM"><p>
I can successfully embed a Birt report in a JSF 2.0 facelet via a tag<br />
<h:outputText escape="false" value="#{...}"><br />
whose value is the String resulting from an embeddable HTML Birt report.<br />
This technique fails when the report is provided via ajax and it contains some javascript (such as, for example, a chart with interactivity).<br />
The reason of failure is that JSF inserts the ajax response in a XML file, enclosed in a CDATA section.<br />
If the report contains some javascript, Birt encloses it in a CDATA section.<br />
The result is an XML file containing two nested CDATA sections, which is wrong.<br />
<br />
Any idea to solve this issue will be really appreciated.<br />
Thanks in advance and regards,<br />
Livio<br /></p></blockquote>
<br />
<br />
Hi Livio,<br />
<br />
We are currently investigating exactly this (using BIRT with JSF 2.0). <br />
Were you able to successfuly integrate BIRT into JSF 2.0 and if so could you share<br />
some information on how you went about this?<br />
<br />
Thank you kindly.
kclark
sakkie6yster, I wrote up a blog on how to use JSF 2.0 and BIRT, <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php?app=blog&module=display§ion=blog&blogid=45&showentry=442'>take
a look here</a> and let me know if you have any questions.