Source

Source viewer is used to display source code. It provides syntax highlighting for many different languages.

Example
Documentation

<t:source lineNumbers="true" language="java">
    public class MyJavaClass {
        public static void main(String[] args) {
            System.out.println("Syntax highlighting");
        }
    }
</t:source>

The result will be rendered like this:


public class MyJavaClass {
    public static void main(String[] args) {
        System.out.println("Syntax highlighting");
    }
}

Source viewer is used to display source code. It provides syntax highlighting for many different languages.

Info
Tag name source
Component type io.tornadofaces.component.Source
Renderer type io.tornadofaces.component.SourceRenderer
Attributes
NameDescriptionRequired
lineNumbersShow line numbers. Defaults to true.false
languageThe language to syntax highlight. Supports 'markup', 'css', 'scss', 'clike', 'javascript', 'java'. Defaults to 'markup'.false
styleClassStyles to apply to the ul element.false
styleCSS Styles applied to the ul element.false
renderedShould this component be rendered?false