Hello,

In my application I have some managed-bean, which implements some
Observer-like pattern to notify other beans of some action, so that
those beans can refresh their state.

In order to do so I added a List<RefreshableBean> to my bean on which
the action is invoked, which will call the refresh() method on all the
objects in the list.

In my faces-config.xml I added a managed-property on the bean with a
list of entries of managed-bean to notify like this:

<managed-bean>
        <managed-bean-name>messageAddBean</managed-bean-name>
        <managed-bean-class>tld.domain.application.MessageAddBean
        </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
                <property-name>refreshableBeans</property-name>
                <list-entries>
                        <value>#{messageSearchBean}</value>
                        <value>#{pendingOpenMessageList}</value>
                        <value>#{pendingUrgentMessageList}</value>
                </list-entries>
        </managed-property>
</managed-bean>

What happens when I invoke the bean, which should call all
refreshableBeans is that it will iterate over all elements in the list,
but the list will only contain the first entry from the list ( the
messageSearchBean  ). If I change the order of the values in the xml,
then the entry which is then the first one will be set in my list.

All referenced managed-bean have <scope>session</scope>, so they should
be available.

Am I doing something wrong or does myfaces ignore the other entries in
the list?
I'm currently using MyFaces-1.1.5-snapshop, but noticed this already
when I still was using 1.1.3.

I'm also using jsf-spring, so that might be the cause of the problem,
but  thought I ask here first.

Anybody seen this kind of behaviour?

Any help is greatly appreciated!

With kind regards,
  Marco Beelen


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

------------------------------------------------------------------------------

Reply via email to