sdo.daemon
Jun 12th, 2007, 09:16 PM
Hello experts!
I have a problem while accessing spring beens via jsf environment.
The problem is in DelegatingVariableResolver.
in my jsf page i have
<ice:commandButton value="Submit" action="#{uiLogin.signalEvent}" />
in faces-config
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableReso lver
</variable-resolver>
uiLogin been has method
public String signalEvent()
{
return (Constants.LOGIN_SUCCESS);
}
and declaration in spring container of this been:
<bean id="uiLogin" class="ua.com.palma.web.ui.UiLoginImpl"
scope="session">
<property name="personService">
<ref bean="personService" />
</property>
<property name="loginService">
<ref bean="loginService" />
</property>
</bean>
when i press on commandButton action signalEvent() does not executes.
If i comment this code in faces-config
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableReso lver
</variable-resolver>
and place there uiLogin definition without initing properties with spring been everything works good: action executes.
What is the reason of this bug in my app, and how to work around.
besides i tried to use ApplicationContext ctx = FacesContextUtils.getWebApplicationContext(FacesCo ntext.getCurrentInstance()); to instantate spring beens implicitly - but after this the result same - action does not executes.
I have a problem while accessing spring beens via jsf environment.
The problem is in DelegatingVariableResolver.
in my jsf page i have
<ice:commandButton value="Submit" action="#{uiLogin.signalEvent}" />
in faces-config
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableReso lver
</variable-resolver>
uiLogin been has method
public String signalEvent()
{
return (Constants.LOGIN_SUCCESS);
}
and declaration in spring container of this been:
<bean id="uiLogin" class="ua.com.palma.web.ui.UiLoginImpl"
scope="session">
<property name="personService">
<ref bean="personService" />
</property>
<property name="loginService">
<ref bean="loginService" />
</property>
</bean>
when i press on commandButton action signalEvent() does not executes.
If i comment this code in faces-config
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableReso lver
</variable-resolver>
and place there uiLogin definition without initing properties with spring been everything works good: action executes.
What is the reason of this bug in my app, and how to work around.
besides i tried to use ApplicationContext ctx = FacesContextUtils.getWebApplicationContext(FacesCo ntext.getCurrentInstance()); to instantate spring beens implicitly - but after this the result same - action does not executes.