[
https://jira.jboss.org/jira/browse/RF-3529?page=com.atlassian.jira.plugin...
]
Adam Michalik commented on RF-3529:
-----------------------------------
I think the bug is caused by the fact that the paint2d data is passed in the URL and IE
has a URL length limit to 2083 characters only (
http://support.microsoft.com/kb/208427).
Here's a test case:
test.xhtml:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:rich="http://richfaces.org/rich">
<head></head>
<body style="background-color: cyan">
<rich:paint2D id="painter" data="#{tester.data}"
style="border: solid 2px blue"
format="png" paint="#{tester.paint}"
width="650" height="1500"/>
</body>
</html>
Tester.java:
package test;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.Random;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;
@Name("tester")
public class Tester {
@Logger Log log;
public Object getData() {
String s = randomizeString();
log.info("Data is:\n{0}", s);
return s;
}
public void setData(Object o) {
}
public void paint(Graphics2D g, Object o) {
log.info("Painting\n{0}", o);
g.setColor(Color.GREEN);
g.clearRect(0, 0, 650, 1500);
g.setColor(Color.red);
g.drawString((String) o, 0, 40);
}
private String randomizeString() {
Random r = new Random();
byte[] buf = new byte[5000];
r.nextBytes(buf);
return new String(buf);
}
}
When deployed, FF shows a big black picture with some red gibberish. IE shows an empty
image (image border and a cross icon).
The image URL is:
http://localhost:8080/myproject/a4j/s/3_3_1.GAorg.richfaces.renderkit.htm...
When accessed, FF shows the image, IE shows a 500 error with the above mentioned NPE stack
trace.
I have noticed that the documentation for paint2d data attribute says: "IMPORTANT:
Since serialized data stored in URI, avoid using big objects". It is good that
it's documented but maybe a different solution can be implemented?
paint2D: component is broken under IE.
--------------------------------------
Key: RF-3529
URL:
https://jira.jboss.org/jira/browse/RF-3529
Project: RichFaces
Issue Type: Bug
Components: component-output
Affects Versions: 3.2.1
Environment: IE(3.2.1.CR6)
Reporter: Mikhail Vitenkov
Assignee: Tsikhon Kuprevich
Fix For: 3.3.2.CR1
Attachments: Paint2DBrokenIE.png
See attached screenshot.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira