I 'm not sure I 've well understood :
So I set a custom negotiation strategy in the theme-contrib.xml customizing a
ViewId scheme (see attachment) :
<negotiation object="theme" strategy="myNego">
<scheme>org.myplugin.MyViewId</scheme>
<scheme>org.nuxeo.theme.jsf.negotiation.theme.RequestParameter</scheme>
<scheme>org.nuxeo.theme.jsf.negotiation.theme.CookieValue</scheme>
<scheme>org.nuxeo.ecm.webapp.theme.negotiation.LocalTheme</scheme>
<scheme>org.nuxeo.theme.jsf.negotiation.theme.DefaultTheme</scheme>
</negotiation>
I followed with the negotiation application ad from the documentation :
<extension target="org.nuxeo.theme.services.ThemeService"
point="applications">
<application root="/nuxeo">
<negotiation>
<strategy>adeo</strategy>
<default-engine>default</default-engine>
<default-theme>default/default</default-theme>
<default-perspective>default</default-perspective>
</negotiation>
</application>
<resource-caching>
<lifetime>36000</lifetime>
</resource-caching>
<view id="/create_relation_search_document_popup.xhtml">
<theme>default/popup</theme>
</view>
<view id="/user_dashboard.xhtml">
<theme>default/user_dashboard</theme>
</view>
<view id="/view_calendar.xhtml">
<perspective>view_calendar</perspective>
</view>
<view id="/print.xhtml">
<perspective>print</perspective>
</view>
</application>
</extension>
But then when logging in I got an error message : "negotiation default values
not set". Well I think that what I 've just done....
Did I do not understand what you try to explain ?
Thanks,
Olivier
-----Message d'origine-----
De : Jean-Marc Orliaguet [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 26 juin 2008 13:07
À : DUHART Olivier
Cc : [email protected]
Objet : Re: [Ecm] set nxthemes.theme cookie prevent dashboard to display
DUHART Olivier wrote:
>
> Hello,
>
>
>
> I 've found a problem with an action I added to my nuxeo plugin : a
> one click possibilty to change the current theme. For this the action
>
> Set the nxthemes.theme cookie with the wanted theme/page value. But it
> appeared that when the cookie is set it is then impossible
>
> To display the dashboard page (and to open popup link too) . I guessed
> that it is because they use their own layout page so the layout page
>
> Cookie value must collid with it and prevents the dashboard to display
> properly (and so for popup link). But I don't really understand
>
> Why nuxeo server (EP 5.1.4) can't choose the proper layout page. Is
> there anything else that I missed ?
>
>
>
> Thanks in advance,
>
>
>
> Olivier
>
>
Hi, the negotiation order is:
- URL parameter
- cookie
- view id <-> theme/page association
- local themes
- default theme
see in
nuxeo-platform-webapp-core/src/main/resources/OSGI-INF/theme-contrib.xml
<negotiation object="theme" strategy="nuxeo5">
<scheme>org.nuxeo.theme.jsf.negotiation.theme.RequestParameter</scheme>
<scheme>org.nuxeo.theme.jsf.negotiation.theme.CookieValue</scheme>
<scheme>org.nuxeo.theme.jsf.negotiation.theme.ViewId</scheme>
<!-- local theme (specific to nuxeo5) -->
<scheme>org.nuxeo.ecm.webapp.theme.negotiation.LocalTheme</scheme>
<scheme>org.nuxeo.theme.jsf.negotiation.theme.DefaultTheme</scheme>
</negotiation>
you could add your own negotiation plugin and have it override the view
id information except for the dashboard view.
see also the following parameters, these can be changed:
<negotiation>
<strategy>nuxeo5</strategy>
<default-engine>default</default-engine>
<default-theme>default/default</default-theme>
<default-perspective>default</default-perspective>
</negotiation>
/JM
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm