001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.uif.element;
017
018import org.kuali.rice.krad.datadictionary.parse.BeanTag;
019import org.kuali.rice.krad.datadictionary.parse.BeanTags;
020
021/**
022 * General component that allows custom HTML to be inserted into the view.
023 *
024 * @author Kuali Rice Team (rice.collab@kuali.org)
025 */
026@BeanTags({@BeanTag(name = "content", parent = "Uif-Content")})
027public class Content extends ContentElementBase {
028    private static final long serialVersionUID = 1992141937575230344L;
029
030    private String markup;
031
032    public Content() {
033        super();
034
035        setSelfRendered(true);
036    }
037
038    /**
039     * HTML content that should be rendered in the components position.
040     *
041     * <p>Note this is not exported as bean tag attribute. Special handling allows the content to be
042     * embedded within the content tag without specifying the markup property.</p>
043     *
044     * @return String html markup
045     */
046    public String getMarkup() {
047        return markup;
048    }
049
050    /**
051     * @see Content#getMarkup()
052     */
053    public void setMarkup(String markup) {
054        this.markup = markup;
055    }
056
057    /**
058     * {@inheritDoc}
059     */
060    @Override
061    public String getRenderedHtmlOutput() {
062        return getMarkup();
063    }
064
065}
066