Package de.xima.fc.form.common
Class XItemRenderer
- java.lang.Object
-
- de.xima.fc.form.common.XItemRenderer
-
public class XItemRenderer extends Object
-
-
Constructor Summary
Constructors Constructor Description XItemRenderer()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
addHtmlAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData)
Deprecated.static void
addHtmlAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData, boolean isW3CMode)
Deprecated.static void
addHtmlAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData, boolean isW3CMode, boolean preview)
Adds HTML attributes to a node from XPropertyEnum.attributes configurationstatic void
addValidationAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData)
Deprecated.Validation rules are not registered with HTML attributes anymore.static boolean
isSafeAttribute(String attrName, String attrValue)
static String
removeScriptFromHtmlString(String html)
Cleans an HTML string by remove all content that could execute script.static com.hp.gagawa.java.elements.Div
render(XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx, com.alibaba.fastjson.JSONObject clientModel)
-
-
-
Method Detail
-
render
public static com.hp.gagawa.java.elements.Div render(XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx, com.alibaba.fastjson.JSONObject clientModel)
-
addHtmlAttributes
@Deprecated public static void addHtmlAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData)
Deprecated.Adds HTML attributes to a node from XPropertyEnum.attributes configuration- Parameters:
node
- HTML element to which to add the attributes.renderData
- XItemRenderData Data of the form item to render.
-
removeScriptFromHtmlString
public static String removeScriptFromHtmlString(String html)
Cleans an HTML string by remove all content that could execute script.- Parameters:
html
- HTML string to process.- Returns:
- A HTML string that cannot execute any script.
-
addHtmlAttributes
@Deprecated public static void addHtmlAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData, boolean isW3CMode)
Deprecated.Adds HTML attributes to a node from XPropertyEnum.attributes configuration- Parameters:
node
- HTML element to which to add the attributes.renderData
- Data of the form item to render.isW3CMode
- if the element should be W3C conform
-
addHtmlAttributes
public static void addHtmlAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData, boolean isW3CMode, boolean preview)
Adds HTML attributes to a node from XPropertyEnum.attributes configuration- Parameters:
node
- HTML element to which to add the attributes.renderData
- XItemRenderData Data of the form item to render.isW3CMode
- if the element should be W3C conformpreview
- Whether the form is rendered in (designer) preview mode.
-
addValidationAttributes
@Deprecated public static void addValidationAttributes(com.hp.gagawa.java.Node node, XItemRenderData renderData)
Deprecated.Validation rules are not registered with HTML attributes anymore. They are available via the global JSON objectXM_FORM_MODEL.validation.fields
on the clientHinzufügen von HTML-Attributen mittels Reference- Parameters:
node
- HTML-Element an welches die Attribute angehängt werden sollenrenderData
- XItemRenderData
-
-