001: /*
002: * File : $Source: /usr/local/cvs/alkacon/com.alkacon.opencms.formgenerator/src/com/alkacon/opencms/formgenerator/CmsDynamicField.java,v $
003: * Date : $Date: 2008-02-07 11:52:02 $
004: * Version: $Revision: 1.1 $
005: *
006: * This file is part of the Alkacon OpenCms Add-On Module Package
007: *
008: * Copyright (c) 2007 Alkacon Software GmbH (http://www.alkacon.com)
009: *
010: * The Alkacon OpenCms Add-On Module Package is free software:
011: * you can redistribute it and/or modify
012: * it under the terms of the GNU General Public License as published by
013: * the Free Software Foundation, either version 3 of the License, or
014: * (at your option) any later version.
015: *
016: * The Alkacon OpenCms Add-On Module Package is distributed
017: * in the hope that it will be useful,
018: * but WITHOUT ANY WARRANTY; without even the implied warranty of
019: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
020: * GNU General Public License for more details.
021: *
022: * You should have received a copy of the GNU General Public License
023: * along with the Alkacon OpenCms Add-On Module Package.
024: * If not, see http://www.gnu.org/licenses/.
025: *
026: * For further information about Alkacon Software GmbH, please see the
027: * company website: http://www.alkacon.com.
028: *
029: * For further information about OpenCms, please see the
030: * project website: http://www.opencms.org.
031: */
032:
033: package com.alkacon.opencms.formgenerator;
034:
035: import org.opencms.i18n.CmsMessages;
036:
037: /**
038: * Represents a dynamic field, ie. its value will be generated just before committing data.<p>
039: *
040: * @author Michael Moossen
041: *
042: * @version $Revision: 1.1 $
043: *
044: * @since 7.0.4
045: */
046: public class CmsDynamicField extends A_CmsField {
047:
048: /** Field type: dynamic field. */
049: private static final String TYPE = "dynamic";
050:
051: /** The already resolved value. */
052: private String m_resolvedValue;
053:
054: /**
055: * Returns the type of the input field, e.g. "text" or "select".<p>
056: *
057: * @return the type of the input field
058: */
059: public static String getStaticType() {
060:
061: return TYPE;
062: }
063:
064: /**
065: * @see com.alkacon.opencms.formgenerator.I_CmsField#buildHtml(CmsFormHandler, org.opencms.i18n.CmsMessages, String, boolean)
066: */
067: public String buildHtml(CmsFormHandler formHandler,
068: CmsMessages messages, String errorKey, boolean showMandatory) {
069:
070: StringBuffer buf = new StringBuffer();
071: return buf.toString();
072: }
073:
074: /**
075: * Returns the already resolved value.<p>
076: *
077: * @return the already resolved value
078: */
079: public String getResolvedValue() {
080:
081: return m_resolvedValue;
082: }
083:
084: /**
085: * @see com.alkacon.opencms.formgenerator.I_CmsField#getType()
086: */
087: public String getType() {
088:
089: return TYPE;
090: }
091:
092: /**
093: * Sets the already resolved value.<p>
094: *
095: * @param resolvedValue the resolved value to set
096: */
097: public void setResolvedValue(String resolvedValue) {
098:
099: m_resolvedValue = resolvedValue;
100: }
101: }
|