[
https://issues.jboss.org/browse/RF-11469?page=com.atlassian.jira.plugin.s...
]
Lukáš Fryč edited comment on RF-11469 at 9/11/13 10:14 AM:
-----------------------------------------------------------
Note: This works fine with RF5 Autocomplete
([
components-demo|https://github.com/richfaces/richfaces/tree/master/exampl...]):
{code:html|title=autocomplete-rf-11469.xhtml}
<h:form>
<ui:include src="autocomplete-rf-11469-included.xhtml">
<ui:param name="bean" value="#{autocompleteBean}" />
</ui:include>
</h:form>
{code}
{code:html|title=autocomplete-rf-11469.xhtml}
<r:autocomplete id="autocomplete" mode="ajax"
autocompleteMethod="#{bean.suggest}" var="p"
fetchValue="#{p.name}">
#{p.name}
</r:autocomplete>
{code}
It works right with RF4 and CDI beans as well:
https://github.com/lfryc/dev-examples/tree/RF-11469-autocomplete-method-d...
was (Author: lfryc):
Note: This works fine with RF5 Autocomplete
([
components-demo|https://github.com/richfaces/richfaces/tree/master/exampl...]):
{code:html|title=autocomplete-rf-11469.xhtml}
<h:form>
<ui:include src="autocomplete-rf-11469-included.xhtml">
<ui:param name="bean" value="#{autocompleteBean}" />
</ui:include>
</h:form>
{code}
{code:html|title=autocomplete-rf-11469.xhtml}
<r:autocomplete id="autocomplete" mode="ajax"
autocompleteMethod="#{bean.suggest}" var="p"
fetchValue="#{p.name}">
#{p.name}
</r:autocomplete>
{code}
autocomplete method does not resolve bean if ui:included
--------------------------------------------------------
Key: RF-11469
URL:
https://issues.jboss.org/browse/RF-11469
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-input
Affects Versions: 4.0.0.Final
Reporter: u j
Assignee: Lukáš Fryč
Priority: Minor
Labels: waiting_on_user
Attachments: RF-11469.zip
Original Estimate: 45 minutes
Remaining Estimate: 45 minutes
A bean parameter in the autocomplete method is not resolved if the rich:autocomplete is
part of a ui:include.
{code}
<ui:include src="/searchlocation.xhtml">
<ui:param name="bean" value="#{searchBean}" />
</ui:include>
{code}
searchlocation.xhtml contains:
{code}
<rich:autocomplete id="cityName" mode="ajax"
value="#{bean.cityName}" autocompleteMethod="#{bean.suggestCities}"
/>
{code}
The value binding works, but the binding in the autocompleteMethod gives:
{code}
15:26:15,809 SEVERE [org.richfaces.log.Renderkit] (ajp-127.0.0.1-127.0.0.1-8009-1) Target
Unreachable, identifier 'bean' resolved to null:
javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved
to null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:75)
[jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.el.parser.AstValue.invoke(AstValue.java:183)
[jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
[jbossweb-7.0.1.Final.jar:7.0.1.Final]
at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.richfaces.renderkit.AutocompleteRendererBase.getItems(AutocompleteRendererBase.java:105)
[richfaces-components-ui-4.0.0-20110322.220419-243.jar:]
at
org.richfaces.renderkit.AutocompleteRendererBase.encodeItems(AutocompleteRendererBase.java:160)
[richfaces-components-ui-4.0.0-20110322.220419-243.jar:]
at
org.richfaces.renderkit.AutocompleteRendererBase.encodeMetaComponent(AutocompleteRendererBase.java:271)
[richfaces-components-ui-4.0.0-20110322.220419-243.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