Building a Form Page

The configurable JSP emxForm.jsp creates form pages. This JSP accepts parameters that define the content and behavior of the page. You pass these parameters to the JSP through the href URL.

The main components of the form page--the rows of information and the Actions menu (Action menus are for read-only forms)--are defined as administrative objects in the database. You pass the names of these objects to the emxForm.jsp through its parameters.

You must create a web form administrative object for each unique set of fields. For example, suppose the details page for ECRs displays one set of attributes and the details page for parts displays another. You need a web form administrative object for each of these forms, for example CustomECRBasics and CustomPartBasics. Users typically access form pages by selecting an action from an Actions menu, a tree, or tree category. The component that calls the form page must specify the configurable JSP for form pages, emxForm.jsp, in the href parameter. The following procedure lists the main steps for creating a form page and connecting it to an application.

  1. Create and configure a web form administrative object and define the form fields to display in the form page. The graphics illustrate the objects needed to create a form page that shows details for a Product Line. The Product Line details page is linked to the tree for Product Lines, menu type_ProductLine.

    When you define form fields, you define the field's data, label, display order, and access. For a description of the available parameters and settings for web forms and fields, see Parameters for Web Form Objects. For naming conventions, see Naming Conventions.



  2. If the form page is in View mode and you want to include an Action menu, configure the action menu and toolbar items using the instructions in Toolbars.

    To allow the system to add an Edit link to the top of a View mode form page automatically, include the editLink=true parameter in he href passed to emxForm.jsp. The link calls the same form page but displays it in Edit mode.

  3. In the href parameter for the command object that should call the form page (or in the JSP if a JSP is calling the page), enter the URL to display the form page. The URL should include these elements:


    • Since emxForm.jsp is in the ematrix/common directory, the URL should begin with the macro for the common directory: ${COMMON_DIR}.
    • The URL should include emxForm.jsp.
    • The URL should include the parameters needed to display the page, especially the mode parameter that defines whether it should be Edit or View. If the mode parameter is not included, the form defaults to View mode. For a description of the parameters accepted by emxForm.jsp, see URL Parameters Accepted by emxForm.jsp.

    For example, the following URL calls the form page in Edit mode:

    ${COMMON_DIR}/emxForm.jsp?form=BuyerDesk&mode=edit
    &objectId=3243.32424.232&relId=3432.2342.2344&formHeader
    =BuyerDesk&toolbar=SCSBuyerDesktoolbar
    

    This URL calls the form in View mode:

    ${COMMON_DIR}/emxForm.jsp?form=BuyerDesk&objectId
    =3243.32424.232&relId=3432.2342.2344&formHeader=BuyerDesk
    toolbar=SCSBuyerDesktoolbar&editLink=true
    

  4. To see your changes while working with the Web-based user interface, select > Utilities > Reload Cache and click the browser Refresh button.

    The cache refreshes automatically when the component age expires. The cache refresh setting is in emxSystem.properties.

    Only the Administration Manager role has access to the Reload Cache tool.