Antonio Goncalves created FORGE-2368:
----------------------------------------
Summary: Being able to create a new JSF Template
Key: FORGE-2368
URL:
https://issues.jboss.org/browse/FORGE-2368
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.16.2.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
At the moment the only JSF template that is generated is through scaffolding. It would be
good to have a command to create a template such as :
{code}
faces-new-template --named mytemplate
{code}
This will create a mytemplate.xhtml under the {{resources}} webapp directory. You could
also give a different directory with :
{code}
faces-new-template --named mytemplate --targetDirectory admin
{code}
This will create the page under webapp/resources/admin/mytemplate.xhtml.
{code}
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>#{empty pageTitle ? 'Page Title' : pageTitle}</title>
</h:head>
<h:body>
<ui:debug rendered="#{facesContext.application.projectStage ==
'Development'}" />
<div id="content">
<h1>
<ui:insert name="header" />
</h1>
<h2>
<ui:insert name="subheader" />
</h2>
<ui:insert name="main" />
</div>
</div>
<footer>
<p>Powered by <a
href="http://jboss.org/forge">Forge</a></p>
</footer>
</h:body>
</html>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)