Class Navigator

  • All Implemented Interfaces:
    java.io.Serializable

    public class Navigator
    extends java.lang.Object
    implements java.io.Serializable

    Functional navigator.
    Contains the full history and the current railway.
    System parameter RAILWAY: max railway length, not limited if = 0, empty if lower than 0
    System parameter SHOW_NAVIGATOR: "yes" to display the nav, "no" to hide

    See Also:
    Serialized Form
    • Field Detail

      • HOME

        public static final java.lang.String HOME
        Home page
      • NONE

        public static final java.lang.String NONE
        Do not change the railway
        See Also:
        Constant Field Values
      • RESET

        public static final java.lang.String RESET
        Reset the railway, url parameter nav=reset
        See Also:
        Constant Field Values
      • ADD

        public static final java.lang.String ADD
        Add in the current railway, url parameter nav=add
        See Also:
        Constant Field Values
      • NEW

        public static final java.lang.String NEW
        Add in a new railway, url parameter nav=new
        See Also:
        Constant Field Values
      • HIDE

        public static final java.lang.String HIDE
        Hide the railway, url parameter nav=hide
        See Also:
        Constant Field Values
    • Constructor Detail

      • Navigator

        public Navigator()
        Contructor
    • Method Detail

      • getHistory

        public java.util.List<Navigator.HistoryItem> getHistory()
        Get history
        Returns:
        List of history items
      • getRailwayLength

        public int getRailwayLength()
        Get railway length
        Returns:
        Railway length
      • setRailwayLength

        public void setRailwayLength​(int l)
        Set railway length
        Parameters:
        l - Railway length
      • isLoaded

        public boolean isLoaded()
        Is loaded?
        Returns:
        True if loaded
      • init

        public void init​(Grant g)
        Prepare the navigator
        Parameters:
        g - User rights
      • add

        public Navigator.HistoryItem add​(java.lang.String url,
                                         java.lang.String display)
        Add a URL to the navigation
        Parameters:
        url - Any URL displayed in the work zone
        display - Label to display for this URL
        Returns:
        The related new or existing item
      • add

        public Navigator.HistoryItem add​(java.lang.String url,
                                         java.lang.String display,
                                         boolean rowNav)
        Add a URL to the navigation
        Parameters:
        url - Any URL displayed in the work zone
        display - Label to display for this URL
        rowNav - row navigation in a list ?
        Returns:
        The related new or existing item
      • getURLForm

        public java.lang.String getURLForm​(ObjectDB object)
      • getURLList

        public java.lang.String getURLList​(ObjectDB object)
      • add

        public Navigator.HistoryItem add​(int type,
                                         ObjectDB object,
                                         boolean rowNav)
        Add one object in the navigation
        Parameters:
        type - NAV_FORM or NAV_LIST
        object - Business object
        rowNav - True if it'a row navigation in a list
        Returns:
        the created item
      • searchInHistory

        public Navigator.HistoryItem searchInHistory​(java.lang.String url)
        Search one URL in the history
      • remove

        public void remove​(ObjectDB object)
        Remove the FORM link
        Parameters:
        object - Deleted object
      • update

        public void update​(ObjectDB obj)
      • clear

        public void clear()
        Clear the navigation history
      • getHistoryName

        public static java.lang.String getHistoryName​(Grant g)
      • serialize

        public void serialize()
        Serialize user history
      • unserialize

        public void unserialize()
        Unserialize user history
      • resetRailway

        public void resetRailway()
        Reset the railway
      • back

        public boolean back()
        Backward the current position
        Returns:
        True if succeed
      • getBackURL

        @Deprecated
        public java.lang.String getBackURL​(boolean refreshMenu)
        Deprecated.
      • getBackURL

        public java.lang.String getBackURL()
        Get the backward URL
      • getURL

        @Deprecated
        public java.lang.String getURL​(boolean refreshMenu)
        Deprecated.
      • getURL

        public java.lang.String getURL()
        Get the current URL
      • getRailway

        public java.lang.String getRailway()
        Railway from the last List to opened forms
        Returns:
        HTML anchors
      • getHistoryMenu

        public java.lang.String getHistoryMenu()
        Navigation history
        Returns:
        HTML menu button
      • display

        public java.lang.String display​(Grant g)
        Display both current railway and history in a menu button. Check 2 system properties to define the railway length (RAILWAY) and to hide/show the navigator (SHOW_NAVIGATOR)
        Returns:
        HTML div
      • rowNavigation

        public boolean rowNavigation​(java.lang.String action,
                                     ObjectDB obj,
                                     ObjectField rowId)
        Record navigation for business object current list
        Parameters:
        action - First, back, next, last
        obj - Business object
        rowId - Current row ID
        Returns:
        True if row navigation found
      • navigation

        public void navigation​(ObjectDB obj,
                               java.lang.String nav,
                               ObjectContextWeb ctx,
                               boolean rowNav)
        Form navigation for business object
        Parameters:
        obj - Business object
        nav - Nav parameter
        ctx - Object context
        rowNav - True if it's a row navigation
      • navigation

        public void navigation​(ObjectDB obj,
                               java.lang.String nav)
        List navigation for business object
        Parameters:
        obj - Business object
        nav - Navigation parameter
      • navigation

        public boolean navigation​(ExternalObject ext,
                                  ServletParameters params)
        External object navigation
        Parameters:
        ext - External object
        params - Request parameters
      • navigation

        public boolean navigation​(Agenda agenda,
                                  ObjectDB obj,
                                  ServletParameters params)
        Agenda navigation
        Parameters:
        agenda - Agenda
        obj - Business object
        params - Request parameters
      • navigation

        public boolean navigation​(PlaceMap placemap,
                                  ObjectDB obj,
                                  ServletParameters params)
        Place map navigation
        Parameters:
        placemap - Place map
        obj - Business object
        params - Request parameters
      • navigation

        public boolean navigation​(Timesheet ts,
                                  ObjectDB obj,
                                  ServletParameters params,
                                  boolean isGantt)
        Timesheet navigation
        Parameters:
        ts - Timesheet
        obj - Business object
        params - HTTP request parameters
        isGantt - GANTT chart ?
      • navigation

        public boolean navigation​(View view,
                                  Grant g,
                                  ServletParameters params)
        View navigation
        Parameters:
        view - View
        g - Grant
        params - HTTP request parameters
      • navigation

        public boolean navigation​(ObjectDB obj,
                                  Crosstab crosstab,
                                  ServletParameters params)
        Crosstab navigation
        Parameters:
        obj - Object
        crosstab - Cross table
        params - HTTP request parameters
      • navigation

        public boolean navigation​(ObjectDB obj,
                                  Graphic graph,
                                  ServletParameters params)
        Graph navigation
        Parameters:
        obj - Object
        graph - Graph
        params - HTTP request parameters
      • navigation

        public boolean navigation​(java.lang.String url,
                                  java.lang.String title,
                                  ServletParameters params)
        Specific URL navigation
        Parameters:
        url - URL
        title - Title
        params - HTTP request parameters