[JBoss JIRA] (FORGE-1461) "project-new" command fails while a ResourceTransaction is active
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1461?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1461.
----------------------------------
Fix Version/s: 2.1.2.Final
(was: 2.x Future)
Resolution: Done
> "project-new" command fails while a ResourceTransaction is active
> -----------------------------------------------------------------
>
> Key: FORGE-1461
> URL: https://issues.jboss.org/browse/FORGE-1461
> Project: Forge
> Issue Type: Feature Request
> Components: Builtin Plugins, Resources
> Affects Versions: 2.0.0.CR1
> Reporter: Lincoln Baxter III
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.1.2.Final
>
>
> {code}[Desktop]$ transaction-start
> ***SUCCESS*** Resource Transaction started
> [Desktop]$ project-new
> --named --topLevelPackage --targetLocation --version
> --finalName --buildSystem --type
> [Desktop]$ project-new --named example
> ***SUCCESS*** Project named 'example' has been created.
> Exception when parsing/running: project-new --named example, Current working directory must be a directory
> [Desktop]$
> [Desktop]$
> [Desktop]$ ls
> pom.xml src
> [Desktop]$ cd ..
> [Desktop]$ ls
> example
> [Desktop]$ transaction-commit
> [Desktop]$
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1640) Cannot execute a command on several lines
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1640:
----------------------------------------
Summary: Cannot execute a command on several lines
Key: FORGE-1640
URL: https://issues.jboss.org/browse/FORGE-1640
Project: Forge
Issue Type: Sub-task
Components: UI - Shell
Affects Versions: 2.1.1.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
I have the following script (notice the ';' at the end) which executes fine with the run command :
{code}
java-new-enum --named Language --targetPackage com.test.model ;
{code}
But if I have the same command on several lines, it doesn't work anymore (so the ';' doesn't seem to mark the end of line)
{code}
java-new-enum
--named Language
--targetPackage com.test.model ;
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1639) UISelectMany does not work with options that have spaces
by Max Barkley (JIRA)
Max Barkley created FORGE-1639:
----------------------------------
Summary: UISelectMany does not work with options that have spaces
Key: FORGE-1639
URL: https://issues.jboss.org/browse/FORGE-1639
Project: Forge
Issue Type: Bug
Components: UI - Shell
Affects Versions: 2.1.1.Final
Environment: Fedora 18
Reporter: Max Barkley
In the shell, forge cannot auto-complete or even execute a command that involves a {{UISelectMany}} option with a space.
Pressing tab causes the first word to be repeated, and manually typing and running the command does nothing.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1623) Could not register resource monitor with track-changes
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1623?page=com.atlassian.jira.plugin... ]
George Gastaldi reopened FORGE-1623:
------------------------------------
> Could not register resource monitor with track-changes
> ------------------------------------------------------
>
> Key: FORGE-1623
> URL: https://issues.jboss.org/browse/FORGE-1623
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 2.1.1.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.1.2.Final
>
>
> Creating a project with {{track-changes}} creates an exception :
> {code}
> [Forge]$ project-new --named test1
> ***SUCCESS*** Project named 'test1' has been created.
> [test1]$ track-changes
> ***SUCCESS*** Resource change tracking is ON.
> [test1]$ cd ..
> [Forge]$ project-new --named test2
> ***ERROR*** Could not register resource monitor
> [Forge]$
> {code}
> The exception is the following :
> {code}
> 19:06:33,624 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter] (AeshProcess: 1) Failed to execute [project-new] due to exception.: java.lang.IllegalStateException: Could not register resource monitor
> at org.jboss.forge.addon.resource.monitor.FileMonitor.registerMonitor(FileMonitor.java:90) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.ResourceFactoryImpl.monitor(ResourceFactoryImpl.java:100) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.ResourceFactoryImpl.monitor(ResourceFactoryImpl.java:86) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.AbstractFileResource.monitor(AbstractFileResource.java:363) [resources-api-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.projects.impl.ProjectFactoryImpl.cacheProject(ProjectFactoryImpl.java:404)
> at org.jboss.forge.addon.projects.impl.ProjectFactoryImpl.createProject(ProjectFactoryImpl.java:316)
> at org.jboss.forge.addon.projects.ui.NewProjectWizard.execute(NewProjectWizard.java:375)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
> at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59) [furnace-proxy-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34) [furnace-api-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75) [furnace-proxy-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.projects.ui.NewProjectWizard_$$_javassist_1bff18e1-ed11-48bb-8b1e-3a451b01843a.execute(NewProjectWizard_$$_javassist_1bff18e1-ed11-48bb-8b1e-3a451b01843a.java)
> at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.execute(WizardCommandControllerImpl.java:153) [ui-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.execute(NoUIWizardControllerDecorator.java:152) [ui-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:69) [shell-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:292) [aesh-0.49.jar:0.49]
> at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:36) [aesh-0.49.jar:0.49]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
> Caused by: java.nio.file.NoSuchFileException: /Users/antoniombp/Documents/Code/temp/Forge/test2
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) [rt.jar:1.7.0_45]
> at java.nio.file.Files.readAttributes(Files.java:1684) [rt.jar:1.7.0_45]
> at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:105) [rt.jar:1.7.0_45]
> at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69) [rt.jar:1.7.0_45]
> at java.nio.file.Files.walkFileTree(Files.java:2600) [rt.jar:1.7.0_45]
> at java.nio.file.Files.walkFileTree(Files.java:2633) [rt.jar:1.7.0_45]
> at org.jboss.forge.addon.resource.monitor.FileWatcher.registerAll(FileWatcher.java:122) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.monitor.FileWatcher.register(FileWatcher.java:86) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.monitor.FileMonitor.registerMonitor(FileMonitor.java:86) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> ... 22 more
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1635) Shouldn't these commands be isProjectRequired() return true
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1635?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1635.
----------------------------------
Fix Version/s: 2.1.2.Final
(was: 2.x Future)
Resolution: Done
> Shouldn't these commands be isProjectRequired() return true
> -----------------------------------------------------------
>
> Key: FORGE-1635
> URL: https://issues.jboss.org/browse/FORGE-1635
> Project: Forge
> Issue Type: Feature Request
> Components: UI - Shell
> Affects Versions: 2.1.1.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.1.2.Final
>
>
> When we run Forge and press TAB without creating a new project, a set of commands appear. But I think the following ones do not make sense without a project :
> {code}
> faces-new-validator-method
> faces-new-converter
> faces-new-validator
> jpa-new-entity
> jpa-new-field
> ejb-new-bean
> ejb-set-class-transaction-attribute
> ejb-set-method-transaction-attribute
> {code}
> Shouldn't they be :
> {code}
> @Override
> protected boolean isProjectRequired()
> {
> return true;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1635) Shouldn't these commands be isProjectRequired() return true
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1635?page=com.atlassian.jira.plugin... ]
Antonio Goncalves reassigned FORGE-1635:
----------------------------------------
Assignee: Antonio Goncalves
> Shouldn't these commands be isProjectRequired() return true
> -----------------------------------------------------------
>
> Key: FORGE-1635
> URL: https://issues.jboss.org/browse/FORGE-1635
> Project: Forge
> Issue Type: Feature Request
> Components: UI - Shell
> Affects Versions: 2.1.1.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> When we run Forge and press TAB without creating a new project, a set of commands appear. But I think the following ones do not make sense without a project :
> {code}
> faces-new-validator-method
> faces-new-converter
> faces-new-validator
> jpa-new-entity
> jpa-new-field
> ejb-new-bean
> ejb-set-class-transaction-attribute
> ejb-set-method-transaction-attribute
> {code}
> Shouldn't they be :
> {code}
> @Override
> protected boolean isProjectRequired()
> {
> return true;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1623) Could not register resource monitor with track-changes
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1623?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1623.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.1.2.Final
Resolution: Done
Monitor should not happen on resources under a transaction.
> Could not register resource monitor with track-changes
> ------------------------------------------------------
>
> Key: FORGE-1623
> URL: https://issues.jboss.org/browse/FORGE-1623
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 2.1.1.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.1.2.Final
>
>
> Creating a project with {{track-changes}} creates an exception :
> {code}
> [Forge]$ project-new --named test1
> ***SUCCESS*** Project named 'test1' has been created.
> [test1]$ track-changes
> ***SUCCESS*** Resource change tracking is ON.
> [test1]$ cd ..
> [Forge]$ project-new --named test2
> ***ERROR*** Could not register resource monitor
> [Forge]$
> {code}
> The exception is the following :
> {code}
> 19:06:33,624 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter] (AeshProcess: 1) Failed to execute [project-new] due to exception.: java.lang.IllegalStateException: Could not register resource monitor
> at org.jboss.forge.addon.resource.monitor.FileMonitor.registerMonitor(FileMonitor.java:90) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.ResourceFactoryImpl.monitor(ResourceFactoryImpl.java:100) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.ResourceFactoryImpl.monitor(ResourceFactoryImpl.java:86) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.AbstractFileResource.monitor(AbstractFileResource.java:363) [resources-api-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.projects.impl.ProjectFactoryImpl.cacheProject(ProjectFactoryImpl.java:404)
> at org.jboss.forge.addon.projects.impl.ProjectFactoryImpl.createProject(ProjectFactoryImpl.java:316)
> at org.jboss.forge.addon.projects.ui.NewProjectWizard.execute(NewProjectWizard.java:375)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
> at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59) [furnace-proxy-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34) [furnace-api-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75) [furnace-proxy-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.projects.ui.NewProjectWizard_$$_javassist_1bff18e1-ed11-48bb-8b1e-3a451b01843a.execute(NewProjectWizard_$$_javassist_1bff18e1-ed11-48bb-8b1e-3a451b01843a.java)
> at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.execute(WizardCommandControllerImpl.java:153) [ui-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.execute(NoUIWizardControllerDecorator.java:152) [ui-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:69) [shell-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:292) [aesh-0.49.jar:0.49]
> at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:36) [aesh-0.49.jar:0.49]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
> Caused by: java.nio.file.NoSuchFileException: /Users/antoniombp/Documents/Code/temp/Forge/test2
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) [rt.jar:1.7.0_45]
> at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) [rt.jar:1.7.0_45]
> at java.nio.file.Files.readAttributes(Files.java:1684) [rt.jar:1.7.0_45]
> at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:105) [rt.jar:1.7.0_45]
> at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69) [rt.jar:1.7.0_45]
> at java.nio.file.Files.walkFileTree(Files.java:2600) [rt.jar:1.7.0_45]
> at java.nio.file.Files.walkFileTree(Files.java:2633) [rt.jar:1.7.0_45]
> at org.jboss.forge.addon.resource.monitor.FileWatcher.registerAll(FileWatcher.java:122) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.monitor.FileWatcher.register(FileWatcher.java:86) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> at org.jboss.forge.addon.resource.monitor.FileMonitor.registerMonitor(FileMonitor.java:86) [resources-impl-2.1.1.Final.jar:2.1.1.Final]
> ... 22 more
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (FORGE-1594) Being able to create an empty JSF page
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1594?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-1594:
-------------------------------------
Description:
At the moment the only way to generate JSF pages is with scaffolding. When you create an application, you realize that these scaffolded pages are not enough and that you need to create new ones. To save time and help the developer in creating new pages, it would be good to have a command such :
{code}
faces-new-view --named mypage
{code}
This will create a mypage.xhtml on the root of the webapp directory. You could also give a different directory with :
{code}
faces-new-view --named mypage --targetDirectory admin
{code}
This will create the page under webapp/admin/mypage.xhtml.
{code}
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="/resources/scaffold/pageTemplate.xhtml">
<ui:param name="pageTitle" value="mypage"/>
<ui:define name="header">
mypage
</ui:define>
<ui:define name="subheader">
mypage
</ui:define>
<ui:define name="footer"/>
<ui:define name="main">
</ui:define>
</ui:composition>
{code}
The name of the page {{mypage}} is used for the title, header, subheader. But we could customize this using optional attributes for title, header, subheader :
{code}
faces-new-view --named mypage --targetDirectory admin --title Administration Page --header Admin Header --subheader Admin Sub Header
{code}
It would just create a minimum JSF page such as :
{code}
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="/resources/scaffold/pageTemplate.xhtml">
<ui:param name="pageTitle" value="Administration Page"/>
<ui:define name="header">
Admin Header
</ui:define>
<ui:define name="subheader">
Admin Sub Header
</ui:define>
<ui:define name="footer"/>
<ui:define name="main">
</ui:define>
</ui:composition>
{code}
If there were several templates, we could do :
{code}
faces-new-view --named mypage --template MyTemplate.xhtml
{code}
PS : I'm on holidays skiing, and the internet connection is really bad. So I could search for similar JIRAs if they existed
was:
At the moment the only way to generate JSF pages is with scaffolding. When you create an application, you realize that these scaffolded pages are not enough and that you need to create new ones. To save time and help the developer in creating new pages, it would be good to have a command such :
{code}
faces-new-page --named mypage
{code}
This will create a mypage.xhtml on the root of the webapp directory. You could also give a different directory with :
{code}
faces-new-page --named mypage --targetDirectory admin
{code}
This will create the page under webapp/admin/mypage.xhtml.
{code}
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="/resources/scaffold/pageTemplate.xhtml">
<ui:param name="pageTitle" value="mypage"/>
<ui:define name="header">
mypage
</ui:define>
<ui:define name="subheader">
mypage
</ui:define>
<ui:define name="footer"/>
<ui:define name="main">
</ui:define>
</ui:composition>
{code}
The name of the page {{mypage}} is used for the title, header, subheader. But we could customize this using optional attributes for title, header, subheader :
{code}
faces-new-page --named mypage --targetDirectory admin --title Administration Page --header Admin Header --subheader Admin Sub Header
{code}
It would just create a minimum JSF page such as :
{code}
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="/resources/scaffold/pageTemplate.xhtml">
<ui:param name="pageTitle" value="Administration Page"/>
<ui:define name="header">
Admin Header
</ui:define>
<ui:define name="subheader">
Admin Sub Header
</ui:define>
<ui:define name="footer"/>
<ui:define name="main">
</ui:define>
</ui:composition>
{code}
PS : I'm on holidays skiing, and the internet connection is really bad. So I could search for similar JIRAs if they existed
> Being able to create an empty JSF page
> --------------------------------------
>
> Key: FORGE-1594
> URL: https://issues.jboss.org/browse/FORGE-1594
> Project: Forge
> Issue Type: Sub-task
> Components: Scaffold
> Affects Versions: 2.0.0.Final
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future
>
>
> At the moment the only way to generate JSF pages is with scaffolding. When you create an application, you realize that these scaffolded pages are not enough and that you need to create new ones. To save time and help the developer in creating new pages, it would be good to have a command such :
> {code}
> faces-new-view --named mypage
> {code}
> This will create a mypage.xhtml on the root of the webapp directory. You could also give a different directory with :
> {code}
> faces-new-view --named mypage --targetDirectory admin
> {code}
> This will create the page under webapp/admin/mypage.xhtml.
> {code}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://xmlns.jcp.org/jsf/html"
> xmlns:f="http://xmlns.jcp.org/jsf/core"
> xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
> template="/resources/scaffold/pageTemplate.xhtml">
> <ui:param name="pageTitle" value="mypage"/>
> <ui:define name="header">
> mypage
> </ui:define>
> <ui:define name="subheader">
> mypage
> </ui:define>
> <ui:define name="footer"/>
> <ui:define name="main">
> </ui:define>
> </ui:composition>
> {code}
> The name of the page {{mypage}} is used for the title, header, subheader. But we could customize this using optional attributes for title, header, subheader :
> {code}
> faces-new-view --named mypage --targetDirectory admin --title Administration Page --header Admin Header --subheader Admin Sub Header
> {code}
> It would just create a minimum JSF page such as :
> {code}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://xmlns.jcp.org/jsf/html"
> xmlns:f="http://xmlns.jcp.org/jsf/core"
> xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
> template="/resources/scaffold/pageTemplate.xhtml">
> <ui:param name="pageTitle" value="Administration Page"/>
> <ui:define name="header">
> Admin Header
> </ui:define>
> <ui:define name="subheader">
> Admin Sub Header
> </ui:define>
> <ui:define name="footer"/>
> <ui:define name="main">
> </ui:define>
> </ui:composition>
> {code}
> If there were several templates, we could do :
> {code}
> faces-new-view --named mypage --template MyTemplate.xhtml
> {code}
> PS : I'm on holidays skiing, and the internet connection is really bad. So I could search for similar JIRAs if they existed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month