-
1. Re: calls twice the paint bean on FF and 0 times on MSIE
rigolissimo Aug 4, 2009 12:38 AM (in response to rigolissimo)"rigolissimo" wrote:
Why does the following code call twice the paint bean on FF (when the page is loaded) and never on MSIE 8 ???
On FF, I see the paint object called twice (and the same PDF is always displayed).
This is similar to
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4038990#4038990
There apaprently never was a clear answer to this problem.
I can't believe there is no clear answer or working example for such an typical use (displaying PDF !) of Ajax and Richfaces...
I would also appreciate an answer on this as I see this as critical for my project (I will not use a4j if this does not work on FF and MSIE). -
2. Re: call twice the paint bean on FF (when the page is loaded
rigolissimo Aug 4, 2009 2:58 AM (in response to rigolissimo)Before I get told, this is "solved", let me say that I tried adding several ideas mentioned in
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4038990#4038990
namely adding classid and mimeType.
This does not help.
See what
<a4j:mediaOutput element="object" value="constante"
uriAttribute="data" createContent="#{ReportBean.paint}"
mimeType="application/pdf" id="pdf-preview" cacheable="false"
classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"
session="true" width="300" height="300">
</a4j:mediaOutput>
generates (url shortened)
Note : the classid is not generated
the type (application/pdf) is not generated
Adding directly the following attribute type="application/pdf" instead of mimeType="application/pdf" does not help (no type attribute gets generated on the object).
And this does not display on MSIE 8 ...
Could it be that this bug was closed too quickly
https://jira.jboss.org/jira/browse/AJSF-34
?
If not, could we get the syntax to get a PDF object display using <a4j:mediaOutput on MSIE 8 (and I suspect 6 and 7) ?
[Also why does the paint method get called twice on FF?] -
3. Re: call twice the paint bean on FF (when the page is loaded
rigolissimo Aug 4, 2009 3:07 AM (in response to rigolissimo)I wish we could edit posts... (the code generated was removed, it needed to be escaped)
See what<a4j:mediaOutput element="object" value="constante" uriAttribute="data" createContent="#{ReportBean.paint}" mimeType="application/pdf" id="pdf-preview" cacheable="false" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" session="true" width="300" height="300"> </a4j:mediaOutput>
generates (url shortened)<object id="j_id2:pdf-preview" data="/richfaces-reporting/a4j/s/3_2_2.SR1org.ajax4jsf.reA__.jsf" height="300" width="300"></object>
Note : the classid is not generated
the type (application/pdf) is not generated
Adding directly the following attribute type="application/pdf" instead of mimeType="application/pdf" does not help (no type attribute gets generated on the object).
And this does not display on MSIE 8...
Could it be that this bug was closed too quickly
https://jira.jboss.org/jira/browse/AJSF-34?
If not, could we get the syntax to get a PDF object displayed using <a4j:mediaOutput on MSIE 8 (and I suspect 6 and 7) ? -
4. Re: call twice the paint bean on FF (when the page is loaded
ilya_shaikovsky Aug 4, 2009 4:34 AM (in response to rigolissimo)at first please be patien and not comment on all the thread you found. especially in deprecated forums.. We do not know in which thread you will wait for answer ;) And will not copy solution to all the threads.
under investigation. -
5. Re: call twice the paint bean on FF (when the page is loaded
rigolissimo Aug 4, 2009 11:22 AM (in response to rigolissimo)"ilya_shaikovsky" wrote:
at first please be patien and not comment on all the thread you found. especially in deprecated forums.. We do not know in which thread you will wait for answer ;) And will not copy solution to all the threads.
under investigation.
Sorry, for the deprecated thread (disabling posting there would be nice).
I will check the answer here.
In the meantime, maybe this can help you, If I generate this code manually, it displays on MSIE 8 and FF (but the paint method is called twice on each, which seems a waste: producing a pdf dynamically is costly) :<object id="j_id2:pdf-preview" data="http://localhost:8080/richfaces-reporting/a4j/s/3_2_2.SR1org.ajax4jsf.resource.UserResource/ncvA__.jsf" height="300" width="300" type="application/pdf" id="pdf-preview" > <param name="src" value="http://localhost:8080/richfaces-reporting/a4j/s/3_2_2.SR1org.ajax4jsf.resource.UserResource/nvA__.jsf" /> </object>
(url shortened)