myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Korherr <jakob.korh...@gmail.com>
Subject Re: ValueChangeListener + composite components
Date Wed, 16 Mar 2011 15:20:38 GMT
Here is the code from FaceletViewDeclarationLanguage.retargetMethodExpressions:

UIComponent innerComponent = topLevelComponent.findComponent(target);
if (innerComponent == null)
{
    if (log.isLoggable(Level.SEVERE))
        log.severe("Inner component " + target + " not found when
retargetMethodExpressions");
    continue;
}

...with topLevelComponent beeing the composite component. Thus, in
your example, your composite component needs to be able to find the
target component via findComponent().

Please refer to the javadoc of findComponent() and check if it is
implement correctly on all the components inside your composite
component. My guess is that the parent component of the f:facet does
not check his facets in findComponent().

Regards,
Jakob

2011/3/16 ZEILERBAUER Matthias <MATTHIAS.ZEILERBAUER@tirol.gv.at>:
> Doesn't work. I already proved it.
>
> LG Matthias
>
> -----Ursprüngliche Nachricht-----
> Von: sethfromaustria@gmail.com [mailto:sethfromaustria@gmail.com] Im Auftrag von Jakob
Korherr
> Gesendet: Mittwoch, 16. März 2011 16:03
> An: MyFaces Development
> Cc: ZEILERBAUER Matthias
> Betreff: Re: ValueChangeListener + composite components
>
> Hi Matthias,
>
> Try using the relative clientid of the h:inputText from within your
> composite component, thus something like
> container1:container2:inputComponent.
>
> Also, please ask questions like this one only at
> users@myfaces.apache.org, thanks.
>
> Regards,
> Jakob
>
> 2011/3/16 ZEILERBAUER Matthias <MATTHIAS.ZEILERBAUER@tirol.gv.at>:
>> Hello guys,
>>
>> I have a problem with the valueChangeListener on my composite component. I =
>>
>> have following structure:
>>
>> <composite:interface name=3D"checkbox">
>>
>> ...
>>
>> <composite:attribute name=3D"valueChangeListener" targets=3D"inputComponent=
>>
>> " />
>>
>> ...
>>
>> </composite:interface>
>>
>> <composite:implementation>
>>
>> <template:c1>
>>
>> ...
>>
>> <f:facet name=3D"inputFacet">
>>
>> <h:inputText id=3D"inputComponent" />
>>
>> </f:facet>
>>
>> ...
>>
>> </template:c1>
>>
>>
>>
>>
>>
>> My error message is:
>>
>> "FaceletViewDe E Inner component valueChangeListener not found when retarge=
>>
>> tMethodExpressions"
>>
>> When I tried to give the
>>
>> <composite:attribute name=3D"valueChangeListener" targets=3D"inputComponent=
>>
>> " /> on my c1-Interface the Error-Message didn't appear, but the ValueChang=
>>
>> eListener still wasn't called.
>>
>> Second thing I tried was to give the
>>
>> <h:inputText id=3D"inputComponent" /> not in the facet-Definition, but only=
>>
>> in my implementation and then the ValueChangeListener worked.
>>
>> What is my mistake, or does composition not work properly with facets?
>>
>> LG
>>
>>
>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Mime
View raw message