Access keys for a quick navigation0: Top of pagen: Main navigationDirect links to main chapters: h: home; 1; about OLAT; 2: download; 3: developmentSearch field: so: Top navigationm: Menuc: Content areab: One step back (if available)
THIRDROW
OLAT Logo

Code samples

If you are looking for code samples it's best to see working code from OLAT. To make this process as easy as possible we have enabled in the demo.olat.org a special tab called gui demo, which you can see if you log in as administrator. The gui demo tab contains most of the widgets from the OLAT framework you can work with.

To view the source code which consists normaly from a velocity file which acts as a html template and a java controller class which fills the template with variables and receives events and refreshes the component if necessary you can click the "view java source code" or "view velocity source code" from the gui demo stuff you are interested in.

This gui demo tab is specially enhanced with the source view links but you can achieve the same behavior by clicking the small green bug icon on the upper left corner which shows you a developer toolbar with a debug button. By pressing the debug button the layout gets spitted into its components and you can hover over the edges to get the classes and velocity files sourcecode.

You can turn on both the green bug icon and the gui demo tab in your development environment. First is done be turning debug to true in the build.properties file and second by uncommenting the gui demo tab in the olat_extensions.xml file.

OLAT view via the gui demoOLAT view via the gui demo

Read more in the technical documentation.

RSS