Hi Simon,

many thanks for your quick reply. Yes I can see an entry of the art
...?conversationContext=1 on my Urls. Indeed the value of the context
doesn't change as long as I navigate just over static links like 
./menu.xhtml?conversationContext=v Main page . But when it comes to navigate
over a command action, the conversationContext value changes. This is
specially the case when i activate a button on the JSF page to process some
action and try to redisplay the page through the same bean instance. Thus
this explanes now the missbehavior. And now the big question: Is there a
workaround for those common issue?
I use the ICEFaces library, so the generated button or commandlink shows
something like <input onclick="iceSubmit(form,this,event);return false;"
onfocus="setFocus(this.id);" type="submit" value="Save" />. Maybe this
information can help for better unterstanding.

Thanks in advance for any help.

Cheers,
Hugues


Simon Kitching wrote:
> 
> j4ever schrieb:
>> Hello everyone,
>> i’m developing a web application with JSF, Spring, Hibernate and
>> Orchestra
>> and accoutering  a problem with the orchestra’s  conversation scope. I
>> have
>> configured all my managed beans with Spring and have used thereby a
>> “manual”
>> conversation scope (Orchestra) for some beans.
>> The “session” and “request” beans all work as expected. But for the
>> “manual”
>> beans, I’ve noticed through debugging that the constructor of the bean is
>> called when I submitted the corresponding JSF page (e.g. through a click
>> to
>> a button to execute some action). This is, the bean is initialized again
>> with a new instance, although I have not end the conversation. So the
>> page
>> is redisplayed with the values of the new instance of the bean. This is
>> of
>> course not the behavior I intend to implement. I want the page to be
>> refreshed with the new values of the beans, obtained after action
>> processing. I guess, this is the quintessence of orchestra conversation
>> scoped functionalities and I just don’t understand why I can’t get this
>> work. May be I‘ve Overseen something. So I would appreciate any help.
>> Many thanks in advance.
>> Hugues
>> This is the archestra relevant part of my Spring configuration:
>> <!-- the orchestra conversation scopes -->
>>     <bean
>> class="org.springframework.beans.factory.config.CustomScopeConfigurer">
>>       <property name="scopes">
>>         <map>
>>           <entry key="conversation.access">
>>             <bean
>> class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
>>                      <property name="lifetime" value="access"/>
>>              </bean>
>>           </entry>
>>           <entry key="conversation.manual">
>>             <bean
>> class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
>>               <property name="lifetime" value="manual"/>
>>             </bean>
>>           </entry>
>>         </map>
>>       </property>
>>     </bean>
>> …
>> <bean id="rolesBean"
>>              class="com..accounting.business.beans.RolesBean"
>> scope="conversation.manual">
>>              <aop:scoped-proxy />
>>              <constructor-arg ref="baseDAO" />
>>              <constructor-arg ref="accountingService" />
>>              <constructor-arg ref="messagesManager" />
>>              <constructor-arg ref="login" />
>>      </bean>
>> 
> 
> 
> In the URL shown in your browser, do you see
>    ...?conversationContext=1
> 
> If this query parameter is not there, or if it changes on each request
> then you are getting a new "conversation context" for each request,
> which would explain your problem.
> 
> Orchestra automatically adds this query parameter to all links/forms in
> a page, so this should work automatically. But maybe your app is doing
> something that prevents this query param from being added...
> 
> Regards,
> Simon
> -- 
> -- Emails in "mixed" posting style will be ignored
> -- (http://en.wikipedia.org/wiki/Posting_style)
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Orchestra-Conversation-Scope-tp22078856p22083299.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to