[
https://issues.apache.org/jira/browse/MYFACES-4589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17698204#comment-17698204
]
Manuel K commented on MYFACES-4589:
-----------------------------------
Thank you for taking a look! After your first comment I thought that should
definitely be the problem. Too bad it didn't help :(
Is there anyone else in the MyFaces team that has the time to take a look? I
don't think I have the JSF knowledge to find the bug myself. Do you think
someone will be able to make time in the coming weeks or is it unlikely?
Do you know of a workaround, other than using unique attribute/parameter names?
Thanks!
> PropertyNotFoundException in nested components if attribute has same name as
> bean
> ---------------------------------------------------------------------------------
>
> Key: MYFACES-4589
> URL: https://issues.apache.org/jira/browse/MYFACES-4589
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 4.0.0, 4.0.1
> Environment: primefaces-test project, jakarta branch
> Reporter: Manuel K
> Priority: Major
>
> I apologize in advance if this one is a SOB to debug and hopefully fix. Maybe
> not though?
> Given the following nested component structure:
> panel (composite component) -> panel (taglib component) -> departmentInfo
> (composite component) -> outputIconText (composite component) -> icon (taglib
> component)
> The panel composite component and the panel taglib component have an
> attribute called "color". The departmentInfo component uses "color" in an EL
> expression, which is supposed to be a call to a named bean "Color":
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <ui:component xmlns="http://www.w3.org/1999/xhtml"
> xmlns:cc="http://xmlns.jcp.org/jsf/composite"
> xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
> xmlns:test="http://xmlns.jcp.org/jsf/composite/components">
> <cc:interface>
> <cc:attribute name="value"
> required="true"
> type="org.primefaces.test.Department"/>
> </cc:interface>
> <cc:implementation>
> <div id="#{cc.clientId}">
> <test:outputIconText icon="#{icon.test} #{color.blue}"
> value="#{cc.attrs.value.name}"/>
> </div>
> </cc:implementation>
> </ui:component> {code}
> Somehow it seems to be interpreted as the attribute though, because the
> following exception occurs:
> {code:java}
> Caused by: jakarta.el.PropertyNotFoundException: Property [blue] not found on
> type [java.lang.String]
> at jakarta.el.BeanELResolver$BeanProperties.get (BeanELResolver.java:251)
> {code}
> The exception occurs only using MyFaces ({_}mvn clean jetty:run
> -Pmyfaces40{_}) but works using Mojarra ({_}mvn clean jetty:run
> -Pmojarra40{_}). You can find my reproducer here:
> [https://github.com/mkomko/primefaces-test/tree/expression-error-property-not-found]
> Of course, _org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY_ is set to
> _true_ but it does not matter in this case.
> Thank you very much in advance!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)