com.softwareag.mdm.ui
Class UIResponseContext

java.lang.Object
  extended bycom.softwareag.mdm.ui.UIContext
      extended bycom.softwareag.mdm.ui.UIResponseContext

public class UIResponseContext
extends UIContext

Encapsulates a HTTP response so that a UIBeanEditor is able to generate its part of the DHTML page.

See Also:
UIBeanEditor

Method Summary
 UIResponseContext add_cr(String aString)
          Writes a String to the HTTP output stream and adds a carriage return to the HTML source at the end.
 UIResponseContext add(int integer)
          This writes an int to the HTTP output stream.
 UIResponseContext add(String aString)
          Writes a string to the HTTP output stream.
 void addUIBean(Path aPath, String htmlAttributes)
          The path specified must not refer to an indexed element in its last position.
 void addUIBestMatchingDisplay(Path aPath, UIRenderingMode renderingMode, String htmlAttributes)
           
 void addUIBestMatchingEditor(Path aPath, String htmlAttributes)
           
 void addUICheckBox(int index, Path aPath, String htmlAttributes)
           
 void addUICheckBox(Path aPath, String htmlAttributes)
           
 void addUICheckBoxGroup(Path aPath, String htmlAttributes)
           
 void addUICheckBoxGroup(Path aPath, String htmlAttributes, Nomenclature aSpecificNomenclature)
           
 void addUICheckBoxGroup(Path aPath, String htmlAttributes, String htmlSeparator)
           
 void addUICheckBoxGroup(Path aPath, String htmlAttributes, String htmlSeparator, Nomenclature aSpecificNomenclature)
           
 void addUIComplexEditor(Path aPath, String htmlAttributes)
          The path specified must not refer to an indexed element in its last position.
 void addUIDescription(Path aPath)
           
 void addUIDisplayValue(Path aPath)
           
 void addUIDropDownBox(Path aPath, String htmlAttributes)
           
 void addUIDropDownBox(Path aPath, String htmlAttributes, Nomenclature aSpecificNomenclature)
           
 void addUIDropDownBoxMultiple(Path aPath, String htmlAttributes)
           
 void addUILabel(Path aPath)
           
 void addUIOccurrenceEditor(Path aPath, String htmlAttributes)
          The path specified must refer to an indexed element in its last position.
 void addUIPasswordInputField(Path aPath, String htmlAttributes)
           
 void addUIRadioButton(Path aPath, String htmlAttributes, boolean setCode, boolean setLabel, int index)
           
 void addUIRadioButtonGroup(Path aPath, String htmlAttributes)
           
 void addUIRadioButtonGroup(Path aPath, String htmlAttributes, String htmlSeparator)
           
 void addUITextAreaField(Path aPath, String htmlAttributes)
           
 void addUITextHiddenInputField(Path aPath, String htmlAttributes)
           
 void addUITextInputField(Path aPath, String htmlAttributes)
           
 void addUIValidationMessage(Path aPath)
          Adds the validation message associated with the node specified.
 void doEnsureValueIsDefined()
          Preinstantiates a value on the current node.
 void enableEscapedHtml(boolean enabled)
          Enables temporarily or disables the Escaped HTML stream writing.
 UIRenderingMode getRenderingMode()
          Returns the current rendering mode.
 String getURLForResource(ResourceType aResourceType, String aResourceName)
          Returns the URL of the Web resource specified, in the current module and for the current session locale.
 String getURLForResource(ResourceType aResourceType, String aResourceName, Locale aLocale)
          Returns the URL of the Web resource specified, in the current module (that is, the module of the current adaptation).
 String getURLForResource(String aModuleAliasOrName, ResourceType aResourceType, String aResourceName, Locale aLocale)
          Returns the URL of the Web resource specified.
 ValueContextForValidation getValueContext()
          Returns the validation context of the current node.
 ValueContextForValidation getValueContext(Path aPath)
          Returns the validation context of the node specified.
 boolean isEscapedHtmlEnable()
          Test if output stream is currently escaping HTML .
 UIResponseContext jsBufferAddJavaScriptExpression(String aJavaScriptExpression)
          Adds a javascript expression to javascript writer.
 UIResponseContext jsBufferAddString(String aString)
          Adds a javascript expression to javascript writer.
 UIResponseContext jsBufferEndOfLine()
          Adds an end of line when adding content to javascript writer.
 UIResponseContext jsBufferInitalize()
          Initializes a javascript writer.
 UIResponseContext jsBufferNewLine()
          Continue adding content to javascript writer as a new line of js code
 UIResponseContext jsBufferReenable(boolean isJsBufferWritingModeTemporaryDisabled)
          Ensures javascript buffer writing mode must be re-enabled.
 boolean jsBufferTemporaryDisable()
          Ensures javascript buffer writing mode is temporary disabled.
 
Methods inherited from class com.softwareag.mdm.ui.UIContext
getLocale, getNode, getNode, getPathInAdaptation, getSession, getValue, getValue, getWebName, getWebNameFor, getWebNameForPath, getWebNameOfParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getURLForResource

public String getURLForResource(ResourceType aResourceType,
                                String aResourceName)
Returns the URL of the Web resource specified, in the current module and for the current session locale.

See Also:
getURLForResource(ResourceType, String, Locale), UIContext.getLocale()

getURLForResource

public String getURLForResource(ResourceType aResourceType,
                                String aResourceName,
                                Locale aLocale)
Returns the URL of the Web resource specified, in the current module (that is, the module of the current adaptation).

Throws:
UnsupportedOperationException - if the resource type is internal (not accessible from HTTP).

getURLForResource

public String getURLForResource(String aModuleAliasOrName,
                                ResourceType aResourceType,
                                String aResourceName,
                                Locale aLocale)
                         throws ModuleNotFoundException
Returns the URL of the Web resource specified.

Throws:
UnsupportedOperationException - if the resource type is internal (not accessible from HTTP).
ModuleNotFoundException - if the alias or name specified does not correspond to a module.

getValueContext

public ValueContextForValidation getValueContext()
Returns the validation context of the current node.


getValueContext

public ValueContextForValidation getValueContext(Path aPath)
Returns the validation context of the node specified.


add

public UIResponseContext add(String aString)
Writes a string to the HTTP output stream.


add

public UIResponseContext add(int integer)
This writes an int to the HTTP output stream.


add_cr

public UIResponseContext add_cr(String aString)
Writes a String to the HTTP output stream and adds a carriage return to the HTML source at the end. It *does not* do any flush or any Carriage return to the HTML view.


addUIBestMatchingEditor

public void addUIBestMatchingEditor(Path aPath,
                                    String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIBestMatchingDisplay

public void addUIBestMatchingDisplay(Path aPath,
                                     UIRenderingMode renderingMode,
                                     String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIDisplayValue

public void addUIDisplayValue(Path aPath)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)

addUICheckBox

public void addUICheckBox(Path aPath,
                          String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUICheckBox

public void addUICheckBox(int index,
                          Path aPath,
                          String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUICheckBoxGroup

public void addUICheckBoxGroup(Path aPath,
                               String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUICheckBoxGroup

public void addUICheckBoxGroup(Path aPath,
                               String htmlAttributes,
                               String htmlSeparator)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component
htmlSeparator - optional, a specific HTML string as value separator (display inline: space, or in column: <br>)

addUICheckBoxGroup

public void addUICheckBoxGroup(Path aPath,
                               String htmlAttributes,
                               Nomenclature aSpecificNomenclature)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUICheckBoxGroup

public void addUICheckBoxGroup(Path aPath,
                               String htmlAttributes,
                               String htmlSeparator,
                               Nomenclature aSpecificNomenclature)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component
htmlSeparator - optional, a specific HTML string as value separator (display inline: space, or in column: <br>)

addUIDropDownBox

public void addUIDropDownBox(Path aPath,
                             String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIDropDownBox

public void addUIDropDownBox(Path aPath,
                             String htmlAttributes,
                             Nomenclature aSpecificNomenclature)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIDropDownBoxMultiple

public void addUIDropDownBoxMultiple(Path aPath,
                                     String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUILabel

public void addUILabel(Path aPath)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)

addUIDescription

public void addUIDescription(Path aPath)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)

addUIValidationMessage

public void addUIValidationMessage(Path aPath)
Adds the validation message associated with the node specified.

Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)

addUIOccurrenceEditor

public void addUIOccurrenceEditor(Path aPath,
                                  String htmlAttributes)
The path specified must refer to an indexed element in its last position. For example: .[0]

Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIComplexEditor

public void addUIComplexEditor(Path aPath,
                               String htmlAttributes)
The path specified must not refer to an indexed element in its last position.

Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIBean

public void addUIBean(Path aPath,
                      String htmlAttributes)
The path specified must not refer to an indexed element in its last position.

Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIRadioButton

public void addUIRadioButton(Path aPath,
                             String htmlAttributes,
                             boolean setCode,
                             boolean setLabel,
                             int index)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIRadioButtonGroup

public void addUIRadioButtonGroup(Path aPath,
                                  String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIRadioButtonGroup

public void addUIRadioButtonGroup(Path aPath,
                                  String htmlAttributes,
                                  String htmlSeparator)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component
htmlSeparator - optional, a specific HTML string as value separator (display inline: space, or in column: <br>)

addUITextAreaField

public void addUITextAreaField(Path aPath,
                               String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUITextInputField

public void addUITextInputField(Path aPath,
                                String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUIPasswordInputField

public void addUIPasswordInputField(Path aPath,
                                    String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

addUITextHiddenInputField

public void addUITextHiddenInputField(Path aPath,
                                      String htmlAttributes)
Parameters:
aPath - required, location of the target relatively to the current node (for a better reusability, it is advised to use a relative path)
htmlAttributes - optional, the string is added to the attributes of the main HTML component

jsBufferAddJavaScriptExpression

public UIResponseContext jsBufferAddJavaScriptExpression(String aJavaScriptExpression)
Adds a javascript expression to javascript writer.


jsBufferAddString

public UIResponseContext jsBufferAddString(String aString)
Adds a javascript expression to javascript writer.


jsBufferEndOfLine

public UIResponseContext jsBufferEndOfLine()
Adds an end of line when adding content to javascript writer.


jsBufferInitalize

public UIResponseContext jsBufferInitalize()
Initializes a javascript writer.


jsBufferNewLine

public UIResponseContext jsBufferNewLine()
Continue adding content to javascript writer as a new line of js code


jsBufferReenable

public UIResponseContext jsBufferReenable(boolean isJsBufferWritingModeTemporaryDisabled)
Ensures javascript buffer writing mode must be re-enabled.

The boolean argument must be the result of a previous call to method jsBufferTemporaryDisable().

See Also:
jsBufferTemporaryDisable(), jsBufferNewLine()

jsBufferTemporaryDisable

public boolean jsBufferTemporaryDisable()
Ensures javascript buffer writing mode is temporary disabled.

Returns true if current mode was writting javascript buffer.

See Also:
jsBufferNewLine(), jsBufferReenable(boolean)

doEnsureValueIsDefined

public void doEnsureValueIsDefined()
Preinstantiates a value on the current node. This is needed for generating the user interface with adequate default values and structure.


enableEscapedHtml

public void enableEscapedHtml(boolean enabled)
Enables temporarily or disables the Escaped HTML stream writing.

See Also:
isEscapedHtmlEnable()

isEscapedHtmlEnable

public boolean isEscapedHtmlEnable()
Test if output stream is currently escaping HTML .

See Also:
enableEscapedHtml(boolean)

getRenderingMode

public UIRenderingMode getRenderingMode()
Returns the current rendering mode.



(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.