You saved me many times with this forum, but now I'm really stuck and not now, where to look for more ...
I always get the following error message (warning level, but the method also executes incorrectly):
javax.el.PropertyNotFoundException: Target Unreachable, identifier 'editor' resolved to null: javax.faces.FacesException: #{cc.attrs.selectionListener}
I highlighted the problem for several lines of code:
This is my main file:
<c:forEach items="#{myBean.getEditors()}" var="currentEditor" > <ui:include src="#{currentEditor.getPanel()} > <ui:param name="editor" value="
bean.getEditors () (the scope of the session) simply returns a list with one single record at a time. An โeditorโ is a POJO with some simple attributes and two listening methods. The listener method writes only the log entry. (Must, of course, do more in the future)
The file that is included is as follows:
<h:selectOneMenu value="#{editor.menuValue}> <f:selectItem itemValue="Value 1" /> <f:selectItem itemValue="Value 2" /> <a4j:ajax event="change" listener="#{editor.menutListener()}" /> </h:selectOneMenu> <myComponent:treeComponent id="tree" selectionListener="#{editor.treeListener()} />
The component that I created consists of a richfaces tree, and when I click on node, the following method is called:
<a4j:jsFunction name="performSelection" action="#{cc.attrs.selectionListener} />
I am quite sure that the composition itself is in order, because I use it in different places. When I remove an action from a4j: jsFunction, it also works fine.
For me it smells a bit like JSF 1223 error
The workaround does not work for me - perhaps because I am creating a parameter in forEach.
I had similar problems (ui: param + component) before, but I was able to solve them by specifying the full path as an attribute instead of a parameter. But this does not work here because it is used in too many different places.
Please help, I cannot be the only one with this problem, but I just cannot find other threads for this.
Edit:
Today, with a new mind, I have come even closer to the problem. You can forget all the text include / forEach ...
<myComponent:treeComponent id="tree" selectionListener="#{myBean.getSingleEditor().treeListener()} />
It works, and
<ui:param name="editor" value="#{myBean.getSingleEditor()} /> <myComponent:treeComponent id="tree" selectionListener="
does not work. Well, the JAVA code is executed, but the error is written to the log, and the render and oncomplete jsFunction methods do not work. I also tried using "data" instead of "action" for testing. The error is not logged, but the JAVA method is not even called.