[JBoss JIRA] (RF-5460) Strange a4j resource prefix with url-based servlet mappings
by Fab Mars (JIRA)
[ https://issues.jboss.org/browse/RF-5460?page=com.atlassian.jira.plugin.sy... ]
Fab Mars closed RF-5460.
------------------------
Live with it in RF3.3.x; it dopesn't happen with RF4.x
> Strange a4j resource prefix with url-based servlet mappings
> -----------------------------------------------------------
>
> Key: RF-5460
> URL: https://issues.jboss.org/browse/RF-5460
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.2.2
> Environment: JSF RI 1.2.11, RF 3.2.2SR1, Facelets 1.1.15b1, Glassfish v2.
> Reporter: Fab Mars
> Priority: Minor
> Labels: a4j, mapping, prefix, servlet
> Fix For: 4.3.0.Final
>
>
> My web.xml has several servlet mappings.
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>*.jsf</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/somepath1/*</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/somepath999/*</url-pattern>
> </servlet-mapping>
> I'm doing this because I'm using some phaselistener that preproceses some things and also enables short-urls.
> Now, any page has a4j resources written like this:
> <script type="text/javascript" src="/MyContext/somepath999/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js">
> That is all a4j resources are now comprising the LAST servlet-mapping, just between the context name and the /a4j/ path part.
> I tried to workaround it, by putting the *.jsf mapping as the last in the web.xml but to no avail: the last servlet mapping path was always used.
> To reproduce, just download the demo application: http://download.jboss.com/jboss-richfaces/richfaces-demo-3.2.2.SR1-jee5.war
> Edit web.xml and add to the existing *.jsf mapping the following:
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/yeswecan/*</url-pattern>
> </servlet-mapping>
> Then deploy and look at the source of any page:
> <img class="rich-spacer " height="1" id="j_id258" src="/richfaces/yeswecan/a4j/g/3_2_2.SR1images/spacer.gif" width="1" style="height:10px;" />
> I'm not sure this is a bug or a feature of some sort. The code obviously takes ANY valid servlet mapping, which is fair enough. But maybe it should just check whether there is an extension-based mapping amongst them, and if yes, use it.
> Worse, this issue is also probably (conceptually) linked to https://jira.jboss.org/jira/browse/RF-3586
> Anyway, you're free to requalify this issue if you want. I'm reporting what I found and I'll find a workaround in the meantime.
> Thanks.
--
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
11 years, 11 months
[JBoss JIRA] (RF-5460) Strange a4j resource prefix with url-based servlet mappings
by Fab Mars (JIRA)
[ https://issues.jboss.org/browse/RF-5460?page=com.atlassian.jira.plugin.sy... ]
Fab Mars commented on RF-5460:
------------------------------
Please close, I see the problem no longer exists after I migrated my project to RF4.
> Strange a4j resource prefix with url-based servlet mappings
> -----------------------------------------------------------
>
> Key: RF-5460
> URL: https://issues.jboss.org/browse/RF-5460
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.2.2
> Environment: JSF RI 1.2.11, RF 3.2.2SR1, Facelets 1.1.15b1, Glassfish v2.
> Reporter: Fab Mars
> Priority: Minor
> Labels: a4j, mapping, prefix, servlet
> Fix For: 3.Future
>
>
> My web.xml has several servlet mappings.
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>*.jsf</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/somepath1/*</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/somepath999/*</url-pattern>
> </servlet-mapping>
> I'm doing this because I'm using some phaselistener that preproceses some things and also enables short-urls.
> Now, any page has a4j resources written like this:
> <script type="text/javascript" src="/MyContext/somepath999/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js">
> That is all a4j resources are now comprising the LAST servlet-mapping, just between the context name and the /a4j/ path part.
> I tried to workaround it, by putting the *.jsf mapping as the last in the web.xml but to no avail: the last servlet mapping path was always used.
> To reproduce, just download the demo application: http://download.jboss.com/jboss-richfaces/richfaces-demo-3.2.2.SR1-jee5.war
> Edit web.xml and add to the existing *.jsf mapping the following:
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/yeswecan/*</url-pattern>
> </servlet-mapping>
> Then deploy and look at the source of any page:
> <img class="rich-spacer " height="1" id="j_id258" src="/richfaces/yeswecan/a4j/g/3_2_2.SR1images/spacer.gif" width="1" style="height:10px;" />
> I'm not sure this is a bug or a feature of some sort. The code obviously takes ANY valid servlet mapping, which is fair enough. But maybe it should just check whether there is an extension-based mapping amongst them, and if yes, use it.
> Worse, this issue is also probably (conceptually) linked to https://jira.jboss.org/jira/browse/RF-3586
> Anyway, you're free to requalify this issue if you want. I'm reporting what I found and I'll find a workaround in the meantime.
> Thanks.
--
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
11 years, 11 months
[JBoss JIRA] (RF-12654) PartialViewRender skips check for whether column is rendered before checking if children can be rendered
by Ken H (JIRA)
[ https://issues.jboss.org/browse/RF-12654?page=com.atlassian.jira.plugin.s... ]
Ken H updated RF-12654:
-----------------------
Description:
When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
This behavior exists at least as far back as 4.1.0.Final.
Given this minimal example:
{code}
<rich:dataTable value="#{bean.foos}" var="foo">
<rich:column rendered="false">
<h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
</rich:column>
<rich:column>
<a4j:commandButton value="Test" action="#{bean.noop}"
execute="@this" render="@form" />
</rich:column>
</rich:dataTable>
{code}
Clicking the Test button would result in a stack trace similar to the following:
{code}
/index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
{code}
was:
When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
This behavior exists at least as far back as 4.1.0.Final.
For example:
index.html
{code}
<rich:dataTable value="#{bean.foos}" var="foo">
<rich:column rendered="false">
<h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
</rich:column>
<rich:column>
<a4j:commandButton value="Test" action="#{bean.noop}"
execute="@this" render="@form" />
</rich:column>
</rich:dataTable>
{code}
Results in a stack trace similar to the following:
{code}
/index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
{code}
> PartialViewRender skips check for whether column is rendered before checking if children can be rendered
> --------------------------------------------------------------------------------------------------------
>
> Key: RF-12654
> URL: https://issues.jboss.org/browse/RF-12654
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.0.M2
> Environment: JBoss 7.1.1.Final
> Reporter: Ken H
>
> When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
> The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
> This behavior exists at least as far back as 4.1.0.Final.
> Given this minimal example:
> {code}
> <rich:dataTable value="#{bean.foos}" var="foo">
> <rich:column rendered="false">
> <h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
> </rich:column>
> <rich:column>
> <a4j:commandButton value="Test" action="#{bean.noop}"
> execute="@this" render="@form" />
> </rich:column>
> </rich:dataTable>
> {code}
> Clicking the Test button would result in a stack trace similar to the following:
> {code}
> /index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
> at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
> {code}
--
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
11 years, 11 months
[JBoss JIRA] (RF-12654) PartialViewRender skips check for whether column is rendered before checking if children can be rendered
by Ken H (JIRA)
[ https://issues.jboss.org/browse/RF-12654?page=com.atlassian.jira.plugin.s... ]
Ken H updated RF-12654:
-----------------------
Description:
When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
This behavior exists at least as far back as 4.1.0.Final.
For example:
index.html
{code}
<rich:dataTable value="#{bean.foos}" var="foo">
<rich:column rendered="false">
<h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
</rich:column>
<rich:column>
<a4j:commandButton value="Test" action="#{bean.noop}"
execute="@this" render="@form" />
</rich:column>
</rich:dataTable>
{code}
Results in a stack trace similar to the following:
{code}
/index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
{code}
was:
When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
For example:
index.html
{code}
<rich:dataTable value="#{bean.foos}" var="foo">
<rich:column rendered="false">
<h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
</rich:column>
<rich:column>
<a4j:commandButton value="Test" action="#{bean.noop}"
execute="@this" render="@form" />
</rich:column>
</rich:dataTable>
{code}
Results in a stack trace similar to the following:
{code}
/index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
{code}
> PartialViewRender skips check for whether column is rendered before checking if children can be rendered
> --------------------------------------------------------------------------------------------------------
>
> Key: RF-12654
> URL: https://issues.jboss.org/browse/RF-12654
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.0.M2
> Environment: JBoss 7.1.1.Final
> Reporter: Ken H
>
> When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
> The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
> This behavior exists at least as far back as 4.1.0.Final.
> For example:
> index.html
> {code}
> <rich:dataTable value="#{bean.foos}" var="foo">
> <rich:column rendered="false">
> <h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
> </rich:column>
> <rich:column>
> <a4j:commandButton value="Test" action="#{bean.noop}"
> execute="@this" render="@form" />
> </rich:column>
> </rich:dataTable>
> {code}
> Results in a stack trace similar to the following:
> {code}
> /index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
> at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
> at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
> {code}
--
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
11 years, 11 months
[JBoss JIRA] (RF-12654) PartialViewRender skips check for whether column is rendered before checking if children can be rendered
by Ken H (JIRA)
Ken H created RF-12654:
--------------------------
Summary: PartialViewRender skips check for whether column is rendered before checking if children can be rendered
Key: RF-12654
URL: https://issues.jboss.org/browse/RF-12654
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.3.0.M2
Environment: JBoss 7.1.1.Final
Reporter: Ken H
When using rendered on a component within a rich:column of a rich:dataTable, the EL on the component is executed even if the column is not rendered.
The expected behavior (per my loose understanding of the JSF spec) would suggest that the traversal should have short-circuited before checking the unrendered column's children.
For example:
index.html
{code}
<rich:dataTable value="#{bean.foos}" var="foo">
<rich:column rendered="false">
<h:outputText value="#{foo.bar}" rendered="#{foo.propertyDoesNotExist != null}" />
</rich:column>
<rich:column>
<a4j:commandButton value="Test" action="#{bean.noop}"
execute="@this" render="@form" />
</rich:column>
</rich:dataTable>
{code}
Results in a stack trace similar to the following:
{code}
/index.xhtml @33,96 rendered="#{foo.propertyDoesNotExist != null}": The class 'org.richfaces.tests.Foo' does not have the property 'propertyDoesNotExist'.
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.isVisitable(UIComponent.java:1669) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1602) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.component.UIDataAdaptor$DataVisitorForVisitTree.process(UIDataAdaptor.java:199) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65) [richfaces-core-api-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:796) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitDataChildren(UIDataAdaptor.java:1269) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataTableBase.visitDataChildren(UIDataTableBase.java:395) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1347) [richfaces-components-ui-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.3.0.20121024-M2.jar:4.3.0.20121024-M2]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
{code}
--
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
11 years, 11 months
[JBoss JIRA] (RF-12647) rich:dataTable rowclick with nested f:param
by Fab Mars (JIRA)
[ https://issues.jboss.org/browse/RF-12647?page=com.atlassian.jira.plugin.s... ]
Fab Mars updated RF-12647:
--------------------------
Description:
During my migration from RF 3.3 I found this:
Before (with RF 3.3.3):
{code:xml|title="RF 3 Sample"}
<rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
<a4j:support event="onRowClick" reRender="shippingEditForm">
<a4j:actionparam name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
</a4j:support>
<rich:column>
<f:facet name="header">
<h:outputText value="Destination"/>
</f:facet>
<h:outputText value="#{shipping.destinationCountry.name}" />
</rich:column>
<!-- other columns here -->
</rich:dataTable>
{code}
There was nothing really impacting on the migration guide
https://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-C...
So I logically did that with RF4.x.x:
{code:xml|title="RF 4 Sample 1"}
<rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
<a4j:ajax event="rowclick" render="shippingEditForm">
<a4j:param name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
</a4j:ajax>
<rich:column>
<f:facet name="header">
<h:outputText value="Destination"/>
</f:facet>
<h:outputText value="#{shipping.destinationCountry.name}" />
</rich:column>
<!-- other columns here -->
</rich:dataTable>
{code}
But the a4j:ajax isn't triggered (not at all, it's NOT a param assignment issue). To start having something that responds, one needs to remove the a4j:param and do it EL-newlook style.
{code:xml|title="RF 4 Sample 2"}
<a4j:ajax event="rowclick" render="shippingEditForm" listener="#{shippingEdit.setId(shipping.id)}"/>
{code}
Anyhow we're close to RF-11446 and whenever that one gets fixed, one should check whether this case here is also solved.
But wait, even that doesn't work: when one clicks on a row with that code, the listener is called but an ArrayIndexOutOfBoundsException is thrown because the clientID that's actually passed into UIDataAdapter#invokeOnRow is the id of the dataTable itself, NOT this of the row/cell. Hence, String rowId = clientId.substring(baseId.length() + 1) ends up tragically.
So...to make it really work, you have to do what's described here: https://community.jboss.org/thread/174063 and not fall into the trap of RF-11446.
Working code (RF 4.2.3+)
{code:xml:xml|title="RF 4 Sample 3"}
<a4j:jsFunction name="shippingListRowClick" render="shippingEditForm">
<a4j:param name="shippingId" assignTo="#{shippingEdit.id}"/>
</a4j:jsFunction>
<rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping" onrowclick="shippingListRowClick(#{shipping.id});">
<rich:column>
<f:facet name="header">
<h:outputText value="Destination"/>
</f:facet>
<h:outputText value="#{shipping.destinationCountry.name}" />
</rich:column>
<!-- other columns here -->
</rich:dataTable>
{code}
All that...for that.
Overall that makes quite a difference between RF 3.3 and RF 4.x. I'd say we have a couple of regressions. Or at least that needs an extra clarification in the documentation and migration guide. Thank you.
was:
During my migration from RF 3.3 I found this:
Before (with RF 3.3.3):
{code:xml|title="RF 3 Sample"}
<rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
<a4j:support event="onRowClick" reRender="shippingEditForm">
<a4j:actionparam name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
</a4j:support>
<rich:column>
<f:facet name="header">
<h:outputText value="Destination"/>
</f:facet>
<h:outputText value="#{shipping.destinationCountry.name}" />
</rich:column>
<!-- other columns here -->
</rich:dataTable>
{code}
There was nothing really impacting on the migration guide
https://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-C...
So I logically did that with RF4.x.x:
{code:xml|title="RF 4 Sample 1"}
<rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
<a4j:ajax event="rowclick" render="shippingEditForm">
<a4j:actionparam name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
</a4j:ajax>
<rich:column>
<f:facet name="header">
<h:outputText value="Destination"/>
</f:facet>
<h:outputText value="#{shipping.destinationCountry.name}" />
</rich:column>
<!-- other columns here -->
</rich:dataTable>
{code}
But the a4j:ajax isn't triggered (not at all, it's NOT a param assignment issue). To start having something that responds, one needs to remove the a4j:param and do it EL-newlook style.
{code:xml|title="RF 4 Sample 2"}
<a4j:ajax event="rowclick" render="shippingEditForm" listener="#{shippingEdit.setId(shipping.id)}"/>
{code}
Anyhow we're close to RF-11446 and whenever that one gets fixed, one should check whether this case here is also solved.
But wait, even that doesn't work: when one clicks on a row with that code, the listener is called but an ArrayIndexOutOfBoundsException is thrown because the clientID that's actually passed into UIDataAdapter#invokeOnRow is the id of the dataTable itself, NOT this of the row/cell. Hence, String rowId = clientId.substring(baseId.length() + 1) ends up tragically.
So...to make it really work, you have to do what's described here: https://community.jboss.org/thread/174063 and not fall into the trap of RF-11446.
Working code (RF 4.2.3+)
{code:xml:xml|title="RF 4 Sample 3"}
<a4j:jsFunction name="shippingListRowClick" render="shippingEditForm">
<a4j:param name="shippingId" assignTo="#{shippingEdit.id}"/>
</a4j:jsFunction>
<rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping" onrowclick="shippingListRowClick(#{shipping.id});">
<rich:column>
<f:facet name="header">
<h:outputText value="Destination"/>
</f:facet>
<h:outputText value="#{shipping.destinationCountry.name}" />
</rich:column>
<!-- other columns here -->
</rich:dataTable>
{code}
All that...for that.
Overall that makes quite a difference between RF 3.3 and RF 4.x. I'd say we have a couple of regressions. Or at least that needs an extra clarification in the documentation and migration guide. Thank you.
> rich:dataTable rowclick with nested f:param
> -------------------------------------------
>
> Key: RF-12647
> URL: https://issues.jboss.org/browse/RF-12647
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tables
> Affects Versions: 4.3.0.M2
> Environment: Win7, JDK7, Glassfish3, Mojarra 2.1.14, SeamFaces, RF 4.x.x
> Reporter: Fab Mars
> Labels: waiting_on_user
>
> During my migration from RF 3.3 I found this:
> Before (with RF 3.3.3):
> {code:xml|title="RF 3 Sample"}
> <rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
> <a4j:support event="onRowClick" reRender="shippingEditForm">
> <a4j:actionparam name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
> </a4j:support>
> <rich:column>
> <f:facet name="header">
> <h:outputText value="Destination"/>
> </f:facet>
> <h:outputText value="#{shipping.destinationCountry.name}" />
> </rich:column>
> <!-- other columns here -->
> </rich:dataTable>
> {code}
> There was nothing really impacting on the migration guide
> https://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-C...
> So I logically did that with RF4.x.x:
> {code:xml|title="RF 4 Sample 1"}
> <rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
> <a4j:ajax event="rowclick" render="shippingEditForm">
> <a4j:param name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
> </a4j:ajax>
> <rich:column>
> <f:facet name="header">
> <h:outputText value="Destination"/>
> </f:facet>
> <h:outputText value="#{shipping.destinationCountry.name}" />
> </rich:column>
> <!-- other columns here -->
> </rich:dataTable>
> {code}
> But the a4j:ajax isn't triggered (not at all, it's NOT a param assignment issue). To start having something that responds, one needs to remove the a4j:param and do it EL-newlook style.
> {code:xml|title="RF 4 Sample 2"}
> <a4j:ajax event="rowclick" render="shippingEditForm" listener="#{shippingEdit.setId(shipping.id)}"/>
> {code}
> Anyhow we're close to RF-11446 and whenever that one gets fixed, one should check whether this case here is also solved.
> But wait, even that doesn't work: when one clicks on a row with that code, the listener is called but an ArrayIndexOutOfBoundsException is thrown because the clientID that's actually passed into UIDataAdapter#invokeOnRow is the id of the dataTable itself, NOT this of the row/cell. Hence, String rowId = clientId.substring(baseId.length() + 1) ends up tragically.
> So...to make it really work, you have to do what's described here: https://community.jboss.org/thread/174063 and not fall into the trap of RF-11446.
> Working code (RF 4.2.3+)
> {code:xml:xml|title="RF 4 Sample 3"}
> <a4j:jsFunction name="shippingListRowClick" render="shippingEditForm">
> <a4j:param name="shippingId" assignTo="#{shippingEdit.id}"/>
> </a4j:jsFunction>
> <rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping" onrowclick="shippingListRowClick(#{shipping.id});">
> <rich:column>
> <f:facet name="header">
> <h:outputText value="Destination"/>
> </f:facet>
> <h:outputText value="#{shipping.destinationCountry.name}" />
> </rich:column>
> <!-- other columns here -->
> </rich:dataTable>
> {code}
> All that...for that.
> Overall that makes quite a difference between RF 3.3 and RF 4.x. I'd say we have a couple of regressions. Or at least that needs an extra clarification in the documentation and migration guide. Thank you.
--
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
11 years, 11 months
[JBoss JIRA] (RF-12647) rich:dataTable rowclick with nested f:param
by Fab Mars (JIRA)
[ https://issues.jboss.org/browse/RF-12647?page=com.atlassian.jira.plugin.s... ]
Fab Mars commented on RF-12647:
-------------------------------
Yes I did, else it wouldn't run. It's just a typo here. Correcting it. I'll try to make a sample project tonight (CET).
> rich:dataTable rowclick with nested f:param
> -------------------------------------------
>
> Key: RF-12647
> URL: https://issues.jboss.org/browse/RF-12647
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tables
> Affects Versions: 4.3.0.M2
> Environment: Win7, JDK7, Glassfish3, Mojarra 2.1.14, SeamFaces, RF 4.x.x
> Reporter: Fab Mars
> Labels: waiting_on_user
>
> During my migration from RF 3.3 I found this:
> Before (with RF 3.3.3):
> {code:xml|title="RF 3 Sample"}
> <rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
> <a4j:support event="onRowClick" reRender="shippingEditForm">
> <a4j:actionparam name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
> </a4j:support>
> <rich:column>
> <f:facet name="header">
> <h:outputText value="Destination"/>
> </f:facet>
> <h:outputText value="#{shipping.destinationCountry.name}" />
> </rich:column>
> <!-- other columns here -->
> </rich:dataTable>
> {code}
> There was nothing really impacting on the migration guide
> https://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-C...
> So I logically did that with RF4.x.x:
> {code:xml|title="RF 4 Sample 1"}
> <rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping">
> <a4j:ajax event="rowclick" render="shippingEditForm">
> <a4j:actionparam name="shippingId" value="#{shipping.id}" assignTo="#{shippingEdit.id}"/>
> </a4j:ajax>
> <rich:column>
> <f:facet name="header">
> <h:outputText value="Destination"/>
> </f:facet>
> <h:outputText value="#{shipping.destinationCountry.name}" />
> </rich:column>
> <!-- other columns here -->
> </rich:dataTable>
> {code}
> But the a4j:ajax isn't triggered (not at all, it's NOT a param assignment issue). To start having something that responds, one needs to remove the a4j:param and do it EL-newlook style.
> {code:xml|title="RF 4 Sample 2"}
> <a4j:ajax event="rowclick" render="shippingEditForm" listener="#{shippingEdit.setId(shipping.id)}"/>
> {code}
> Anyhow we're close to RF-11446 and whenever that one gets fixed, one should check whether this case here is also solved.
> But wait, even that doesn't work: when one clicks on a row with that code, the listener is called but an ArrayIndexOutOfBoundsException is thrown because the clientID that's actually passed into UIDataAdapter#invokeOnRow is the id of the dataTable itself, NOT this of the row/cell. Hence, String rowId = clientId.substring(baseId.length() + 1) ends up tragically.
> So...to make it really work, you have to do what's described here: https://community.jboss.org/thread/174063 and not fall into the trap of RF-11446.
> Working code (RF 4.2.3+)
> {code:xml:xml|title="RF 4 Sample 3"}
> <a4j:jsFunction name="shippingListRowClick" render="shippingEditForm">
> <a4j:param name="shippingId" assignTo="#{shippingEdit.id}"/>
> </a4j:jsFunction>
> <rich:dataTable id="shippingList" value="#{billingLister.allShippings}" var="shipping" onrowclick="shippingListRowClick(#{shipping.id});">
> <rich:column>
> <f:facet name="header">
> <h:outputText value="Destination"/>
> </f:facet>
> <h:outputText value="#{shipping.destinationCountry.name}" />
> </rich:column>
> <!-- other columns here -->
> </rich:dataTable>
> {code}
> All that...for that.
> Overall that makes quite a difference between RF 3.3 and RF 4.x. I'd say we have a couple of regressions. Or at least that needs an extra clarification in the documentation and migration guide. Thank you.
--
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
11 years, 11 months
[JBoss JIRA] (RF-12360) rich:picklist using f:ajax wired to the event "change" does nothing
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12360?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12360:
-------------------------------
Labels: valueChangeListener (was: )
> rich:picklist using f:ajax wired to the event "change" does nothing
> -------------------------------------------------------------------
>
> Key: RF-12360
> URL: https://issues.jboss.org/browse/RF-12360
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-selects
> Reporter: Dupont Dupont
> Assignee: Brian Leathem
> Labels: valueChangeListener
> Fix For: 4.3.0.M2
>
>
> I wanted to know if anyone has succesfully wired an ajax behaviour to a picklist component on the change event.
> {code}
> <rich:pickList value="#{listSelectBean.selectedCapitals}"
> listWidth="170px" listHeight="100px"
> orderable="true">
> <f:selectItems value="#{listSelectBean.capitals}" var="capital" itemValue="#{capital}" itemLabel="#{capital.name}" />
> <f:ajax event="change" execute="@this" render="dependentFields"/>
> </rich:picklist>
> {code}
> Adding an onchange event handler on the component does not produce any effect. onchange="alert('Changed');"
--
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
11 years, 11 months