[JBoss JIRA] (FORGE-868) Support use of code formatting styles during JavaSource creation/modification
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGE-868:
-------------------------------------
Summary: Support use of code formatting styles during JavaSource creation/modification
Key: FORGE-868
URL: https://issues.jboss.org/browse/FORGE-868
Project: Forge
Issue Type: Feature Request
Components: Parsers / File Manipulation
Reporter: Vineet Reynolds
Priority: Optional
We have a Forge formatter plugin, but it …
[View More]would be better if we could incorporate support for formatted code itself to be generated, to save us the trouble of running the formatter plugin (possibly) after every time a Forge command is used.
The code formatter associated with a project should preferably (provided we can access it in some form) be used to perform the formatting.
--
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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-867) Faces scaffold reformats the source code of JPA entities with no changes
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGE-867:
-------------------------------------
Summary: Faces scaffold reformats the source code of JPA entities with no changes
Key: FORGE-867
URL: https://issues.jboss.org/browse/FORGE-867
Project: Forge
Issue Type: Enhancement
Components: Scaffold
Reporter: Vineet Reynolds
Assignee: Vineet Reynolds
Priority: Minor
The Faces scaffold always saves the …
[View More]JPA entities passed to it. This results in a loss of formatting when the project uses a different style of formatting than the one used by Forge.
The Faces scaffold should save the entities, only when it modifies them to create initializers used by the scaffold.
--
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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-866) Forge cannot handle 'p2' repository layout in settings.xml
by Pavol Srna (JIRA)
[ https://issues.jboss.org/browse/FORGE-866?page=com.atlassian.jira.plugin.... ]
Pavol Srna updated FORGE-866:
-----------------------------
Steps to Reproduce:
1) open settings.xml and define a p2 repository in profiles section.
For example:
{code}
<profile>
<id>swtbot</id>
<repositories>
<repository>
<id>swtbot-nightly-staging-site</id>
<url>http://…
[View More]download.eclipse.org/technology/swtbot/snapshots</url>
<layout>p2</layout>
</repository>
</repositories>
</profile>
{code}
2) activate new profile (swtbot)
{code}
<activeProfiles>
<activeProfile>swtbot</activeProfile>
</activeProfiles>
{code}
3) type command: `new-project --named testproject` in forge
was:
1) open settings.xml and define a p2 repository in profiles section.
For example:
{code}
<profile>
<id>swtbot</id>
<repositories>
<repository>
<id>swtbot-nightly-staging-site</id>
<url>http://download.eclipse.org/technology/swtbot/snapshots</url>
<layout>p2</layout>
</repository>
</repositories>
</profile>
{code}
2) activate new profile (swtbot)
3) type command: `new-project --named testproject` in forge
> Forge cannot handle 'p2' repository layout in settings.xml
> ----------------------------------------------------------
>
> Key: FORGE-866
> URL: https://issues.jboss.org/browse/FORGE-866
> Project: Forge
> Issue Type: Bug
> Affects Versions: 1.2.2.Final
> Reporter: Pavol Srna
> Priority: Critical
> Fix For: 1.2.4.Final
>
>
> {code}
> java.lang.NullPointerException
> at org.apache.maven.RepositoryUtils.getLayout(RepositoryUtils.java:214)
> at org.apache.maven.RepositoryUtils.toRepo(RepositoryUtils.java:200)
> at org.apache.maven.RepositoryUtils.toRepos(RepositoryUtils.java:190)
> at org.apache.maven.project.DefaultProjectBuilder$InternalConfig.<init>(DefaultProjectBuilder.java:662)
> at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:102)
> at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:86)
> at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)
> at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:393)
> at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:171)
> at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
> at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
> at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
> at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
> at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
> at org.jboss.forge.project.services.ProjectFactory.createProject(ProjectFactory.java:146)
> at org.jboss.forge.shell.plugins.builtin.NewProjectPlugin.create(NewProjectPlugin.java:205)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
> at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
> at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
> at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)
> at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)
> at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
> at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
> at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
> at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
> at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
> at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172)
> at java.lang.Thread.run(Thread.java:662)
> {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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-866) Forge cannot handle 'p2' repository layout in settings.xml
by Pavol Srna (JIRA)
[ https://issues.jboss.org/browse/FORGE-866?page=com.atlassian.jira.plugin.... ]
Pavol Srna updated FORGE-866:
-----------------------------
Steps to Reproduce:
1) open settings.xml and define a p2 repository in profiles section.
For example:
{code}
<profile>
<id>swtbot</id>
<repositories>
<repository>
<id>swtbot-nightly-staging-site</id>
<url>http://…
[View More]download.eclipse.org/technology/swtbot/snapshots</url>
<layout>p2</layout>
</repository>
</repositories>
</profile>
{code}
2) activate new profile (swtbot)
3) type command: `new-project --named testproject` in forge
> Forge cannot handle 'p2' repository layout in settings.xml
> ----------------------------------------------------------
>
> Key: FORGE-866
> URL: https://issues.jboss.org/browse/FORGE-866
> Project: Forge
> Issue Type: Bug
> Affects Versions: 1.2.2.Final
> Reporter: Pavol Srna
> Priority: Critical
> Fix For: 1.2.4.Final
>
>
> {code}
> java.lang.NullPointerException
> at org.apache.maven.RepositoryUtils.getLayout(RepositoryUtils.java:214)
> at org.apache.maven.RepositoryUtils.toRepo(RepositoryUtils.java:200)
> at org.apache.maven.RepositoryUtils.toRepos(RepositoryUtils.java:190)
> at org.apache.maven.project.DefaultProjectBuilder$InternalConfig.<init>(DefaultProjectBuilder.java:662)
> at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:102)
> at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:86)
> at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)
> at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:393)
> at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:171)
> at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
> at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
> at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
> at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
> at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
> at org.jboss.forge.project.services.ProjectFactory.createProject(ProjectFactory.java:146)
> at org.jboss.forge.shell.plugins.builtin.NewProjectPlugin.create(NewProjectPlugin.java:205)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
> at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
> at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
> at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)
> at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)
> at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
> at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
> at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
> at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
> at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
> at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172)
> at java.lang.Thread.run(Thread.java:662)
> {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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-866) Forge cannot handle 'p2' repository layout in settings.xml
by Pavol Srna (JIRA)
Pavol Srna created FORGE-866:
--------------------------------
Summary: Forge cannot handle 'p2' repository layout in settings.xml
Key: FORGE-866
URL: https://issues.jboss.org/browse/FORGE-866
Project: Forge
Issue Type: Bug
Affects Versions: 1.2.2.Final
Reporter: Pavol Srna
Priority: Critical
Fix For: 1.2.4.Final
{code}
java.lang.NullPointerException
at org.apache.maven.…
[View More]RepositoryUtils.getLayout(RepositoryUtils.java:214)
at org.apache.maven.RepositoryUtils.toRepo(RepositoryUtils.java:200)
at org.apache.maven.RepositoryUtils.toRepos(RepositoryUtils.java:190)
at org.apache.maven.project.DefaultProjectBuilder$InternalConfig.<init>(DefaultProjectBuilder.java:662)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:102)
at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:86)
at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)
at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:393)
at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:171)
at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
at org.jboss.forge.project.services.ProjectFactory.createProject(ProjectFactory.java:146)
at org.jboss.forge.shell.plugins.builtin.NewProjectPlugin.create(NewProjectPlugin.java:205)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)
at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)
at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172)
at java.lang.Thread.run(Thread.java:662)
{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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-572) Forge scaffold faces creates view beans with Id always Long against user-generated Entities
by claudio perrotta (JIRA)
[ https://issues.jboss.org/browse/FORGE-572?page=com.atlassian.jira.plugin.... ]
claudio perrotta commented on FORGE-572:
----------------------------------------
I'll try to describe my scenario.
First i have designed a DB with MySql Workbench.
Then i create a project through forge with this sequence of commands
1) new-project --named forgetest --topLevelPackage org.forgetest
2) persistence setup --provider HIBERNATE --container JBOSS_AS7 ; (and choosed org.jboss.spec:jboss-javaee-6.0:pom:…
[View More]:3.0.2.Final and org.hibernate:hibernate-entitymanager:::4.2.0.Final)
3) generate-entities configure-settings --dialect org.hibernate.dialect.MySQLDialect --driver com.mysql.jdbc.Driver --url jdbc:mysql://*******:3306/******_db --pathToDriver /home/****/server_runtime_jboss/jboss-as-7.1.1.Final/modules/com/mysql/main/mysql-connector-java-5.1.24.jar --user *** --password ****
4) scaffold setup --scaffoldType faces;
5) richfaces setup
6) scaffold from-entity org.forgetest.model.* --overwrite;
For example look at the entity GeoCities
-----------------------------------------
CREATE TABLE IF NOT EXISTS `db`.`geo_cities` (
`city_iso_code` VARCHAR(5) NOT NULL ,
`city_text` VARCHAR(110) NULL ,
`isoCodeRegione` VARCHAR(5) NOT NULL ,
`geo_latitude` VARCHAR(45) NULL ,
`geo_longitude` VARCHAR(45) NULL ,
PRIMARY KEY (`city_iso_code`) ,
INDEX `fk_geo_citta_geo_regioni1_idx` (`isoCodeRegion` ASC) ,
CONSTRAINT `fk_geo_citta_geo_regioni1`
FOREIGN KEY (`isoCodeRegion` )
REFERENCES `db`.`geo_regions` (`region_iso_code` )
)
ENGINE = InnoDB;
-----------------------------------------
after generate-entities have :
-----------------------------------------
@Entity
@Table(name = "geo_cities")
public class GeoCities implements java.io.Serializable
{
private String cityIsoCode;
[...]
@Id
@Column(name = "city_iso_code", unique = true, nullable = false, length = 5)
public String getCityIsoCode()
{
return this.cityIsoCode;
}
-----------------------------------------
and this a snippet of the relative bean
-----------------------------------------
@Named
@Stateful
@ConversationScoped
public class GeoCitiesBean implements Serializable
{
private static final long serialVersionUID = 1L;
/*
* Support creating and retrieving GeoCities entities
*/
private Long id;
public Long getId()
{
return this.id;
}
--------------------------------------------
And after the deploy there isn't any field relative to the ISO code when i tray to add a city...
i hope that is useful!
> Forge scaffold faces creates view beans with Id always Long against user-generated Entities
> -------------------------------------------------------------------------------------------
>
> Key: FORGE-572
> URL: https://issues.jboss.org/browse/FORGE-572
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.0.2.Final
> Environment: JBoss Developer Studio 5 Beta 2, Embedded Forge 1.0.2.Final
> Reporter: Will Dinyes
> Priority: Minor
> Labels: starter
> Fix For: 1.1.0.Final
>
>
> When running:
> scaffold from-entity ~.domain.* --overwrite
> The generated view Bean will always use an id field as a long, even if the entity uses a different type for the @Id. For instance, this code, in an Entity class called ValMealtype:
> @Id
> @GeneratedValue(strategy=GenerationType.IDENTITY)
> @Column(unique=true, nullable=false, length=20)
> private String meal;
> Generates, in ValMealtypeBean:
> private Long id;
> <-- associated gettters and setters -->
> And, later in the class:
> return ValMealtypeBean.this.entityManager.find(ValMealtype.class, Long.valueOf(value));
> That line in particular doesn't work at all, of course, since a Long can't be parsed out of a non-numeric String. I suppose I could name my meals with hex digits . . . CAFE . . . BEEF . . . but sadly, Chicken isn't going to fly.
> Basically, scaffold probably needs to look at the type of @Id in the entity and use that to set the id field type in the generated bean.
> As this is reported against a non-current release, I understand it may be fixed already. In this case, a new Beta of JBDS 5 is probably in order, as that's where I'm seeing this issue.
--
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
[View Less]
11 years, 11 months