I was able to figure out the solution. I added execute="@this" attribute to the a4j:commandButton and that did the trick. I am not sure why however. I guess the primary mystery is, prior to adding the execute attribute, why the action and setPropertyActionListener methods were called the first time but not the second time.
I guess i still don't understand why this fix made a difference - although I am not complaining. I reread the RichFaces documentation. The snippet is at the end of this reply and is from the link:
So, here is my question: If "@this" is the default behavior why could I only get the aj4:commandButton to work properly if I had this attribute explicitly added. Either the documentation is wrong or there is a bug. Thoughts?
executeattribute allows JSF processing to be limited to defined components. The
executeattribute can point to an
ididentifier of a specific component to process. Components can also be identified through the use of Expression Language (EL).
Hey Daniel, RichFaces, by default, uses @this as defined in standard, except cases where component is put into region - then @region is used instead.
I would try debugging a JSF code:
- put a breakpoint to PropertyBean.setCurrentSelectedProperty
- look into stack who and why invokes it
- remove execute="@this"
- inspect a invocation and find out what differs from previous case