[
https://issues.jboss.org/browse/RF-11948?page=com.atlassian.jira.plugin.s...
]
Rene O commented on RF-11948:
-----------------------------
To make things a little bit clearer, here is another example which demonstrates my problem
better:
{code:title="mainpage"}
<!DOCTYPE html 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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
<h:head>
<title>JSF Test</title>
</h:head>
<h:body>
<rich:extendedDataTable rendered="false"/>
<rich:column rendered="false"/>
<h:panelGroup id="pagePanel" >
<ui:include src="#{model.activeInclude}" />
</h:panelGroup>
</h:body>
</html>
{code}
{code:title="includeA - active at start"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:form id="myFormA">
<a4j:commandButton id="showButton" value="Show Table"
action="#{ctr.showTable}" immediate="true"
execute="@this" render="pagePanel"
oncomplete="#{rich:component('tableA')}.setColumnWidth('colA','500');"
/>
</h:form>
</ui:composition>
{code}
{code:title="includeB - active if button within includeA is clicked"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:form id="myFormB">
<rich:extendedDataTable id="tableA" var="item"
value="#{model.tableList}" rows="5">
<f:facet name="header">
<h:outputText value="HeaderA" />
</f:facet>
<rich:column id="colA" width="10px">
<f:facet name="header">
ColA
</f:facet>
#{item.a}
</rich:column>
</rich:extendedDataTable>
<br/>
<a4j:commandButton id="hideButton" value="Hide Table"
action="#{ctr.hideTable}" immediate="true"
execute="@this" render="pagePanel"
/>
</h:form>
</ui:composition>
{code}
The oncomplete-workaround to resize the table fails with an js error because the table
itself doesn't exists during ajax execution:
Zeitstempel: 28.03.2012 17:37:45
Fehler: syntax error
Quelldatei:
http://localhost:8080/jsf2testcase/javax.faces.resource/richfaces.js.jsf
Zeile: 481
Quelltext:
.setColumnWidth('colA','500');;
> rich:extendedDataTable generates a js-error stating this.normalPartStyle is
undefined
>
-------------------------------------------------------------------------------------
>
> Key: RF-11948
> URL:
https://issues.jboss.org/browse/RF-11948
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tables
> Affects Versions: 4.2.0.CR1
> Environment: richfaces-4.2.0-SNAPSHOT, Firefox 10, IE8
> Reporter: Rene O
> Assignee: Brian Leathem
> Fix For: 4.2.1.CR1
>
>
> If you use rich:extendedDataTable and manually set the width of a column afterwards,
a js error occurs
> {code:title=page-snippet to reproduce the issue}
> <!DOCTYPE html 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:h="http://java.sun.com/jsf/html"
>
xmlns:f="http://java.sun.com/jsf/core"
>
xmlns:ui="http://java.sun.com/jsf/facelets"
>
xmlns:a4j="http://richfaces.org/a4j"
>
xmlns:rich="http://richfaces.org/rich"
>
> <h:head>
> <title>JSF Test</title>
> </h:head>
> <h:body>
> <h:form id="myForm">
> <rich:extendedDataTable id="tableA" var="item"
value="#{model.tableList}" rows="5">
> <f:facet name="header">
> <h:outputText value="HeaderA" />
> </f:facet>
> <rich:column id="colA" width="100px">
> <f:facet name="header">
> ColA
> </f:facet>
> #{item.itemA}
> </rich:column>
> </rich:extendedDataTable>
> <script type="text/javascript">
> #{rich:component('tableA')}.setColumnWidth('colA','200');
> </script>
> </h:form>
> </h:body>
> </html>
> {code}
> {code:title=js error}
> Fehler: this.normalPartStyle is undefined
> Quelldatei:
http://localhost:8080/jsftest/javax.faces.resource/extendedDataTable.js.j...
> Zeile: 279
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira