i found something on net, but i don't know how this apply

2- Post-login custom logics: 

 Tiry started the implementation of a simple seam component
name "startupHelper" 
in webapp that is able to select the default server
automatically. This has been 
refactored to use navigationContext as well which now allows
us to get a core 
session at the same time and thus also create  and / or
select an existing 
domain automatically at login time an redirect to the some
default view. 

This component is leveraged by the
nuxeo.war/WEB-INF/pages.xml file that is 
incrementally contracted by OSGI-INF/deployment-fragment.xml
contributions to 
the target name "pages#PAGES". For instance in webapp we
have the following 
default rule: 

    <!-- Post login and 'home' view handler --> 
    <page view-id="/nxstartup.xhtml" 
     
action="#{startupHelper.initDomainAndFindStartupPage('Default
domain', 
'view')}" /> 

This will select the default server and redirect the user to
the "view" display 
of her default domain if any, or create the domain with
title "Default domain" 
if missing, If many servers or many domain are available,
the user will still 
have to choose each with the "view_servers" and
"view_domains" view as previously. 

To customize that behaviour, you can change the view id by
insterting a new rule 
in you custom project such as: 

    <page view-id="/nxstartup.xhtml" 
     
action="#{startupHelper.initDomainAndFindStartupPage('Default
domain', 
'user_dashboard')}" /> 

That will do the same as previously be and redirect the user
to her dashboard 
instead of the domain default view. 

You can also implement your own logics in a seam component
that delegates part 
of the work to the public methods of the default
StartupHelper class. And then 
put in your OSGI-INF/deployment-fragment.xml : 

  <extension target="pages#PAGES"> 

    <page view-id="/nxstartup.xhtml" 
      action="
#{myCustomStartupHelper.initSomethingAndFindStartupPage('Def
ault 
domain title', 'some_view_id')}" /> 

  </extension> 

If you mark your project as dependent of the nuxeo.jar
project, this rule will 
be inserted after the webapp default rule in the deployed 
'nuxeo.war/WEB-INF/pages.xml' file and thus will override
it. 

i made custom the nuxeo-platform-webapp-sr-5.4.2.jar and my
pages.xml look like


<?xml version="1.0" encoding="UTF-8"?>

<pages>

  
<page
    action="
#{myCustomStartupHelper.initSomethingAndFindStartupPage('Def
ault domain title', 'some_view_id')}"
view-id="/nxstartup.xhtml"/>

<!--  bind url for forced invalidation of nav tree -->
<page action="#{treeInvalidator.forceTreeRefresh}"
view-id="/invalidateTree.xhtml"/>
<page action="#{treeActions.forceTreeRefresh}"
view-id="/invalidateConversationTree.xhtml"/>

<!-- This calls a method which load the Workspace logo -->
<page action="#{logoHelper.getLogo}"
view-id="/showLogo.xhtml"/>
<page action="#{navigationContext.navigateToURL}"
view-id="/getDocument.xhtml"/>
<page action="#{liveEditHelper.getBootstrap()}"
view-id="/nxliveedit.xhtml"/>
<page action="#{paralleleNavigationHelper.navigateToURL}"
view-id="/parallele.xhtml"/>
<page
   
action="#{startupHelper.initDomainAndFindStartupPage('Default
domain', 'view')}" view-id="/nxstartup.xhtml"/>
<page view-id="/view_domains.xhtml">
     
#{currentServerLocation.name}/#{currentTabAction.label}
    </page>
<page view-id="/select_document_type.faces.xhtml">
      Create new document in #{currentDocument.name}
    </page>
<page view-id="/create_document.faces.xhtml">
      Create new document in #{currentDocument.name}
    </page>
<page view-id="/search/search_form.xhtml">
      breadcrumb=command.advancedSearch
    </page>

<page view-id="/search/tag_search_results.xhtml">
      breadcrumb=label.virtualnavigation.tag
    </page>

<!-- Bind url to start the download -->
<page action="#{externalLinkManager.startDownload()}"
view-id="/nxconnectDownload.xhtml"/>

<page view-id="/coverage_virtual_navigation.xhtml">
      breadcrumb=label.virtualnavigation.coverage
    </page>
<page view-id="/subjects_virtual_navigation.xhtml">
      breadcrumb=label.virtualnavigation.subjects
    </page>

<page action="#{syndication.getSyndicationDocument}"
view-id="/getSyndicationDocument.xhtml"/>
<page action="#{syndication.getSyndicationSearch}"
view-id="/getSyndicationSearch.xhtml"/>


</pages>
 but this doesn't solve problem. anybody halp me?
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/

Reply via email to