aliasBean which includes elements with valueBinding attribute crashes during
restoreView
----------------------------------------------------------------------------------------
Key: MYFACES-687
URL: http://issues.apache.org/jira/browse/MYFACES-687
Project: MyFaces
Type: Bug
Components: Tomahawk
Versions: Nightly
Reporter: Stefan Betermieux
Hi,
after a long debug session I am pretty sure that there is a bug regarding
aliasBeans during restoreView phase.
consider the following scenario:
An aliasBean which contains elements, one of them has the binding="..."
attribute set, which uses a method in the holder bean.
During LifecycleImpl.restoreView(), the holder bean is initialized only
sometime during the viewHandler.restoreView() call, no problem so far.
During the recursivelyHandleComponentReferencesAndSetValid() the method
bindig.isReadOnly() is called. The holder bean is null, it can't find the
property, it returns false because the general exception is catched. After this
recursivelyHandleComponentReferencesAndSetValid() thinks it can write the
reference and tries to call binding.setValue(). This fails miserably and an
uncaught exception is thrown (javax.faces.el.PropertyNotFoundException: Base is
null: holder).
I don't really know how to fix this, but since my binding is read only anyway,
I would be happy if binding.isReadOnly() returns the more pessimistic "true"
instead of letting binding.setValue() crash. See JIRA MYFACES-686 for my first
take on this issue.
Stefan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira