com.jalios.jcms.taglib
Class DataChooserTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.jalios.jcms.taglib.FormWidgetTag
          extended by com.jalios.jcms.taglib.DataChooserTag
All Implemented Interfaces:
JcmsConstants, JaliosConstants, Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class DataChooserTag
extends FormWidgetTag

This tag generates the form widget to select a data (Publication or Member)

Version:
$Revision: 27753 $ TODO: FileDocument Chooser
Author:
Olivier Dedieu
See Also:
Serialized Form

Field Summary
protected  int addCount
           
protected  String chooser
           
protected  int chooserHeight
           
protected  int chooserWidth
           
protected  String customUrlParams
           
protected  Data data
           
protected  List dataList
           
protected  int FIELD_ID
           
protected  int FIELD_TITLE
           
static String GRP_CHOOSER_ICON
           
protected  String icon
           
protected  String[] ids
           
protected  int incCount
           
static String LIST_ICON
           
protected  boolean listvalue
           
static String MBR_CHOOSER_ICON
           
protected  boolean multivalue
           
protected  String multivalueIdSeparator
           
static String REVISION
           
protected  int size
           
protected  boolean submitFormWYSIWYG
           
protected  Class superClass
           
protected  String tooltip
           
protected  String[] values
           
static String WORKSPACE_CHOOSER_ICON
           
 
Fields inherited from class com.jalios.jcms.taglib.FormWidgetTag
channel, contextPath, css, formElementCount, formName, jcmsContext, loggedMember, userLang, widgetName, workspace
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CRYPT_MD5, CRYPT_UNDEFINED, CRYPT_UNIX, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
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
DataChooserTag()
           
 
Method Summary
protected  void clean()
           
protected  boolean displayListvalueChooser()
           
protected  boolean displayMultivalueChooser()
           
 int doEndTag()
           
 int doStartTag()
           
protected  boolean findChooser()
          Set chooser, tooltip, width, height
protected  int getFieldAddCount()
           
protected  int getFieldCount()
           
protected  String getFieldValue(int type, int index)
           
 String getHtmlCode()
           
protected  String getMoreChooserIcons(String itDataId, String indexElement)
           
protected  int getNextFieldAddCount()
           
protected  String resolveTitle(Data data)
          Resolve Data Title
 void setAddCount(int addCount)
           
 void setCustomUrlParams(String customUrlParams)
           
 void setData(Data data)
           
 void setDataList(Collection dataList)
           
 void setIncCount(int incCount)
           
 void setListvalue(boolean listvalue)
           
 void setMultivalue(boolean multivalue)
           
 void setMultivalueIdSeparator(String multivalueIdSeparator)
           
 void setSize(int size)
           
 void setSuperClass(Class superClass)
           
 
Methods inherited from class com.jalios.jcms.taglib.FormWidgetTag
setCss, setFormElementCount, setFormName, setWidgetName
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

LIST_ICON

public static final String LIST_ICON
See Also:
Constant Field Values

MBR_CHOOSER_ICON

public static final String MBR_CHOOSER_ICON
See Also:
Constant Field Values

GRP_CHOOSER_ICON

public static final String GRP_CHOOSER_ICON
See Also:
Constant Field Values

WORKSPACE_CHOOSER_ICON

public static final String WORKSPACE_CHOOSER_ICON
See Also:
Constant Field Values

superClass

protected Class superClass

data

protected Data data

dataList

protected List dataList

size

protected int size

multivalue

protected boolean multivalue

multivalueIdSeparator

protected String multivalueIdSeparator

listvalue

protected boolean listvalue

customUrlParams

protected String customUrlParams

submitFormWYSIWYG

protected boolean submitFormWYSIWYG

addCount

protected int addCount

incCount

protected int incCount

chooserWidth

protected int chooserWidth

chooserHeight

protected int chooserHeight

chooser

protected String chooser

tooltip

protected String tooltip

icon

protected String icon

FIELD_ID

protected final int FIELD_ID
See Also:
Constant Field Values

FIELD_TITLE

protected final int FIELD_TITLE
See Also:
Constant Field Values

ids

protected String[] ids

values

protected String[] values
Constructor Detail

DataChooserTag

public DataChooserTag()
Method Detail

setSuperClass

public void setSuperClass(Class superClass)

setData

public void setData(Data data)

setSize

public void setSize(int size)

setDataList

public void setDataList(Collection dataList)

setCustomUrlParams

public void setCustomUrlParams(String customUrlParams)

setMultivalue

public void setMultivalue(boolean multivalue)

setMultivalueIdSeparator

public void setMultivalueIdSeparator(String multivalueIdSeparator)

setListvalue

public void setListvalue(boolean listvalue)

setAddCount

public void setAddCount(int addCount)

setIncCount

public void setIncCount(int incCount)

clean

protected void clean()
Overrides:
clean in class FormWidgetTag

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class FormWidgetTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class FormWidgetTag

displayMultivalueChooser

protected boolean displayMultivalueChooser()
Returns:
boolean return true if the chooser must be display all value in one widget

displayListvalueChooser

protected boolean displayListvalueChooser()
Returns:
boolean return true if the chooser must be display all value in multiple widget

getFieldCount

protected int getFieldCount()
Returns:
int the global number of field to add

getFieldAddCount

protected int getFieldAddCount()

getNextFieldAddCount

protected int getNextFieldAddCount()

findChooser

protected boolean findChooser()
Set chooser, tooltip, width, height

Returns:
false if chooser could not be find

getFieldValue

protected String getFieldValue(int type,
                               int index)
Parameters:
type - the type of field, ie FIELD_ID for id and FIELD_TITLE for title
index - the position in the array of the data
Returns:
the value of the field
Since:
jcms-4.1

resolveTitle

protected String resolveTitle(Data data)
Resolve Data Title

Parameters:
data -
Returns:
the resolved title
Since:
jcms-4.1

getMoreChooserIcons

protected String getMoreChooserIcons(String itDataId,
                                     String indexElement)

getHtmlCode

public String getHtmlCode()
Returns:
the HTML fields


Copyright © 2001-2010 Jalios SA. All Rights Reserved.