Hi Bernd,

Dipl. -Ing. Winterstein Bernd schrieb:
> Hello,
> I try to open a new conversation context in a new browser window  when
> navigating to another page.
> The backing bean of the new page is in flash scope. The old one is
> manual scope.
> But when I use the <o:separateConversationContext> tag around the form
> the new page opens the current page again.
> 
> Any ideas?
> 
> Regards,
> Bernd
> 
> <o:separateConversationContext>
>         <h:form>
>             <rich:dataTable id="resultsTable"
> value="#{doctorAnalysisController.results}" var="info" rows="20">
> 
>                 <f:facet name="caption">
>                     <h:outputText value="Suchergebnisse" />
>                 </f:facet>
> 
>                 <rich:column sortBy="#{info.doctor.piaId}">
>                     <f:facet name="header">
>                         <h:outputText value="Nr." />
>                     </f:facet>
> 
>                     <a4j:htmlCommandLink value="#{info.doctor.piaId}"
>                       action="doctorDetails" <!-- navigation to detail
> view -->
>                          
> actionListener="#{contactHistory.addContactId}" <!-- this is a session
> scope utility bean -->
>                       target="_blank" >
>                       <f:attribute name="contactId"
> value="#{info.doctor.id}" />
>                     </a4j:htmlCommandLink>
>                    
>                 </rich:column>
> 
>     ....
>             </rich:dataTable>
>             <rich:datascroller align="left" id="resultsTableScroller"
> for="resultsTable" />
> 
>         </h:form>
> </o:separateConversationContext>

Orchestra intercepts all calls to
    HttpServletResponse.encodeURL(url)
and ensures the param "?conversationContext=n" is added.

Using o:separateConversationContext simply sets a flag to suppress this.

But you are using ajax controls. My suspicion is that when a "partial
submit" occurs, richfaces doesn't process any of the JSF components
outside the activated one. So for example when the a4j:htmlCommandLink
is activated, the o:separateConversationContext component simply never
gets run.

I can't be sure, as I've never tried using an ajax commandLink inside an
o:separateConversationContext tag before. But it seems the most likely
cause.

If this is true, then I'm not sure what the solution could be. If
richfaces really does not support running any ancestor components, then
how can the htmlCommandLink be marked as one that should be "in a new
context"?

Perhaps a custom ActionListener could be created which looks in the
ancestry of the component that triggers the action, and "activates" an
o:separateConversationContext if it finds one. It should be possible to
do this without needing to modify Orchestra itself, ie you wouldn't need
to wait for an Orchestra patch in order to solve this issue (though
obviously it would be good for Orchestra to do this by default).


Regards,
Simon
-- 
-- Emails in "mixed" posting style will be ignored
-- (http://en.wikipedia.org/wiki/Posting_style)

Reply via email to