Class IvyJSP


  • public class IvyJSP
    extends Ivy
    Used within JSP pages to access the environment and process data of the current process.

    This class contains the same functionality as the Ivy class and is extended with additional functionality only used in a JSP-page.

    To access the ivy environment in a JSP-page you must use this class instead of Ivy.

    To import this class in a JSP add this line at the top of the jsp page:
     <%@ page import="ch.ivyteam.ivy.page.engine.jsp.IvyJSP"%><jsp:useBean id="ivy" class="ch.ivyteam.ivy.page.engine.jsp.IvyJSP" scope="session"/>
     
    After this import you can access the ivy environment like this:
     <%=ivy.get("foo.bar")%>
    <%=ivy.task.getName()%>

    API:
    This is a public API.
    • Constructor Detail

      • IvyJSP

        public IvyJSP()
        Creates a new IvyJSP instance. Usually used as a bean in a JSP-page.
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
    • Method Detail

      • panel

        public static String panel​(String panel)
        Gets the path to the given panel.
        The method is used to define the structure of a layout in ivy. Each such method creates a panel content object with the specified name under the HTML dialog page when a page with this layout is created.
        Parameters:
        panel - The name of the panel to be included
        Returns:
        The panel file to be included or a default file
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • content

        public static String content​(String contentObjectName,
                                     String type)
        Gets the value of the given content object to render in a JSP.
        The method is used to define the structure of a layout in ivy. Each such method creates a content object with the specified name and type under the HTML dialog page when a page with this layout is created.
        Parameters:
        contentObjectName - name of the content object
        type - the type of the content object to generate, see name of CoType.
        Returns:
        the content object value in the currently active language.
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • style

        public static String style()
        Returns the path of the css file of the current page.
        To use the css style in a JSP add this line inside the header part:
         <link rel="stylesheet" type="text/css" href="<%=ivy.style()%>"/> 
         
        Returns:
        path of the css file of the current page
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.