In Lutece, we can distinguish two types of page :
The Applications made of XPages can add features such as :
The applications are thus completely binded to the site. They consists of menus, banners, style sheets of the portal. Their graphical appearance will also change during a website upgrade thus no additional work is needed.
An extended page can be distinguished when the url of the page has a page parameter and not id_page as classical pages of the site.
For exemple, http://myhost/lutece/jsp/site/Portal.jsp?page=map to obtain the site map.
The parameter specified the plugin name containing the XPageApp.
Note : By convention, we design this parameter in the form : <xpage>.
When the parameter <page> is detected in the request, the class fr.paris.lutece.portal.web.PortalJspBean (entry page of Lutece) calls to the method :
public String getPage( HttpServletRequest request , int nMode )
All the XPageApp must be implement the interface : fr.paris.lutece.portal.web.xpages.XPageApplication.
It defines the following method :
public String getContent( HttpServletRequest request, int nMode, Plugin plugin );
which returns the page content relative to the parameters contained in the request, of mode (normal or administration) and the instance of the plugin for which it was instanciated. (The same class can be instanciated in different contexts).
XPageService calls this method and fills a structure XPage with the XPage's own data :
If the XPageApp developed needs an additional processing JSP (such as sending a message to the contact page), the JSP should be placed in the folder : portal/jsp/site/plugins/<myplugin>. The only imposed ruled is inclusion in the file header :
<%@ page errorPage="../../ErrorPagePortal.jsp" %> <jsp:include page="../../PortalHeader.jsp" />
There is no automatic links towards the XPages on Lutece.
Normally, the XPages are accessible from the menu situated on the banner.
Adding an extended page from a properties file do not add automatically the XPage in the menu. The menu is a static menu, the links are written in hard in the template : dur dans le template : WEB-INF/templates/skin/site/page_menu_tools.html.
A LinkService allows to insert from a Wysiwyg HTML editor an article or an HTML portlet, alink towards XPages on the web site.
Administrative functions are generally needed to manage the backoffice fetaures.
To create for the same plugin, administrative functions [ HOWTO - Create functions d'administration ]
The application must be declared in the XML file of the plugin as follows :
<!-- Application XPage -->
<application>
<application-class>fr.paris.lutece.plugins.myplugin.web.MyPluginApp</application-class>
<application-roles>role1,role2</application-roles>
</application>