public final class HtmlJavaScriptUtils extends Object
Constructor and Description |
---|
HtmlJavaScriptUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
appendAutoScrollAssignment(FacesContext context,
StringBuilder onClickValue,
String formName)
Adds the hidden form input value assignment that is necessary for the autoscroll
feature to an html link or button onclick attribute.
|
static void |
appendAutoScrollAssignment(StringBuilder onClickValue,
String formName) |
static void |
appendClearHiddenCommandFormParamsFunctionCall(StringBuilder buf,
String formName) |
static String |
escapeJavaScriptForChain(String javaScript)
This function correctly escapes the given JavaScript code
for the use in the jsf.util.chain() JavaScript function.
|
static String |
getAutoScrollFunction(FacesContext facesContext) |
static String |
getClearHiddenCommandFormParamsFunctionName(String formName)
Prefixes the given String with "clear_" and removes special characters
|
static String |
getClearHiddenCommandFormParamsFunctionNameMyfacesLegacy(String formName) |
static void |
renderAutoScrollFunction(FacesContext facesContext,
ResponseWriter writer)
Renders the autoscroll javascript function.
|
static void |
renderAutoScrollHiddenInput(FacesContext facesContext,
ResponseWriter writer)
Renders the hidden form input that is necessary for the autoscroll feature.
|
static void |
renderClearHiddenCommandFormParamsFunction(ResponseWriter writer,
String formName,
Set dummyFormParams,
String formTarget)
Render the javascript function that is called on a click on a commandLink
to clear the hidden inputs.
|
static void |
renderFormSubmitScript(FacesContext facesContext) |
public static void renderFormSubmitScript(FacesContext facesContext) throws IOException
IOException
public static void appendAutoScrollAssignment(StringBuilder onClickValue, String formName)
public static void appendAutoScrollAssignment(FacesContext context, StringBuilder onClickValue, String formName)
public static String getAutoScrollFunction(FacesContext facesContext)
public static void renderAutoScrollHiddenInput(FacesContext facesContext, ResponseWriter writer) throws IOException
IOException
public static void renderAutoScrollFunction(FacesContext facesContext, ResponseWriter writer) throws IOException
IOException
public static void appendClearHiddenCommandFormParamsFunctionCall(StringBuilder buf, String formName)
public static String getClearHiddenCommandFormParamsFunctionName(String formName)
formName
- public static String getClearHiddenCommandFormParamsFunctionNameMyfacesLegacy(String formName)
public static void renderClearHiddenCommandFormParamsFunction(ResponseWriter writer, String formName, Set dummyFormParams, String formTarget) throws IOException
writer
- formName
- dummyFormParams
- formTarget
- IOException
Copyright © 2020 The Apache Software Foundation. All rights reserved.