org.pentaho.platform.util.xml
Class XForm
java.lang.Object
org.pentaho.platform.util.xml.XForm
public class XForm
- extends Object
Constructor Summary |
XForm()
|
Method Summary |
static String |
completeXForm(int outputType,
String formName,
StringBuffer xformHeader,
StringBuffer xformBody,
IPentahoSession session,
IDocumentResourceLoader loader)
|
static void |
completeXFormHeader(String formName,
StringBuffer xformHeader)
|
static void |
createXFormControl(int type,
String fieldName,
Object defaultValues,
List values,
Map displayNames,
String formName,
StringBuffer xformHeader,
StringBuffer xformBody)
|
static void |
createXFormControl(String fieldName,
Object defaultValues,
String formName,
StringBuffer xformHeader,
StringBuffer xformBody,
boolean visible)
|
static void |
createXFormHeader(String formName,
StringBuffer xformHeader)
|
static void |
createXFormSubmit(String formName,
StringBuffer xformBody,
String buttonText)
|
static String |
transform(String xForm,
String method,
IPentahoSession session,
IDocumentResourceLoader loader)
Using html4.xsl, transform the xml in the xForm string to an HTML form snippet. |
static String |
transformSnippet(Node xForm,
IPentahoSession session,
IDocumentResourceLoader loader)
|
static String |
transformSnippet(String xFormSnippet,
String method,
IPentahoSession session,
IDocumentResourceLoader loader)
Using html4.xsl, wrap the XForm String in xFormSnippet in a <pho:snippet>, and
transform the wrapped XSL into an HTML form snippet. |
TYPE_RADIO
public static final int TYPE_RADIO
- See Also:
- Constant Field Values
TYPE_SELECT
public static final int TYPE_SELECT
- See Also:
- Constant Field Values
TYPE_LIST
public static final int TYPE_LIST
- See Also:
- Constant Field Values
TYPE_LIST_MULTI
public static final int TYPE_LIST_MULTI
- See Also:
- Constant Field Values
TYPE_CHECK_MULTI
public static final int TYPE_CHECK_MULTI
- See Also:
- Constant Field Values
TYPE_CHECK_MULTI_SCROLL
public static final int TYPE_CHECK_MULTI_SCROLL
- See Also:
- Constant Field Values
TYPE_CHECK_MULTI_SCROLL_2_COLUMN
public static final int TYPE_CHECK_MULTI_SCROLL_2_COLUMN
- See Also:
- Constant Field Values
TYPE_CHECK_MULTI_SCROLL_3_COLUMN
public static final int TYPE_CHECK_MULTI_SCROLL_3_COLUMN
- See Also:
- Constant Field Values
TYPE_CHECK_MULTI_SCROLL_4_COLUMN
public static final int TYPE_CHECK_MULTI_SCROLL_4_COLUMN
- See Also:
- Constant Field Values
TYPE_TEXT
public static final int TYPE_TEXT
- See Also:
- Constant Field Values
OUTPUT_XFORM
public static final int OUTPUT_XFORM
- See Also:
- Constant Field Values
OUTPUT_HTML
public static final int OUTPUT_HTML
- See Also:
- Constant Field Values
OUTPUT_HTML_PAGE
public static final int OUTPUT_HTML_PAGE
- See Also:
- Constant Field Values
XForm
public XForm()
transformSnippet
public static String transformSnippet(Node xForm,
IPentahoSession session,
IDocumentResourceLoader loader)
throws TransformerException
- Throws:
TransformerException
transformSnippet
public static String transformSnippet(String xFormSnippet,
String method,
IPentahoSession session,
IDocumentResourceLoader loader)
throws TransformerException
- Using html4.xsl, wrap the XForm String in xFormSnippet in a <pho:snippet>, and
transform the wrapped XSL into an HTML form snippet.
- Parameters:
xFormSnippet
- The xml snippet being transformed.method
- HTML form method, generally either "post" or "get".session
-
- Returns:
- HTML form snippet, null on error.
- Throws:
TransformerException
- if the transform fails.
transform
public static String transform(String xForm,
String method,
IPentahoSession session,
IDocumentResourceLoader loader)
throws TransformerException
- Using html4.xsl, transform the xml in the xForm string to an HTML form snippet.
- Parameters:
xForm
- The xml string being transformed.method
- HTML form method, generally either "post" or "get".session
-
- Returns:
- HTML form snippet, null on error.
- Throws:
TransformerException
- if the transform fails.
createXFormHeader
public static void createXFormHeader(String formName,
StringBuffer xformHeader)
completeXFormHeader
public static void completeXFormHeader(String formName,
StringBuffer xformHeader)
createXFormSubmit
public static void createXFormSubmit(String formName,
StringBuffer xformBody,
String buttonText)
completeXForm
public static String completeXForm(int outputType,
String formName,
StringBuffer xformHeader,
StringBuffer xformBody,
IPentahoSession session,
IDocumentResourceLoader loader)
throws TransformerException
- Throws:
TransformerException
createXFormControl
public static void createXFormControl(String fieldName,
Object defaultValues,
String formName,
StringBuffer xformHeader,
StringBuffer xformBody,
boolean visible)
createXFormControl
public static void createXFormControl(int type,
String fieldName,
Object defaultValues,
List values,
Map displayNames,
String formName,
StringBuffer xformHeader,
StringBuffer xformBody)