Class AbstractArrayPane

    • Constructor Detail

      • AbstractArrayPane

        public AbstractArrayPane()
    • Method Detail

      • init

        public void init​(String name,
                         javax.servlet.jsp.PageContext pageContext)
        Description copied from interface: ArrayPane
        Generic class to display a typical WA array table pane. A unique name identifier is to be used in html pages for this array specific actions (exemple : sort on a specific column)
        Specified by:
        init in interface ArrayPane
        Parameters:
        name - A unique name in the page to display
      • init

        public void init​(String name,
                         javax.servlet.ServletRequest request,
                         javax.servlet.http.HttpSession session)
        Specified by:
        init in interface ArrayPane
      • init

        public void init​(String name,
                         String url,
                         javax.servlet.ServletRequest request,
                         javax.servlet.http.HttpSession session)
        Specified by:
        init in interface ArrayPane
      • addArrayColumn

        public ArrayColumn addArrayColumn​(String title)
        Add a new column to the table.
        Specified by:
        addArrayColumn in interface ArrayPane
        Parameters:
        title - The column title to display
        Returns:
        The new column header. You can use this object to modify the default display options.
      • addArrayLine

        public ArrayLine addArrayLine()
        Description copied from interface: ArrayPane
        Add a line to the table. Be carefull : each line form the array has to contain the same cell number. If not, the array will contain some empty cells, and won't be sortable.
        Specified by:
        addArrayLine in interface ArrayPane
        Returns:
        an ArrayLine, to be used to add cells and to modify default display options.
      • getTitle

        public String getTitle()
        Description copied from interface: ArrayPane
        Get the title
        Specified by:
        getTitle in interface ArrayPane
        Returns:
        The title
      • setTitle

        public void setTitle​(String title)
        Description copied from interface: ArrayPane
        Set the array title, to be displayed on the first html table.
        Specified by:
        setTitle in interface ArrayPane
        Parameters:
        title - The title
      • getName

        public String getName()
        Description copied from interface: ArrayPane
        Get the unique name
        Specified by:
        getName in interface ArrayPane
        Returns:
        The name of this object in the http page
      • setVisibleLineNumber

        public void setVisibleLineNumber​(int maximum)
        Description copied from interface: ArrayPane
        Set the maximum line number visible in the table. If the number of line is greater than this maximum, only the first lines will be visible, and some buttons to view next and previous lines will be added.
        Specified by:
        setVisibleLineNumber in interface ArrayPane
        Parameters:
        maximum - The maximum number of visible lines
      • getColumnToSort

        public int getColumnToSort()
        Description copied from interface: ArrayPane
        Get the column to be sorted
        Specified by:
        getColumnToSort in interface ArrayPane
        Returns:
        The column number.
      • setColumnToSort

        public void setColumnToSort​(int columnNumber)
        Description copied from interface: ArrayPane
        Modify the column number the sort will be based on.
        Specified by:
        setColumnToSort in interface ArrayPane
        Parameters:
        columnNumber - The column to be sorted
      • print

        public String print()
        Description copied from interface: ArrayPane
        Print the array line in an html format.
        Specified by:
        print in interface ArrayPane
        Specified by:
        print in interface SimpleGraphicElement
        Returns:
        The html code, representing the array pane
      • getSession

        public javax.servlet.http.HttpSession getSession()
        Description copied from interface: ArrayPane
        Get the session in which the ArrayPane will keep its state.
        Specified by:
        getSession in interface ArrayPane
        Returns:
        The session
      • getRequest

        public javax.servlet.ServletRequest getRequest()
        Description copied from interface: ArrayPane
        Get the request that can contains some parameters for the ArrayPane (sort action...)
        Specified by:
        getRequest in interface ArrayPane
        Returns:
        The entering request
      • setRoutingAddress

        public void setRoutingAddress​(String address)
        Sets the routing address. This is actually the URL of the page to which requests will be routed when the user clicks on a column header link.
        Specified by:
        setRoutingAddress in interface ArrayPane
        Parameters:
        address - the URI to which routing any requests from this pane.
      • getSortable

        public boolean getSortable()
        Description copied from interface: ArrayPane
        Get global array columns behaviour for sort. By default, all columns are sortable.
        Specified by:
        getSortable in interface ArrayPane
        Returns:
        True, if the array is sortable, false if not.
      • setSortable

        public void setSortable​(boolean sortable)
        Set all array columns to be sortable or not. By default, all columns are sortable.
        Specified by:
        setSortable in interface ArrayPane
        Parameters:
        sortable - Set sortable to false if you want all the table to be non sortable.
      • setLineMoveCallback

        public void setLineMoveCallback​(String callback)
        Description copied from interface: ArrayPane
        Sets a Javascript function to call when one or more lines of the array are moved between them.
        Specified by:
        setLineMoveCallback in interface ArrayPane
        Parameters:
        callback - a function to invoke.
      • getCellSpacing

        public int getCellSpacing()
      • getCellPadding

        public int getCellPadding()
      • getSummary

        public String getSummary()
        Description copied from interface: ArrayPane
        Gets a summary about the content of the array pane.
        Specified by:
        getSummary in interface ArrayPane
        Returns:
        the summary.
      • setSummary

        public void setSummary​(String summary)
        Description copied from interface: ArrayPane
        Sets the array pane summary.
        Specified by:
        setSummary in interface ArrayPane
        Parameters:
        summary - a summary.
      • isExportData

        public boolean isExportData()
        Specified by:
        isExportData in interface ArrayPane
        Returns:
        true if the current array pane can be exported, false else if
      • setExportData

        public void setExportData​(boolean exportData)
        Specified by:
        setExportData in interface ArrayPane
        Parameters:
        exportData - enable/disable export data from array pane
      • getExportDataURL

        public String getExportDataURL()
        Specified by:
        getExportDataURL in interface ArrayPane
        Returns:
        export data URL used to export current ArrayPane data
      • setExportDataURL

        public void setExportDataURL​(String exportDataURL)
        Specified by:
        setExportDataURL in interface ArrayPane
        Parameters:
        exportDataURL - the URL to set used to export array pane data
      • getExportUrl

        protected String getExportUrl()
        Returns:
        the export array pane URL
      • isMovableLines

        public boolean isMovableLines()
      • setMovableLines

        public void setMovableLines​(boolean movableLines)
        Description copied from interface: ArrayPane
        Indicates if the lines of the array can be moved, reordered by hand by the user.
        Specified by:
        setMovableLines in interface ArrayPane
        Parameters:
        movableLines - true if the lines can be moved.
      • getUrl

        public String getUrl()
      • getIconsPath

        public String getIconsPath()
      • printSortJavascriptFunction

        protected String printSortJavascriptFunction()
      • isPaginationOptimized

        protected boolean isPaginationOptimized()
        Indicates if the pagination is optimized, the is to say if the array contains only the lines which will be printed to the user whereas the array could provides many other pages.
        Returns:
        true if the pagination is optimized.
      • getNbItems

        protected int getNbItems()
        Gets the number of items the list can provides.
        Returns:
        the total number of items.