Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

Chapter 3. Application Overview

The page flow of the application is illustrated in the diagram.


This section covers how the particular elements that govern page flow are implemented in the application.

Technically, user does not browse between pages of the application: every content page is included into the content area of index.xhtml file after a certain action performed by user.


...
<h:panelGroup styleClass="content_box" layout="block">
  <ui:include src="#{model.mainArea.template}" />
</h:panelGroup>
...

The NavigationEnum enumeration encapsulated all possible states, that can be applied to content area ("mainArea") on the page.


...
 public enum NavigationEnum {
    ANONYM("includes/publicShelves.xhtml"),
    FILE_UPLOAD("includes/fileUpload.xhtml"),
    USER_PREFS("includes/userPrefs.xhtml"),
    REGISTER("includes/register.xhtml"),
    SEARCH("includes/search.xhtml"),
    ALBUM_PREVIEW("includes/album.xhtml"),
    ALBUM_IMAGE_PREVIEW("/includes/image.xhtml"),
    SHELF_PREVIEW("/includes/shelf.xhtml"),
    ALL_SHELFS("/includes/userShelves.xhtml"),
    TAGS("includes/tag.xhtml"),
    ALL_ALBUMS("/includes/userAlbums.xhtml"),
    ALL_IMAGES("/includes/userImages.xhtml"),
    ALBUM_IMAGE_EDIT("/includes/imageEdit.xhtml"),
    ALBUM_EDIT("/includes/albumEdit.xhtml"),
    SHELF_EDIT("/includes/shelfEdit.xhtml"),
    SHELF_UNVISITED("/includes/shelfUnvisited.xhtml"),
    USER_SHARED_ALBUMS("/includes/userSharedAlbums.xhtml"),
    USER_SHARED_IMAGES("/includes/userSharedImages.xhtml"),
    ALBUM_UNVISITED("/includes/albumUnvisited.xhtml");
...
}

This class specifies which file is included depending on some user action. The template to be loaded is identified according to some condition in the Controller (Controllor.java) class and is saved to the Model (Model.java). During index.xhtml page rendering the value is taken from the Model to define what should be rendered to the page.