[richfaces-issues] [JBoss JIRA] (RF-13168) 3rd party JSF component disappears on RichFaces ajax refresh
Lukáš Fryč (JIRA)
issues at jboss.org
Thu Mar 6 07:55:33 EST 2014
[ https://issues.jboss.org/browse/RF-13168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12950677#comment-12950677 ]
Lukáš Fryč commented on RF-13168:
---------------------------------
After decompiling TableBody, I got following source for createRows method where the request fails:
{code}
protected List<BodyRow> createRows(FacesContext context, int firstRowIndex, int rowCount, List<BaseColumn> columns)
throws IOException
{
ResponseWriter writer = context.getResponseWriter();
StringWriter stringWriter = new StringWriter();
List<BodyRow> rows = new ArrayList();
ResponseWriter responseWriter = writer.cloneWithWriter(stringWriter);
if (AjaxUtil.isAjaxRequest(context)) {
responseWriter.startCDATA();
}
stringWriter.getBuffer().setLength(0);
context.setResponseWriter(responseWriter);
try
{
if (this.tableStructure.getScrolling() == null) {
rows = createNonScrollableRows(context, stringWriter, firstRowIndex, rowCount, columns);
} else {
rows = createScrollableRows(context, stringWriter, firstRowIndex, rowCount, columns);
}
}
finally
{
if (AjaxUtil.isAjaxRequest(context)) {
responseWriter.endCDATA();
}
context.setResponseWriter(writer);
}
return rows;
}
{code}
Note {{responseWriter.startCDATA();}} line.
The OpenFaces 3.0 (from downloads page):
{code}
protected List<BodyRow> createRows(
FacesContext context,
int firstRowIndex,
int rowCount,
List<BaseColumn> columns
) throws IOException {
ResponseWriter writer = context.getResponseWriter();
StringWriter stringWriter = new StringWriter();
List<BodyRow> rows = new ArrayList<BodyRow>();
context.setResponseWriter(writer.cloneWithWriter(stringWriter));
try {
if (tableStructure.getScrolling() == null)
rows = createNonScrollableRows(context, stringWriter, firstRowIndex, rowCount, columns);
else
rows = createScrollableRows(context, stringWriter, firstRowIndex, rowCount, columns);
} finally {
context.setResponseWriter(writer);
}
return rows;
}
{code}
Could you hand this issue over to OpenFaces guys?
> 3rd party JSF component disappears on RichFaces ajax refresh
> ------------------------------------------------------------
>
> Key: RF-13168
> URL: https://issues.jboss.org/browse/RF-13168
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: compatibility, component-a4j-core
> Reporter: Frank Langelage
> Assignee: Lukáš Fryč
> Labels: interop, jsf22
> Attachments: install-mojarra-2.1.19.cli, Jira-WFLY-UT.tar, Jira-WFLY-UT.tar, xaa, xaa, xab, xab, xac, xac
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> On some of my pages I'm using richfaces a4j:poll to refresh components regularly. The components refreshed is an openfaces datatable.
> This does not work with WildFly build from current sources.
> Same code works with JBoss AS 7.20. So problem is not related to richfaces or openfaces for me. Probably related to replacement of jboss-web with undertow.
> I'll attach a small project showing the problem.
> The mojarra datatable works fine, is refreshed every 10 seconds.
> The openfaces datatable below disappears on first refresh.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list