lumis.doui.control.script
Class ScriptControl

Package class diagram package ScriptControl
java.lang.Object
  extended by lumis.doui.control.Control
      extended by lumis.doui.control.script.ScriptControl
All Implemented Interfaces:
VariableResolver, IControl

public class ScriptControl
extends Control

Renders client side script. The script value is specified within a script node and may contain custom tags like <lum_formName/> to be replaced runtime with the curren form name, and <lum_translate>STR_XXXX<lum_translate/> to be localized to the users locale.

Example use:

<control:lum_script> <script> function chooseScheduleType(scheduleType) { var d = document; var choice = scheduleType.selectedIndex; switch(choice) { case 0: d.getElementById("divScheduleWeek").style.display = "none"; d.getElementById("divScheduleMonth").style.display = "none"; break; case 1: d.getElementById("divScheduleWeek").style.display = ""; d.getElementById("divScheduleMonth").style.display = "none"; break; case 2: d.getElementById("divScheduleWeek").style.display = "none"; d.getElementById("divScheduleMonth").style.display = ""; break; } } chooseScheduleType(document.getElementById("scheduleType")); </script> </control:lum_script> xml data available for xsl rendering: <control id="8A488A031150E335011150ECC3C00118" type="lum_script"> <script>function chooseScheduleType(scheduleType) { var d = document; var choice = scheduleType.selectedIndex; switch(choice) { case 0: d.getElementById("divScheduleWeek").style.display = "none"; d.getElementById("divScheduleMonth").style.display = "none"; break; case 1: d.getElementById("divScheduleWeek").style.display = ""; d.getElementById("divScheduleMonth").style.display = "none"; break; case 2: d.getElementById("divScheduleWeek").style.display = "none"; d.getElementById("divScheduleMonth").style.display = ""; break; } } chooseScheduleType(document.getElementById("scheduleType"));</script> </control>

Since:
4.0.3

Field Summary
 
Fields inherited from class lumis.doui.control.Control
childControls, controlContainer, controlDefinitionNode, controlResource, douiContext, hasValidatorSubControls, isValid, locale, ON_EVENT_CLOSE_WINDOW, ON_EVENT_LINK, ON_EVENT_POPUP_LINK_OR_RUNTIME_INTERFACE, ON_EVENT_POPUP_RUNTIME_INTERFACE, ON_EVENT_PROCESS_ACTION, ON_EVENT_RENDER_ACTION, ON_EVENT_SCRIPT, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE
 
Constructor Summary
ScriptControl()
           
 
Method Summary
 void setRenderData()
           
 
Methods inherited from class lumis.doui.control.Control
appendSubControl, appendSubControls, applyOnEventScripts, buildSubControls, convertToStandardValue, createContainer, disconnect, fixedIdentifierRequired, generateControlId, getAdditionalParameters, getAncestor, getChildControls, getClientEventHandlerScript, getControlResource, getId, getLocale, getParentControl, getPrepareForReadScript, getRenderData, getResources, getRuntimeDefaultSource, getScriptActionValidation, getScriptGetValues, getScriptGetValuesFunctionImplementation, getScriptGetValuesFunctionName, getScriptGetValuesRegistration, getSourceContext, getStringsToLocalize, getType, getValidationScript, init, isValid, localize, localizeStrings, processCustomTags, registerOnEventScript, removeChild, removeChildren, resolveVariable, setRuntimeAttributes, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptControl

public ScriptControl()
Method Detail

setRenderData

public void setRenderData()
                   throws PortalException
Specified by:
setRenderData in interface IControl
Overrides:
setRenderData in class Control
Throws:
PortalException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.