[JBoss JIRA] (FORGE-1594) Being able to create a new JSF View
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1594?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-1594:
-------------------------------------
Summary: Being able to create a new JSF View (was: Being able to create a new View)
> Being able to create a new JSF View
> -----------------------------------
>
> 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
> Labels: starter
> 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 was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2177) Being able to create a new REST endpoint
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2177?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2177:
-------------------------------------
Description:
It would be good to have a command to create a REST endpoint. A command like this :
{code}
rest-new-endpoint --named MyEndpoint
{code}
Would generate
{code}
@Path("/myEndpoint")
public class CustomerEndpoint
{
}
{code}
Changing the path would be :
{code}
rest-new-endpoint --named MyEndPoint --path endpoint
{code}
This would generate :
{code}
@Path("/endpoint")
public class CustomerEndpoint
{
}
{code}
Also, a REST configuration class needs to be creates, such as :
{code}
@ApplicationPath("/rest")
public class RestApplication extends Application
{
}
{code}
was:
It would be good to have a command to create a REST endpoint. A command like this :
{code}
rest-new-endpoint --named MyEndpoint
{code}
Would generate
{code}
@Path("/myEndpoint")
public class CustomerEndpoint
{
}
{code}
Changing the path would be :
{code}
rest-new-endpoint --named MyEndPoint --path endpoint
{code}
This would generate :
{code}
@Path("/endpoint")
public class CustomerEndpoint
{
}
{code}
> Being able to create a new REST endpoint
> ----------------------------------------
>
> Key: FORGE-2177
> URL: https://issues.jboss.org/browse/FORGE-2177
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.13.0.Final
> Reporter: Antonio Goncalves
> Labels: Starter
> Fix For: 2.x Future
>
>
> It would be good to have a command to create a REST endpoint. A command like this :
> {code}
> rest-new-endpoint --named MyEndpoint
> {code}
> Would generate
> {code}
> @Path("/myEndpoint")
> public class CustomerEndpoint
> {
> }
> {code}
> Changing the path would be :
> {code}
> rest-new-endpoint --named MyEndPoint --path endpoint
> {code}
> This would generate :
> {code}
> @Path("/endpoint")
> public class CustomerEndpoint
> {
> }
> {code}
> Also, a REST configuration class needs to be creates, such as :
> {code}
> @ApplicationPath("/rest")
> public class RestApplication extends Application
> {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2177) Being able to create a new REST endpoint
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2177?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2177:
-------------------------------------
Description:
It would be good to have a command to create a REST endpoint. A command like this :
{code}
rest-new-endpoint --named MyEndpoint
{code}
Would generate
{code}
@Path("/myEndpoint")
public class CustomerEndpoint
{
}
{code}
Changing the path would be :
{code}
rest-new-endpoint --named MyEndPoint --path endpoint
{code}
This would generate :
{code}
@Path("/endpoint")
public class CustomerEndpoint
{
}
{code}
was:
It would be good to have a command to create a REST endpoint. A command like this :
{code}
rest-new-endpoint --named MyEndPoint
{code}
Would generate
{code}
@Path("/myEndpoint")
public class CustomerEndpoint
{
}
{code}
Changing the path would be :
{code}
rest-new-endpoint --named MyEndPoint --path endpoint
{code}
This would generate :
{code}
@Path("/endpoint")
public class CustomerEndpoint
{
}
{code}
> Being able to create a new REST endpoint
> ----------------------------------------
>
> Key: FORGE-2177
> URL: https://issues.jboss.org/browse/FORGE-2177
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.13.0.Final
> Reporter: Antonio Goncalves
> Labels: Starter
> Fix For: 2.x Future
>
>
> It would be good to have a command to create a REST endpoint. A command like this :
> {code}
> rest-new-endpoint --named MyEndpoint
> {code}
> Would generate
> {code}
> @Path("/myEndpoint")
> public class CustomerEndpoint
> {
> }
> {code}
> Changing the path would be :
> {code}
> rest-new-endpoint --named MyEndPoint --path endpoint
> {code}
> This would generate :
> {code}
> @Path("/endpoint")
> public class CustomerEndpoint
> {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2177) Being able to create a new REST endpoint
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2177?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2177:
-------------------------------------
Description:
It would be good to have a command to create a REST endpoint. A command like this :
{code}
rest-new-endpoint --named MyEndPoint
{code}
Would generate
{code}
@Path("/myEndpoint")
public class CustomerEndpoint
{
}
{code}
Changing the path would be :
{code}
rest-new-endpoint --named MyEndPoint --path endpoint
{code}
This would generate :
{code}
@Path("/endpoint")
public class CustomerEndpoint
{
}
{code}
was:
It would be good to have a command to create a REST endpoint. A command like this :
{code}
rest-new-endpoint --named MyEndPoint
{code}
> Being able to create a new REST endpoint
> ----------------------------------------
>
> Key: FORGE-2177
> URL: https://issues.jboss.org/browse/FORGE-2177
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.13.0.Final
> Reporter: Antonio Goncalves
> Labels: Starter
> Fix For: 2.x Future
>
>
> It would be good to have a command to create a REST endpoint. A command like this :
> {code}
> rest-new-endpoint --named MyEndPoint
> {code}
> Would generate
> {code}
> @Path("/myEndpoint")
> public class CustomerEndpoint
> {
> }
> {code}
> Changing the path would be :
> {code}
> rest-new-endpoint --named MyEndPoint --path endpoint
> {code}
> This would generate :
> {code}
> @Path("/endpoint")
> public class CustomerEndpoint
> {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-1751) Support Wildcards for package and class names
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1751?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-1751:
------------------------------------------
In Forge 1.x there was this notion of project root (with {{~~}}) but also the top level package root (with {{~}}). So we could write something like that :
{code}
new-project --named test --topLevelPackage com.mycomp.myproj
java new-class --named Test --package ~.constraints
Wrote com.mycomp.myproj.constraints.Test.java
{code}
With the {{--package ~.constraints}} paramater, it will create a class under {{com.mycomp.myproj.constraints}} because {{~}} represents the top level package {{com.mycomp.myproj}}.
This is not possible with Forge 2.x. The same code in Forge 2.x produces the following exception :
{code}
project-new --named test --topLevelPackage com.mycomp.myproj
java-new-class --named Test --targetPackage ~.constraints
Exception when parsing/running: java-new-class --named Test6 --targetPackage ~.constraints, Invalid identifier : >~<
{code}
When writing Forge scripts, it's much easier and reusable to be able to use the {{~}} represents the top level package.
> Support Wildcards for package and class names
> ---------------------------------------------
>
> Key: FORGE-1751
> URL: https://issues.jboss.org/browse/FORGE-1751
> Project: Forge
> Issue Type: Feature Request
> Components: UI - Shell
> Affects Versions: 2.4.1.Final
> Reporter: George Gastaldi
> Fix For: 2.x Future
>
>
> In Forge 1.x it was possible to do something like:
> {code}
> scaffold-x from ~.model.Customer
> scaffold-x from ~.model.*
> {code}
> That would replace the ~ character with the top level package name.
> This is needed for scripting purposes and also very used.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2280) Being able to use ~ as the top level package root directory
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2280?page=com.atlassian.jira.plugin... ]
Antonio Goncalves closed FORGE-2280.
------------------------------------
Resolution: Duplicate Issue
> Being able to use ~ as the top level package root directory
> -----------------------------------------------------------
>
> Key: FORGE-2280
> URL: https://issues.jboss.org/browse/FORGE-2280
> Project: Forge
> Issue Type: Feature Request
> Components: UI - Shell
> Affects Versions: 2.15.1.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> In Forge 1.x there was this notion of project root (with {{~~}}) but also the top level package root (with {{~}}). So we could write something like that :
> {code}
> new-project --named test --topLevelPackage com.mycomp.myproj
> java new-class --named Test --package ~.constraints
> Wrote com.mycomp.myproj.constraints.Test.java
> {code}
> With the {{--package ~.constraints}} paramater, it will create a class under {{com.mycomp.myproj.constraints}} because {{~}} represents the top level package {{com.mycomp.myproj}}.
> This is not possible with Forge 2.x. The same code in Forge 2.x produces the following exception :
> {code}
> project-new --named test --topLevelPackage com.mycomp.myproj
> java-new-class --named Test --targetPackage ~.constraints
> Exception when parsing/running: java-new-class --named Test6 --targetPackage ~.constraints, Invalid identifier : >~<
> {code}
> When writing Forge scripts, it's much easier and reusable to be able to use the {{~}} represents the top level package.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2280) Being able to use ~ as the top level package root directory
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2280?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2280:
-------------------------------------
Summary: Being able to use ~ as the top level package root directory (was: Being able to use ~ as the root project directory)
> Being able to use ~ as the top level package root directory
> -----------------------------------------------------------
>
> Key: FORGE-2280
> URL: https://issues.jboss.org/browse/FORGE-2280
> Project: Forge
> Issue Type: Feature Request
> Components: UI - Shell
> Affects Versions: 2.15.1.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> In Forge 1.x there was this notion of project root (with {{~~}}) but also the top level package root (with {{~}}). So we could write something like that :
> {code}
> new-project --named test --topLevelPackage com.mycomp.myproj
> java new-class --named Test --package ~.constraints
> Wrote com.mycomp.myproj.constraints.Test.java
> {code}
> With the {{--package ~.constraints}} paramater, it will create a class under {{com.mycomp.myproj.constraints}} because {{~}} represents the top level package {{com.mycomp.myproj}}.
> This is not possible with Forge 2.x. The same code in Forge 2.x produces the following exception :
> {code}
> project-new --named test --topLevelPackage com.mycomp.myproj
> java-new-class --named Test --targetPackage ~.constraints
> Exception when parsing/running: java-new-class --named Test6 --targetPackage ~.constraints, Invalid identifier : >~<
> {code}
> When writing Forge scripts, it's much easier and reusable to be able to use the {{~}} represents the top level package.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2280) Being able to use ~ as the root project directory
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2280:
----------------------------------------
Summary: Being able to use ~ as the root project directory
Key: FORGE-2280
URL: https://issues.jboss.org/browse/FORGE-2280
Project: Forge
Issue Type: Feature Request
Components: UI - Shell
Affects Versions: 2.15.1.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
In Forge 1.x there was this notion of project root (with {{~~}}) but also the top level package root (with {{~}}). So we could write something like that :
{code}
new-project --named test --topLevelPackage com.mycomp.myproj
java new-class --named Test --package ~.constraints
Wrote com.mycomp.myproj.constraints.Test.java
{code}
With the {{--package ~.constraints}} paramater, it will create a class under {{com.mycomp.myproj.constraints}} because {{~}} represents the top level package {{com.mycomp.myproj}}.
This is not possible with Forge 2.x. The same code in Forge 2.x produces the following exception :
{code}
project-new --named test --topLevelPackage com.mycomp.myproj
java-new-class --named Test --targetPackage ~.constraints
Exception when parsing/running: java-new-class --named Test6 --targetPackage ~.constraints, Invalid identifier : >~<
{code}
When writing Forge scripts, it's much easier and reusable to be able to use the {{~}} represents the top level package.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2279) Renaming parameters so their either use camel case or dash
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2279:
----------------------------------------
Summary: Renaming parameters so their either use camel case or dash
Key: FORGE-2279
URL: https://issues.jboss.org/browse/FORGE-2279
Project: Forge
Issue Type: Sub-task
Components: UI - Shell
Affects Versions: 2.x Future
Reporter: Antonio Goncalves
Fix For: 3.x Future
One discussion that came once on #IRC was "shall we use camel case on the command parameters, or shall we be more 'unixy' and use a dash syntax". At the moment, most of the parameters have the following syntax :
{code}
--targetPackage
--targetLocation
--columnName
{code}
But a few parameters don't use camel case but the dash syntax :
{code}
--not-nullable
--not-insertable
--not-updatable
{code}
We should choose one syntax and stick to it.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2278) Rename some xxx-new-yyy commands to xxx-add-yyy
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2278:
----------------------------------------
Summary: Rename some xxx-new-yyy commands to xxx-add-yyy
Key: FORGE-2278
URL: https://issues.jboss.org/browse/FORGE-2278
Project: Forge
Issue Type: Sub-task
Components: UI - Shell
Affects Versions: 2.15.1.Final
Reporter: Antonio Goncalves
Fix For: 3.x Future
Using the right words makes things easier for the new comer. I'm implementing a new UI command to add an injection point to a class. So, the name of the command would be {{cdi-add-injection-point}}. But then I started to have a look at the other {{xxx-add-yyy}} commands :
{code}
addon-add-dependency
project-add-dependencies
project-add-managed-dependencies
project-add-repository
java-add-annotation
constraint-add
{code}
They all add something, into something already existing. If we take this definition for granted, shouldn't the following commands be renamed add instead of new :
{code}
jpa-new-named-query
cdi-new-conversation
java-new-enum-const
java-new-field
java-new-method
jpa-new-field
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years