O'Reilly logo

Liferay 6.2 User Interface Development by Jonas X. Yuan, Xinsheng Chen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Web content based on structure

Web content based on structure consists of three parts: structure, template, and content. The following Java code explains how these three components are related to each other:

public class WebContent {
  public static void main(String[] args) {
  String contentStr = template("Immigration Reform", 2013);
  System.out.println(contentStr);
}
  public static String template(String structureVariableTitle, int structureVariableYear) {
  StringBuffer strB = new StringBuffer();
  strB.append("<h1>").append(structureVariableStr).append("</h1>");
  strB.append(structureVariableInt);
  return strB.toString();
}
}

A structure defines variables. There are select-box-type variables, text box variables, Documents-and-Media-type variables, and other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required