Package org.opencms.gwt
Class CmsGwtActionElement
- java.lang.Object
-
- org.opencms.jsp.CmsJspBean
-
- org.opencms.jsp.CmsJspActionElement
-
- org.opencms.gwt.CmsGwtActionElement
-
- Direct Known Subclasses:
CmsContainerpageActionElement
,CmsContentEditorActionElement
,CmsEditProviderActionElement
,CmsGalleryActionElement
,CmsPostUploadDialogActionElement
,CmsPropertiesActionElement
,CmsPublishActionElement
,CmsSitemapActionElement
,CmsUploadActionElement
public class CmsGwtActionElement extends CmsJspActionElement
Sitemap action used to generate the sitemap editor.see jsp file /system/workplace/commons/sitemap.jsp.
- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
SCRIPT_TAG_CLOSE
The closing script tag.protected static java.lang.String
SCRIPT_TAG_OPEN
The opening script tag.-
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
-
-
Constructor Summary
Constructors Constructor Description CmsGwtActionElement(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
createNoCacheScript(java.lang.String moduleName)
Deprecated.static java.lang.String
createNoCacheScript(java.lang.String moduleName, java.lang.String moduleVersion)
Returns the script tag for the "*.nocache.js".java.lang.String
export()
Returns the serialized data for the core provider wrapped in a script tag.java.lang.String
export(boolean includeFontCss)
Returns the serialized data for the core provider wrapped into a script tag.java.lang.String
exportAll()
Returns the serialized data for the core provider.static java.lang.String
exportCommon(CmsObject cms, CmsCoreData coreData)
Returns the serialized data for the core provider wrapped into a script tag.static java.lang.String
exportDictionary(java.lang.String name, java.lang.reflect.Method method, java.lang.Object data)
Serializes the result of the given method for RPC-prefetching.static java.lang.String
exportDictionary(java.lang.String name, java.lang.String data)
Exports a dictionary by the given name as the content attribute of a meta tag.static java.lang.String
exportMeta(java.lang.String name, java.lang.String data)
Generates the HTML for a meta tag with given name and content.protected java.lang.String
exportModuleScriptTag(java.lang.String moduleName)
Exports script tag to the main OpenCms GWT no-cache js script tag.CmsCoreData
getCoreData()
Returns the needed server data for client-side usage.static java.lang.String
getFontIconCssLink()
Returns the OpenCms font icon CSS link.java.util.Locale
getWorkplaceLocale()
Returns the workplace locale for the current user.static java.lang.String
serialize(java.lang.reflect.Method method, java.lang.Object data)
Serializes the result of the given method for RPC-prefetching.static java.lang.String
wrapScript(java.lang.String... s)
Concatenates the given strings and surrounds them with script tags.-
Methods inherited from class org.opencms.jsp.CmsJspActionElement
editable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user
-
Methods inherited from class org.opencms.jsp.CmsJspBean
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, handleMissingFlexController, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions
-
-
-
-
Field Detail
-
SCRIPT_TAG_CLOSE
protected static final java.lang.String SCRIPT_TAG_CLOSE
The closing script tag.- See Also:
- Constant Field Values
-
SCRIPT_TAG_OPEN
protected static final java.lang.String SCRIPT_TAG_OPEN
The opening script tag.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsGwtActionElement
public CmsGwtActionElement(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
Constructor.- Parameters:
context
- the JSP page context objectreq
- the JSP requestres
- the JSP response
-
-
Method Detail
-
createNoCacheScript
public static java.lang.String createNoCacheScript(java.lang.String moduleName, java.lang.String moduleVersion)
Returns the script tag for the "*.nocache.js".- Parameters:
moduleName
- the module name to get the script tag formoduleVersion
- the module version- Returns:
- the
"<script>"
tag for the "*.nocache.js".
-
exportCommon
public static java.lang.String exportCommon(CmsObject cms, CmsCoreData coreData) throws java.lang.Exception
Returns the serialized data for the core provider wrapped into a script tag.- Parameters:
cms
- the CMS contextcoreData
- the core data to write into the page- Returns:
- the data
- Throws:
java.lang.Exception
- if something goes wrong
-
exportDictionary
public static java.lang.String exportDictionary(java.lang.String name, java.lang.reflect.Method method, java.lang.Object data) throws com.google.gwt.user.client.rpc.SerializationException
Serializes the result of the given method for RPC-prefetching.- Parameters:
name
- the dictionary namemethod
- the methoddata
- the result to serialize- Returns:
- the serialized data
- Throws:
com.google.gwt.user.client.rpc.SerializationException
- if something goes wrong
-
exportDictionary
public static java.lang.String exportDictionary(java.lang.String name, java.lang.String data)
Exports a dictionary by the given name as the content attribute of a meta tag.- Parameters:
name
- the dictionary namedata
- the data- Returns:
- the meta tag
-
exportMeta
public static java.lang.String exportMeta(java.lang.String name, java.lang.String data)
Generates the HTML for a meta tag with given name and content.- Parameters:
name
- the name of the meta tagdata
- the content of the meta tag- Returns:
- the HTML for the meta tag
-
getFontIconCssLink
public static java.lang.String getFontIconCssLink()
Returns the OpenCms font icon CSS link.- Returns:
- the CSS link
-
serialize
public static java.lang.String serialize(java.lang.reflect.Method method, java.lang.Object data) throws com.google.gwt.user.client.rpc.SerializationException
Serializes the result of the given method for RPC-prefetching.- Parameters:
method
- the methoddata
- the result to serialize- Returns:
- the serialized data
- Throws:
com.google.gwt.user.client.rpc.SerializationException
- if something goes wrong
-
wrapScript
public static java.lang.String wrapScript(java.lang.String... s)
Concatenates the given strings and surrounds them with script tags.- Parameters:
s
- the array of strings to concatenate and wrap- Returns:
- the concatenation of the input strings, wrapped in script tags
-
createNoCacheScript
@Deprecated public java.lang.String createNoCacheScript(java.lang.String moduleName)
Deprecated.Returns the script tag for the "*.nocache.js".- Parameters:
moduleName
- the module name to get the script tag for- Returns:
- the
"<script>"
tag for the "*.nocache.js".
-
export
public java.lang.String export() throws java.lang.Exception
Returns the serialized data for the core provider wrapped in a script tag.- Returns:
- the data
- Throws:
java.lang.Exception
- if something goes wrong
-
export
public java.lang.String export(boolean includeFontCss) throws java.lang.Exception
Returns the serialized data for the core provider wrapped into a script tag.- Parameters:
includeFontCss
-true
to include the OpenCms font CSS, not necessary in case VAADIN theme is loaded also- Returns:
- the data
- Throws:
java.lang.Exception
- if something goes wrong
-
exportAll
public java.lang.String exportAll() throws java.lang.Exception
Returns the serialized data for the core provider.- Returns:
- the data
- Throws:
java.lang.Exception
- if something goes wrong
-
getCoreData
public CmsCoreData getCoreData()
Returns the needed server data for client-side usage.- Returns:
- the needed server data for client-side usage
-
getWorkplaceLocale
public java.util.Locale getWorkplaceLocale()
Returns the workplace locale for the current user.- Returns:
- the workplace locale
-
exportModuleScriptTag
protected java.lang.String exportModuleScriptTag(java.lang.String moduleName)
Exports script tag to the main OpenCms GWT no-cache js script tag.- Parameters:
moduleName
- the client module to start- Returns:
- the HTML string
-
-