org.opensubsystems.patterns.dialoglayout.www
Class MultiControlTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.opensubsystems.core.www.PageElementCacheTag
              extended by org.opensubsystems.core.www.BlockElementTag
                  extended by org.opensubsystems.patterns.dialoglayout.www.MultiControlTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class MultiControlTag
extends org.opensubsystems.core.www.BlockElementTag

Custom tag to generate all HTML code necessary to display dialog control consisting from multiple controls from which only one is dislayed at a time. This allows user to enter data using different type of control based on the data type, but the data can be still identified with the same label and context help. Currently this control supports only edit field and combo box. TODO: For Julo: TLD contains attribute maxlength but it is not implemented anywhere in this class. I think it is needed for the edit field so you need to add it here and implement all methods and passing it to the control. Once you do so update the TLD description for that attribute to demonstrate purpose. The same is for inputcssclass attribute in TLD.

Version:
$Id: MultiControlTag.java,v 1.6 2007/01/07 06:14:28 bastafidli Exp $
Author:
Julian Legeny
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.3 2006/09/05 23:36:08 jlegeny

Field Summary
protected  java.lang.String m_strComboControl
          Flag specifying if a combobox control has to be generated or not as part of this multi control.
protected  java.lang.String m_strEditControl
          Flag specifying if an edit field control has to be generated as part of this multi control.
protected  java.lang.String m_strOnChangeCombo
          JavaScript code to execute when the selection changes in combobox.
protected  java.lang.String m_strOnKeyUpEdit
          JavaScript code to execute on key up event of edit field.
protected  java.lang.String m_strSize
          Size of the input tag used to limit viewable area.
 
Fields inherited from class org.opensubsystems.core.www.BlockElementTag
CURRENT_ELEMENT_ID, DIV_BLOCK_ELEMENT, m_strCssclass, m_strIdSuffix, m_strRelatedIds, m_strStyle, m_strType, SPAN_BLOCK_ELEMENT
 
Fields inherited from class org.opensubsystems.core.www.PageElementCacheTag
CACHE_INDICATOR, CSS_ELEMENT, JS_ELEMENT, m_strCacheas, m_strId, PAGE_ELEMENTS_CACHE, SCRIPT_ELEMENT
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
MultiControlTag()
          Constructor for custom tag.
 
Method Summary
 int doEndTag()
          
 int doStartTag()
          
 java.lang.String getCombocontrol()
           
 java.lang.String getEditcontrol()
           
 java.lang.String getOnchangecombo()
           
 java.lang.String getOnkeyupedit()
           
 java.lang.String getSize()
           
 boolean isComboControl()
           
 boolean isEditControl()
           
 void setCombocontrol(boolean bComboControl)
           
 void setCombocontrol(java.lang.String strComboControl)
           
 void setEditcontrol(boolean bEditControl)
           
 void setEditcontrol(java.lang.String strEditControl)
           
 void setOnchangecombo(java.lang.String strOnChangeCombo)
           
 void setOnkeyupedit(java.lang.String strOnKeyUpEdit)
           
 void setSize(java.lang.String strSize)
           
 
Methods inherited from class org.opensubsystems.core.www.BlockElementTag
adjustId, getCssclass, getCurrentId, getRelatedids, getStyle, getType, isRelatedIdsTag, popCurrentId, pushCurrentId, restoreId, setCssclass, setRelatedids, setRelatedids, setStoredId, setStyle, setType
 
Methods inherited from class org.opensubsystems.core.www.PageElementCacheTag
cache, getCacheas, getCachedContent, getCachedContent, getCachedContent, getCachedContentElements, getId, setCacheas, setId
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

m_strComboControl

protected java.lang.String m_strComboControl
Flag specifying if a combobox control has to be generated or not as part of this multi control. Default value is true.


m_strEditControl

protected java.lang.String m_strEditControl
Flag specifying if an edit field control has to be generated as part of this multi control. Default value is true.


m_strSize

protected java.lang.String m_strSize
Size of the input tag used to limit viewable area. TODO: For Julo: This attribute is never used.


m_strOnChangeCombo

protected java.lang.String m_strOnChangeCombo
JavaScript code to execute when the selection changes in combobox.


m_strOnKeyUpEdit

protected java.lang.String m_strOnKeyUpEdit
JavaScript code to execute on key up event of edit field.

Constructor Detail

MultiControlTag

public MultiControlTag()
Constructor for custom tag.

Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class org.opensubsystems.core.www.BlockElementTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class org.opensubsystems.core.www.BlockElementTag
Throws:
javax.servlet.jsp.JspException

getCombocontrol

public java.lang.String getCombocontrol()
Returns:
String - If combobox control should be shown then this attribute should say true or 1.

setCombocontrol

public void setCombocontrol(java.lang.String strComboControl)
Parameters:
strComboControl - - If combobox control should be shown then this attribute should say true or 1.

setCombocontrol

public void setCombocontrol(boolean bComboControl)
Parameters:
bComboControl - - If combobox control should be shown then this attribute should say true or 1.

isComboControl

public boolean isComboControl()
Returns:
boolean - true if combobox control has to be generated

getEditcontrol

public java.lang.String getEditcontrol()
Returns:
String - If edit control should be shown then this attribute should say true or 1.

setEditcontrol

public void setEditcontrol(java.lang.String strEditControl)
Parameters:
strEditControl - - If edit control should be shown then this attribute should say true or 1.

setEditcontrol

public void setEditcontrol(boolean bEditControl)
Parameters:
bEditControl - - If edit control should be shown then this attribute should say true or 1.

isEditControl

public boolean isEditControl()
Returns:
boolean - true if combo has to be generated

getSize

public java.lang.String getSize()
Returns:
String - Size of the input tag used to limit viewable area.

setSize

public void setSize(java.lang.String strSize)
Parameters:
strSize - - Size of the input tag used to limit viewable area.

getOnchangecombo

public java.lang.String getOnchangecombo()
Returns:
String - JavaScript code to execute when the selection changes.

setOnchangecombo

public void setOnchangecombo(java.lang.String strOnChangeCombo)
Parameters:
strOnChangeCombo - - JavaScript code to execute when the selection changes.

getOnkeyupedit

public java.lang.String getOnkeyupedit()
Returns:
String - JavaScript code to execute when the the content of edit field is changed.

setOnkeyupedit

public void setOnkeyupedit(java.lang.String strOnKeyUpEdit)
Parameters:
strOnKeyUpEdit - - JavaScript code to execute on key up event of the edit field.


Copyright © 2003 - 2006 OpenSubsystems s.r.o.