|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.explorer.CmsNewResource
org.opencms.workplace.explorer.CmsNewResourceXmlPage
public class CmsNewResourceXmlPage
The new resource page dialog handles the creation of an xml page.
The following files use this class:
| Field Summary | |
|---|---|
static String |
PARAM_BODYFILE
Request parameter name for the selected body. |
static String |
PARAM_TEMPLATE
Request parameter name for the selected template. |
| Fields inherited from class org.opencms.workplace.explorer.CmsNewResource |
|---|
ACTION_NEWFORM, ACTION_SUBMITFORM, BUTTON_NEXT, DIALOG_NEWFORM, DIALOG_SUBMITFORM, DIALOG_TYPE, PARAM_CURRENTFOLDER, PARAM_NEWRESOURCEEDITPROPS, PARAM_NEWRESOURCETYPE, PARAM_NEWRESOURCEURI |
| Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
|---|
PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
| Constructor Summary | |
|---|---|
CmsNewResourceXmlPage(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsNewResourceXmlPage(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
Public constructor with JSP variables. |
|
| Method Summary | |
|---|---|
void |
actionCloseDialog()
Used to close the current JSP dialog. |
void |
actionCreateResource()
Creates the xml page using the specified resource name. |
void |
actionEditProperties()
Forwards to the property dialog if the resourceeditprops parameter is true. |
String |
buildSelectBodyFile(String attributes)
Builds the html for the page body file select box. |
String |
buildSelectTemplates(String attributes)
Builds the html for the page template select box. |
static TreeMap |
getBodies(CmsObject cms)
Returns a sorted Map of all available body files of the OpenCms modules. |
protected static TreeMap |
getElements(CmsObject cms,
String elementFolder)
Returns a sorted Map of all available elements in the specified subfolder of the OpenCms modules. |
String |
getParamBodyFile()
Returns the body file parameter value. |
String |
getParamDialogmode()
Returns the value of the dialogmode parameter, or null if this parameter was not provided. |
String |
getParamTemplate()
Returns the template parameter value. |
static TreeMap |
getTemplates(CmsObject cms)
Returns a sorted Map of all available templates of the OpenCms modules. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
boolean |
isCreateIndexMode()
Returns true if the current mode is: create an index page in a newly created folder. |
String |
paramsAsHidden()
Overrides the super implementation to avoid problems with double reqource input fields. |
void |
setParamBodyFile(String bodyFile)
Sets the body file parameter value. |
void |
setParamDialogmode(String value)
Sets the value of the dialogmode parameter. |
void |
setParamTemplate(String template)
Sets the template parameter value. |
| Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
|---|
dialogTitle, getAdminTool, getCurrentToolPath, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamPath, setParamRoot, setParamStyle, useNewStyle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PARAM_BODYFILE
public static final String PARAM_TEMPLATE
| Constructor Detail |
|---|
public CmsNewResourceXmlPage(CmsJspActionElement jsp)
jsp - an initialized JSP action element
public CmsNewResourceXmlPage(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
context - the JSP page contextreq - the JSP requestres - the JSP response| Method Detail |
|---|
public static TreeMap getBodies(CmsObject cms)
throws CmsException
cms - the current cms object
CmsException - if reading a folder or file fails
public static TreeMap getTemplates(CmsObject cms)
throws CmsException
cms - the current cms object
CmsException - if reading a folder or file fails
protected static TreeMap getElements(CmsObject cms,
String elementFolder)
throws CmsException
cms - the current cms objectelementFolder - the module subfolder to serach for elements
CmsException - if reading a folder or file fails
public void actionCloseDialog()
throws JspException
This method overwrites the close dialog method in the super class, because in case a new folder was created before, after this dialog the tree view has to be refreshed.
It tries to include the URI stored in the workplace settings. This URI is determined by the frame name, which has to be set in the framename parameter.
actionCloseDialog in class CmsDialogJspException - if including an element fails
public void actionCreateResource()
throws JspException
actionCreateResource in class CmsNewResourceJspException - if inclusion of error dialog fails
public void actionEditProperties()
throws IOException,
JspException,
ServletException
If the parameter is not true, the dialog will be closed.
actionEditProperties in class CmsNewResourceIOException - if forwarding to the property dialog fails
ServletException - if forwarding to the property dialog fails
JspException - if an inclusion failspublic String buildSelectBodyFile(String attributes)
attributes - optional attributes for the <select> tag
public String buildSelectTemplates(String attributes)
attributes - optional attributes for the <select> tag
public String getParamBodyFile()
public String getParamDialogmode()
The dialogmode parameter stores the different modes of the property dialog, e.g. for displaying other buttons in the new resource wizard.
public String getParamTemplate()
public boolean isCreateIndexMode()
public String paramsAsHidden()
paramsAsHidden in class CmsWorkplaceCmsWorkplace.paramsAsHidden()public void setParamBodyFile(String bodyFile)
bodyFile - the body file parameter valuepublic void setParamDialogmode(String value)
value - the value to setpublic void setParamTemplate(String template)
template - the template parameter value
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings,
HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues in class CmsNewResourcesettings - the workplace settingsrequest - the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||