View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.uif.element;
17  
18  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19  import org.kuali.rice.krad.datadictionary.parse.BeanTags;
20  
21  /**
22   * General component that allows custom HTML to be inserted into the view.
23   *
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  @BeanTags({@BeanTag(name = "content", parent = "Uif-Content")})
27  public class Content extends ContentElementBase {
28      private static final long serialVersionUID = 1992141937575230344L;
29  
30      private String markup;
31  
32      public Content() {
33          super();
34  
35          setSelfRendered(true);
36      }
37  
38      /**
39       * HTML content that should be rendered in the components position.
40       *
41       * <p>Note this is not exported as bean tag attribute. Special handling allows the content to be
42       * embedded within the content tag without specifying the markup property.</p>
43       *
44       * @return String html markup
45       */
46      public String getMarkup() {
47          return markup;
48      }
49  
50      /**
51       * @see Content#getMarkup()
52       */
53      public void setMarkup(String markup) {
54          this.markup = markup;
55      }
56  
57      /**
58       * {@inheritDoc}
59       */
60      @Override
61      public String getRenderedHtmlOutput() {
62          return getMarkup();
63      }
64  
65  }
66