001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.taglib.ddm.base;
016    
017    import javax.servlet.http.HttpServletRequest;
018    import javax.servlet.jsp.JspException;
019    
020    /**
021     * @author Bruno Basto
022     * @generated
023     */
024    public class BaseHTMLFieldTag extends com.liferay.taglib.util.IncludeTag {
025    
026            @Override
027            public int doStartTag() throws JspException {
028                    setAttributeNamespace(_ATTRIBUTE_NAMESPACE);
029    
030                    return super.doStartTag();
031            }
032    
033            public long getClassNameId() {
034                    return _classNameId;
035            }
036    
037            public long getClassPK() {
038                    return _classPK;
039            }
040    
041            public com.liferay.portlet.dynamicdatamapping.storage.Field getField() {
042                    return _field;
043            }
044    
045            public java.lang.String getFieldsNamespace() {
046                    return _fieldsNamespace;
047            }
048    
049            public boolean getReadOnly() {
050                    return _readOnly;
051            }
052    
053            public boolean getRepeatable() {
054                    return _repeatable;
055            }
056    
057            public java.util.Locale getRequestedLocale() {
058                    return _requestedLocale;
059            }
060    
061            public void setClassNameId(long classNameId) {
062                    _classNameId = classNameId;
063    
064                    setScopedAttribute("classNameId", classNameId);
065            }
066    
067            public void setClassPK(long classPK) {
068                    _classPK = classPK;
069    
070                    setScopedAttribute("classPK", classPK);
071            }
072    
073            public void setField(com.liferay.portlet.dynamicdatamapping.storage.Field field) {
074                    _field = field;
075    
076                    setScopedAttribute("field", field);
077            }
078    
079            public void setFieldsNamespace(java.lang.String fieldsNamespace) {
080                    _fieldsNamespace = fieldsNamespace;
081    
082                    setScopedAttribute("fieldsNamespace", fieldsNamespace);
083            }
084    
085            public void setReadOnly(boolean readOnly) {
086                    _readOnly = readOnly;
087    
088                    setScopedAttribute("readOnly", readOnly);
089            }
090    
091            public void setRepeatable(boolean repeatable) {
092                    _repeatable = repeatable;
093    
094                    setScopedAttribute("repeatable", repeatable);
095            }
096    
097            public void setRequestedLocale(java.util.Locale requestedLocale) {
098                    _requestedLocale = requestedLocale;
099    
100                    setScopedAttribute("requestedLocale", requestedLocale);
101            }
102    
103            @Override
104            protected void cleanUp() {
105                    _classNameId = 0;
106                    _classPK = 0;
107                    _field = null;
108                    _fieldsNamespace = null;
109                    _readOnly = false;
110                    _repeatable = true;
111                    _requestedLocale = null;
112            }
113    
114            @Override
115            protected String getEndPage() {
116                    return _END_PAGE;
117            }
118    
119            @Override
120            protected String getStartPage() {
121                    return _START_PAGE;
122            }
123    
124            @Override
125            protected void setAttributes(HttpServletRequest request) {
126                    setNamespacedAttribute(request, "classNameId", _classNameId);
127                    setNamespacedAttribute(request, "classPK", _classPK);
128                    setNamespacedAttribute(request, "field", _field);
129                    setNamespacedAttribute(request, "fieldsNamespace", _fieldsNamespace);
130                    setNamespacedAttribute(request, "readOnly", _readOnly);
131                    setNamespacedAttribute(request, "repeatable", _repeatable);
132                    setNamespacedAttribute(request, "requestedLocale", _requestedLocale);
133            }
134    
135            protected static final String _ATTRIBUTE_NAMESPACE = "ddm:html-field:";
136    
137            private static final String _END_PAGE =
138                    "/html/taglib/ddm/html_field/end.jsp";
139    
140            private static final String _START_PAGE =
141                    "/html/taglib/ddm/html_field/start.jsp";
142    
143            private long _classNameId = 0;
144            private long _classPK = 0;
145            private com.liferay.portlet.dynamicdatamapping.storage.Field _field = null;
146            private java.lang.String _fieldsNamespace = null;
147            private boolean _readOnly = false;
148            private boolean _repeatable = true;
149            private java.util.Locale _requestedLocale = null;
150    
151    }