I have a problem accessing a bean property through alias.
I expect one call and get 8!
I build a simple application to verify this behavior
If I use this code everything works as expected:
<t:aliasBeansScope>
<h:commandButton action="#{TestBean.commit}" value="commit" id="Submit"/>
<t:aliasBean alias="#{temp}" value="#{SecondBean}" />
<h:outputText value="Value: #{temp.dummy}" />
<t:aliasBeansScope>
I only get one access to the bean property
2008-11-20 11:03:33,007 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 11:03:52,283 [http-8080-1] INFO TestBean - commit called
but if I set the alias directly to the property:
<t:aliasBeansScope>
<h:commandButton action="#{TestBean.commit}" value="commit" id="Submit"/>
<t:aliasBean alias="#{temp}" value="#{SecondBean.dummy}" />
<h:outputText value="Value: #{temp}" />
<t:aliasBeansScope>
I get 3 accesses on page load and additional 5 when i click the button!
--> page load
2008-11-20 10:53:15,218 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:53:15,222 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:53:15,227 [http-8080-1] INFO SecondBean - getDummy:
--> pressing
2008-11-20 10:55:41,940 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:55:41,952 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:55:41,984 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:55:41,987 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:55:41,988 [http-8080-1] INFO SecondBean - getDummy:
2008-11-20 10:55:42,011 [http-8080-1] INFO TestBean - commit called
Anyone can help and tell me what is wrong????
Br
Martin