Package de.xima.fc.form
Class FormHelper
- java.lang.Object
-
- de.xima.fc.form.FormHelper
-
public class FormHelper extends Object
Class for different helper-methods for the usage with forms- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description FormHelper()
-
Method Summary
-
-
-
Method Detail
-
buildXForm
public static IXForm buildXForm(IFormRenderContext renderCtx) throws com.alibaba.fastjson.JSONException, IOException
- Throws:
com.alibaba.fastjson.JSONException
IOException
-
buildXFormConfig
public static IXFormRenderConfig buildXFormConfig(IFormRenderContext renderCtx) throws IOException
- Throws:
IOException
-
renderAsString
@Deprecated public static String renderAsString(IXForm form, IXFormRenderConfig config, Map<String,List<String[]>> valuesMap) throws com.alibaba.fastjson.JSONException, IOException
Deprecated.- Throws:
com.alibaba.fastjson.JSONException
IOException
-
renderAsString
public static String renderAsString(IXForm form, IXFormRenderConfig config, Map<String,List<String[]>> valuesMap, Map<String,FormContainerMetaData> dynContainerMap) throws com.alibaba.fastjson.JSONException, IOException
- Throws:
com.alibaba.fastjson.JSONException
IOException
-
renderToRequestContext
@Deprecated public static void renderToRequestContext(IXForm form, IXFormRenderConfig config, Map<String,List<String[]>> valuesMap, IExtendedFormRequestContext requestCtx)
-
renderToRequestContext
public static void renderToRequestContext(IXForm form, IXFormRenderConfig config, Map<String,List<String[]>> valuesMap, Map<String,FormContainerMetaData> dynContainerMap, IExtendedFormRequestContext requestCtx)
-
renderToRequestResponse
@Deprecated public static void renderToRequestResponse(IXForm form, IXFormRenderConfig config, IXFormRenderContext formRenderContext, Map<String,List<String[]>> valuesMap, javax.servlet.http.HttpServletResponse response) throws com.alibaba.fastjson.JSONException
Deprecated.- Throws:
com.alibaba.fastjson.JSONException
-
renderToRequestResponse
public static void renderToRequestResponse(IXForm form, IXFormRenderConfig config, IXFormRenderContext formRenderContext, Map<String,List<String[]>> valuesMap, Map<String,FormContainerMetaData> dynContainerMap, javax.servlet.http.HttpServletResponse response) throws com.alibaba.fastjson.JSONException
- Throws:
com.alibaba.fastjson.JSONException
-
renderAsString
public static String renderAsString(IXForm form, IXFormRenderConfig config, IXFormRenderContext formRenderCtx) throws com.alibaba.fastjson.JSONException, IOException
- Throws:
com.alibaba.fastjson.JSONException
IOException
-
renderToRequestContext
@Deprecated public static void renderToRequestContext(IXForm form, IXFormRenderConfig config, IExtendedFormRequestContext requestCtx, Map<String,List<String[]>> values)
-
renderToRequestContext
public static void renderToRequestContext(IXForm form, IXFormRenderConfig config, IExtendedFormRequestContext requestCtx, Map<String,List<String[]>> values, Map<String,FormContainerMetaData> dynContainerMap)
-
renderToRequestContext
public static void renderToRequestContext(IXForm form, IXFormRenderConfig config, IExtendedFormRequestContext requestCtx)
-
renderToRequestResponse
public static void renderToRequestResponse(IXForm form, IXFormRenderConfig config, IXFormRenderContext formRenderCtx, javax.servlet.http.HttpServletResponse response) throws com.alibaba.fastjson.JSONException
- Throws:
com.alibaba.fastjson.JSONException
-
getFormElementWidgetPlugin
public static IPluginFormElementWidget getFormElementWidgetPlugin(Mandant client, String pluginName)
-
getFormElementWidgetPlugins
public static Map<String,IPluginFormElementWidget> getFormElementWidgetPlugins(Mandant client)
-
getFormElementWidgetPluginsWithInstanceTime
public static Map<String,org.apache.commons.lang3.tuple.Pair<IPluginFormElementWidget,Long>> getFormElementWidgetPluginsWithInstanceTime(Mandant client)
-
buildXFormJSON
@Deprecated public static com.alibaba.fastjson.JSONObject buildXFormJSON(FormRenderContext renderCtx) throws IOException, com.alibaba.fastjson.JSONException
Deprecated.- Throws:
IOException
com.alibaba.fastjson.JSONException
-
clearUploads
public static void clearUploads(IXForm xForm, IXFormRenderConfig config, IExtendedFormRequestContext requestCtx, Map<String,List<String[]>> values)
-
validateFD2Form
public static boolean validateFD2Form(IXForm xForm, IXFormRenderConfig config, IExtendedFormRequestContext requestCtx)
-
validateFD2Form
public static boolean validateFD2Form(IXForm xForm, IXFormRenderConfig config, IExtendedFormRequestContext requestCtx, IFormRenderContext renderCtx)
-
createClientResourceUrl
public static String createClientResourceUrl(IFormRenderContext renderCtx, IXFormRenderConfig xformConfig, MandantRessource res)
- Parameters:
renderCtx
- Form render context with the current client.xformConfig
- Form render config with the base include URLres
- Resource for which to create the URL.- Returns:
- The URL for the given client resource that can be used in web forms.
-
createProjectResourceUrl
public static String createProjectResourceUrl(IFormRenderContext renderCtx, IXFormRenderConfig xformConfig, ProjektRessource res)
- Parameters:
renderCtx
- Form render context with the current project.xformConfig
- Form render config with the base include URL.res
- Resource for which to create the URL.- Returns:
- The URL for the given project resource that can be used in web forms.
-
createWidgetResourceUrl
public static String createWidgetResourceUrl(IFormRenderContext renderCtx, IXFormRenderConfig xformConfig, XItemWidgetWrapper wrapper, IXItemWidget widget)
- Parameters:
renderCtx
- Form render context with the current project.xformConfig
- Form render config with the base include URL.wrapper
- Wrapper for the widget.widget
- Widget instance with a CSS resource for which to create a URL.- Returns:
- The URL for the given widget CSS resource that can be used in web forms.
-
createPluginResourceUrl
public static String createPluginResourceUrl(IFormRenderContext renderCtx, IXFormRenderConfig xformConfig, IFormResource res, boolean useSystemPlugins)
- Parameters:
renderCtx
- Form render context with the current client.xformConfig
- Form render config with the base include URLres
- Resource for which to create the URL.useSystemPlugins
- Whether the resource was obtained from a system or client plugin.- Returns:
- The URL for the given client resource that can be used in web forms.
-
-