org.olat.core.gui.components.form.flexible.impl
Class FormJSHelper
java.lang.Object
org.olat.core.gui.components.form.flexible.impl.FormJSHelper
public class FormJSHelper
- extends java.lang.Object
Description:
TODO: patrickb Class Description for FormJSHelper
Initial Date: 11.01.2007
- Author:
- patrickb
|
Method Summary |
static void |
appendReadOnly(java.lang.String text,
StringOutput sb)
|
static void |
appendRenderInstructions(StringOutput sb,
java.lang.String jsonRenderInstruction,
java.util.Set acceptedInstructions)
|
static java.lang.String |
getExtJSVarDeclaration(java.lang.String id)
|
static java.lang.String |
getFocusFor(java.lang.String id)
|
static void |
getInlineEditOkCancelJS(StringOutput sb,
java.lang.String id,
java.lang.String oldHtmlValue,
Form rootForm)
creates the JS fragment needed for the #getInlineEditOkCancelHTML(StringOutput, String, String, String) HTML fragment. |
static java.lang.String |
getJSEnd()
|
static java.lang.String |
getJSFnCallFor(Form form,
java.lang.String id,
int actionIndex)
|
static java.lang.String |
getJSStart()
|
static java.lang.String |
getJSStartWithVarDeclaration(java.lang.String id)
|
static java.lang.String |
getJSSubmitRegisterFn(Form form,
java.lang.String id)
|
static java.lang.StringBuilder |
getRawJSFor(Form form,
java.lang.String id,
int actions)
create for example an
onclick="o_ffEvent('ofo_1377','ofo_1377_dispatchuri','o_fi1399','ofo_1377_eventval','1')" |
static java.lang.String |
getSetFlexiFormDirty(Form form,
java.lang.String id)
|
static java.lang.String |
getSetFlexiFormDirtyFnCallOnly(Form form)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormJSHelper
public FormJSHelper()
getRawJSFor
public static java.lang.StringBuilder getRawJSFor(Form form,
java.lang.String id,
int actions)
- create for example an
onclick="o_ffEvent('ofo_1377','ofo_1377_dispatchuri','o_fi1399','ofo_1377_eventval','1')"
- Parameters:
form - id - actions -
- Returns:
getJSFnCallFor
public static java.lang.String getJSFnCallFor(Form form,
java.lang.String id,
int actionIndex)
appendReadOnly
public static void appendReadOnly(java.lang.String text,
StringOutput sb)
appendRenderInstructions
public static void appendRenderInstructions(StringOutput sb,
java.lang.String jsonRenderInstruction,
java.util.Set acceptedInstructions)
- Parameters:
sb - jsonRenderInstruction - acceptedInstructions -
getJSSubmitRegisterFn
public static java.lang.String getJSSubmitRegisterFn(Form form,
java.lang.String id)
- Parameters:
rootForm - id -
- Returns:
getJSStartWithVarDeclaration
public static java.lang.String getJSStartWithVarDeclaration(java.lang.String id)
getJSStart
public static java.lang.String getJSStart()
getJSEnd
public static java.lang.String getJSEnd()
getExtJSVarDeclaration
public static java.lang.String getExtJSVarDeclaration(java.lang.String id)
getSetFlexiFormDirty
public static java.lang.String getSetFlexiFormDirty(Form form,
java.lang.String id)
getFocusFor
public static java.lang.String getFocusFor(java.lang.String id)
getSetFlexiFormDirtyFnCallOnly
public static java.lang.String getSetFlexiFormDirtyFnCallOnly(Form form)
getInlineEditOkCancelJS
public static void getInlineEditOkCancelJS(StringOutput sb,
java.lang.String id,
java.lang.String oldHtmlValue,
Form rootForm)
- creates the JS fragment needed for the
#getInlineEditOkCancelHTML(StringOutput, String, String, String) HTML fragment.
- Parameters:
sb - where to appendid - formItemId of the InlineEdit FormItemoldHtmlValue - escaped HTML value TODO:2009-09-26:pb: escaped values appear as ' and are not escaped back.rootForm - to extract the ID of the Form where to submit to.