Class FormRenderHelper


  • public final class FormRenderHelper
    extends Object
    Helper methods for rendering form element for the form designer.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • FormRenderHelper

        public FormRenderHelper()
    • Method Detail

      • createRenderedItems

        public static Map<String,​Object> createRenderedItems​(javax.servlet.http.HttpServletRequest req,
                                                                   javax.servlet.http.HttpServletResponse resp,
                                                                   Mandant client,
                                                                   IXFormRenderConfig renderConfig,
                                                                   RenderItemParams params)
        Renders a list of form items, returning the rendered HTML for each item.
        Parameters:
        req - Currently active HTTP request.
        resp - Currently active HTTP response.
        renderConfig - Current form render config.
        params - Params from the HTTP request.
        Returns:
        The rendered HTML for each of the given items. The key is the ID of the item. The value is a map containing the following entries: (a) "success": a boolean indicating whether the rendering was successful, (b) "html": the rendered HTML if successful, (c) "error": the error message if not successful.
      • createRenderedPreview

        public static String createRenderedPreview​(javax.servlet.http.HttpServletRequest req,
                                                   javax.servlet.http.HttpServletResponse resp,
                                                   long projectId,
                                                   long formVersionId,
                                                   long workflowVersionId,
                                                   PreviewParams params,
                                                   String conversationId)
        Parameters:
        req - Currently active HTTP request.
        resp - Currently active HTTP response.
        projectId - ID of the current project being edited.
        formVersionId - ID of the form version being edited.
        workflowVersionId - ID of the workflow version being edited.
        params - Params from the HTTP request.
        Returns:
        The rendered HTML with a preview of the form.