@StableMinor(version="12.4", sinceVersion="4.0") public class Control extends Object implements IControl, VariableResolver
Modifier and Type | Field and Description |
---|---|
protected ArrayList<IControl> |
childControls |
protected ControlContainer |
controlContainer |
protected Node |
controlDefinitionNode |
protected IResource |
controlResource |
protected DouiContext |
douiContext |
protected boolean |
hasValidatorSubControls |
protected boolean |
isValid |
protected Locale |
locale |
static String |
ON_EVENT_CLOSE_WINDOW |
static String |
ON_EVENT_LINK |
static String |
ON_EVENT_POPUP_LINK_OR_RUNTIME_INTERFACE |
static String |
ON_EVENT_POPUP_RUNTIME_INTERFACE |
static String |
ON_EVENT_PROCESS_ACTION |
static String |
ON_EVENT_RENDER_ACTION |
static String |
ON_EVENT_REPLACE_INTERFACE |
static String |
ON_EVENT_SCRIPT |
static String |
ON_EVENT_VALIDATE |
protected HashMap<String,String> |
onEventScripts |
static String |
PARAMETER_TYPE_FIRST_SELECTED |
static String |
PARAMETER_TYPE_GET_VALUE |
protected IControl |
parentControl |
protected List<IResource> |
resources |
protected String |
type |
static String |
VALIDATION_SELECTED_MANY |
static String |
VALIDATION_SELECTED_ONE |
Constructor and Description |
---|
Control() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendSubControl(Node subControlNode) |
protected void |
appendSubControls(String subControlsXmlString) |
protected void |
applyOnEventScripts() |
void |
buildSubControls() |
protected String |
convertToStandardValue(String value)
Deprecated.
Since 8.0.0. Consider using
DouiStandardValue.convertStandardValue(DouiContext, Object) instead. |
void |
createContainer(String containerId)
Creates a container for the control.
|
void |
disconnect() |
protected boolean |
fixedIdentifierRequired() |
protected String |
generateControlId() |
protected String |
generateControlIdPrefix() |
protected String |
getAdditionalParameters(Node onEventNode) |
protected String |
getAdditionalParameters(Node onEventNode,
boolean otherParametersExist) |
protected <T extends IControl> |
getAncestor(Class<T> ancestorClass)
Searchs for an ancestor control assignable to the given class.
|
List<IControl> |
getChildControls() |
protected String |
getClientEventHandlerScript(String eventName,
boolean forHref) |
IResource |
getControlResource() |
String |
getId() |
protected Locale |
getLocale() |
String |
getName()
Returns the name for this control.
|
String |
getNamespace()
Returns the namespace for this control.
|
IControl |
getParentControl() |
String |
getPrepareForReadScript() |
String |
getRenderData()
Returns an xml string representation of the control for rendering via xsl.
|
List<IResource> |
getResources() |
protected Source |
getRuntimeDefaultSource()
Returns default source to use in the context of the current control when
evaluating runtime attributes.
|
protected String |
getScriptActionValidation(Node[] actionNodes,
String formName,
ITransaction portalTransaction) |
ISourceContext |
getSourceContext() |
protected Map<String,String> |
getStringsToLocalize() |
String |
getType() |
protected String |
getValidationScript(Node onEventNode) |
protected String |
getWindowProperties(String interfaceId)
Returns the window properties used when a "popupRunTimeInterface" is used as an event handler.
|
protected String |
getWindowProperties(String interfaceId,
String popupSize) |
void |
init(Node controlDefinitionNode,
ControlContainer controlContainer,
IControl parentControl) |
protected boolean |
isRequired()
Returns whether this control is required.
The default implementation checks whether there is a RequiredValueValidatorControl bound to this control. |
boolean |
isValid() |
protected String |
localize(String text) |
protected void |
localizeStrings() |
protected String |
processCustomTags(String scriptNodeText) |
void |
registerOnEventScript(String onEvent,
String script) |
void |
removeChild(IControl childControl) |
void |
removeChildren() |
Object |
resolveVariable(String name) |
protected void |
setName(String name)
Sets the name for this control.
|
void |
setRenderData() |
void |
setRuntimeAttributes()
Replaces runtime attributes in this control's definition node with their evaluated values.
|
void |
setValid(boolean isValid) |
public static final String ON_EVENT_POPUP_RUNTIME_INTERFACE
public static final String ON_EVENT_PROCESS_ACTION
public static final String ON_EVENT_RENDER_ACTION
public static final String ON_EVENT_CLOSE_WINDOW
public static final String ON_EVENT_LINK
public static final String ON_EVENT_SCRIPT
public static final String ON_EVENT_POPUP_LINK_OR_RUNTIME_INTERFACE
public static final String ON_EVENT_REPLACE_INTERFACE
public static final String ON_EVENT_VALIDATE
public static final String VALIDATION_SELECTED_ONE
public static final String VALIDATION_SELECTED_MANY
public static final String PARAMETER_TYPE_FIRST_SELECTED
public static final String PARAMETER_TYPE_GET_VALUE
protected DouiContext douiContext
protected Node controlDefinitionNode
protected ControlContainer controlContainer
protected IControl parentControl
protected IResource controlResource
protected Locale locale
protected boolean isValid
protected boolean hasValidatorSubControls
protected String type
public void init(Node controlDefinitionNode, ControlContainer controlContainer, IControl parentControl) throws PortalException
init
in interface IControl
PortalException
protected boolean fixedIdentifierRequired()
protected String generateControlId()
protected String generateControlIdPrefix()
public void buildSubControls() throws PortalException
buildSubControls
in interface IControl
PortalException
protected void appendSubControls(String subControlsXmlString) throws PortalException
PortalException
protected void appendSubControl(Node subControlNode) throws PortalException
PortalException
public void disconnect() throws PortalException
disconnect
in interface IControl
PortalException
public void removeChild(IControl childControl) throws PortalException
removeChild
in interface IControl
PortalException
public void removeChildren() throws PortalException
removeChildren
in interface IControl
PortalException
public List<IControl> getChildControls() throws PortalException
getChildControls
in interface IControl
PortalException
protected Source getRuntimeDefaultSource()
public Object resolveVariable(String name) throws ELException
resolveVariable
in interface VariableResolver
ELException
public void setRuntimeAttributes()
IControl
This method is executed before IControl.setRenderData()
by the ControlContainer
.
setRuntimeAttributes
in interface IControl
ControlContainer
public void setRenderData() throws PortalException
setRenderData
in interface IControl
PortalException
public String getName()
IControl
protected void setName(String name)
The generic control implementation usually sets its name during
init(Node, ControlContainer, IControl)
based on the control
definition xml. This method may be used to change its name.
name
- the name to set.public String getType()
public IControl getParentControl()
getParentControl
in interface IControl
protected String getClientEventHandlerScript(String eventName, boolean forHref) throws ControlException, PortalException
ControlException
PortalException
protected String getWindowProperties(String interfaceId) throws PortalException
interfaceId
- the interface identifier that is the target for opening.PortalException
protected String getWindowProperties(String interfaceId, String popupSize) throws PortalException
PortalException
protected String getScriptActionValidation(Node[] actionNodes, String formName, ITransaction portalTransaction) throws PortalException
PortalException
protected String getValidationScript(Node onEventNode) throws PortalException
PortalException
public List<IResource> getResources() throws PortalException
getResources
in interface IControl
PortalException
protected String getAdditionalParameters(Node onEventNode) throws PortalException
PortalException
protected String getAdditionalParameters(Node onEventNode, boolean otherParametersExist) throws PortalException
PortalException
@Deprecated protected String convertToStandardValue(String value) throws PortalException
DouiStandardValue.convertStandardValue(DouiContext, Object)
instead.PortalException
DouiStandardValue.convertStandardValue(DouiContext, Object)
public IResource getControlResource() throws PortalException
getControlResource
in interface IControl
PortalException
public void registerOnEventScript(String onEvent, String script) throws PortalException
registerOnEventScript
in interface IControl
PortalException
protected void applyOnEventScripts() throws PortalException
PortalException
public boolean isValid() throws PortalException
isValid
in interface IControl
PortalException
public void setValid(boolean isValid) throws PortalException
setValid
in interface IControl
isValid
- The isValid to set.PortalException
protected Locale getLocale()
protected String localize(String text) throws PortalException
PortalException
protected void localizeStrings() throws PortalException
PortalException
protected <T extends IControl> T getAncestor(Class<T> ancestorClass)
T
- the ancestor class for compile-time type casting checking.ancestorClass
- the class or interface the ancestor control must be assignable to.public ISourceContext getSourceContext()
protected String processCustomTags(String scriptNodeText) throws PortalException
PortalException
public String getPrepareForReadScript() throws PortalException
getPrepareForReadScript
in interface IControl
PortalException
public void createContainer(String containerId) throws PortalException
IControl
This method us used by the framework when a control needs to be updated client side.
createContainer
in interface IControl
PortalException
public String getRenderData() throws PortalException
IControl
getRenderData
in interface IControl
PortalException
public String getNamespace()
protected boolean isRequired() throws PortalException
RequiredValueValidatorControl
bound to this control.PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.