public abstract class IlvScriptDescriptor extends Object
Constructor and Description |
---|
IlvScriptDescriptor(String id)
Builds a new instance of a Script descriptor.
|
IlvScriptDescriptor(String id,
IlvScriptDescriptor superDescriptor)
Builds a new instance of a Script descriptor.
|
Modifier and Type | Method and Description |
---|---|
void |
addJSCodeAfterImport(IlvScriptManager scriptManager,
jakarta.faces.context.ResponseWriter writer)
Renders optional static JavaScript code to customize the imported scripts.
|
void |
addJSCodeBeforeImport(IlvScriptManager scriptManager,
jakarta.faces.context.ResponseWriter writer)
Renders optional static JavaScript code to customize the imported scripts.
|
abstract void |
addScriptsToLoad(IlvScriptManager scriptManager,
Writer writer)
Adds the scripts needed by the associated component.
|
protected void |
endScriptSection(Writer writer)
Renders to the writer the ending of a script section.
|
String |
getContextPath() |
String |
getId()
Returns the ID of the renderer associated with this script descriptor.
|
String |
getJSResource(String file)
Returns the URL of a JavaScript resource using the resource
servlet.
|
String |
getJSResource(String directory,
String file)
Returns the URL of a JavaScript resource using the resource
servlet.
|
String |
getResource(String directory,
String file,
String type)
Returns the URL of the resource using the resource servlet.
|
protected void |
startScriptSection(Writer writer)
Renders to the writer the starting of a script section.
|
public IlvScriptDescriptor(String id)
id
- The ID of the class.public IlvScriptDescriptor(String id, IlvScriptDescriptor superDescriptor)
id
- The identifier of the renderer.superDescriptor
- The super class descriptor.public String getId()
public abstract void addScriptsToLoad(IlvScriptManager scriptManager, Writer writer)
IlvScriptManager.addScript(String)
method to add a script to import.scriptManager
- The script manager.writer
- The writer into which to write.public void addJSCodeBeforeImport(IlvScriptManager scriptManager, jakarta.faces.context.ResponseWriter writer)
This code is rendered after the scripts declaration.
This default implementation does nothing.
scriptManager
- The script managerwriter
- The response writer.public void addJSCodeAfterImport(IlvScriptManager scriptManager, jakarta.faces.context.ResponseWriter writer)
This code is rendered after the scripts declaration.
This default implementation does nothing.
scriptManager
- The script managerwriter
- The response writer.public String getJSResource(String file)
file
- The name of the resource to load.public String getJSResource(String directory, String file)
directory
- The subdirectory where the resource is located.file
- The name of the resource to load.public String getResource(String directory, String file, String type)
directory
- The subdirectory where the resource is located.file
- The name of the resource to load.type
- The HTML type of the resource to load.public String getContextPath()
protected void startScriptSection(Writer writer) throws IOException
writer
- The writerIOException
IlvDHTMLUtil.startScriptSection(Writer)
protected void endScriptSection(Writer writer) throws IOException
writer
- The writerIOException
IlvDHTMLUtil.endScriptSection(Writer)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.