XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.x Future
    • 2.16.2.Final
    • Java EE
    • None

      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 :

      faces-new-template --named mytemplate
      

      This will create a mytemplate.xhtml under the resources webapp directory. You could also give a different directory with :

      faces-new-template --named mytemplate --targetDirectory admin
      

      This will create the page under webapp/resources/admin/mytemplate.xhtml.

      <!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>
      

              Unassigned Unassigned
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: