<%
         import org.apache.commons.lang.StringEscapeUtils;

	 def rcontext = _ctx.getRequestContext();
	 String inputId=  uicomponent.FIELD_TITLEINPUT;
	 String untitledLabel = StringEscapeUtils.escapeJavaScript(_ctx.appRes("UIWikiPageTitleControlArea.label.Untitled"));
	 boolean isAddMode = uicomponent.isAddMode();
	 def requireJs = rcontext.getJavascriptManager().getRequireJS();
   requireJs.require("SHARED/UIWikiPageTitleControlArea", "UIWikiPageTitleControlArea");
   requireJs.addScripts("UIWikiPageTitleControlArea.init('"+ uicomponent.id+"', '" + inputId + "', '" + untitledLabel +  "', " + isAddMode + ");");
%>

<div class="uiWikiPageTitle" id="$uicomponent.id" >
 <%	List children = uicomponent.getChildren() ;
    for(component in children) {
      if(component.isRendered()){
        uicomponent.renderChild(component.getClass()) ;
      }
    }
	%>
</div>
