JBoss.orgCommunity Documentation

View

The following is a sample code of the View template of a content node:



<%
  def node = uicomponent.getNode() ;
  def originalNode = uicomponent.getOriginalNode()
%>


<%=node.getName()%>


<%
  if(node.hasProperty("exo:title")) {
%>
  <%=node.getProperty("exo:title").getString()%>
<%
  }
%>


<%
  import java.text.SimpleDateFormat ;
  SimpleDateFormat dateFormat = new SimpleDateFormat() ;
%>
...
<%
  if(node.hasProperty("exo:date")) {
    dateFormat.applyPattern("MMMMM dd yyyy") ;                      
%>
    <%=dateFormat.format(node.getProperty("exo:date").getDate().getTime())%>
<%
  }
%>


<%=_ctx.appRes("Sample.view.label.node-name")%>