[JBoss JIRA] (FORGE-1067) Adopt WebJars as encapsulation for Bootstrap and JQuery resources
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1067?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1067:
----------------------------------------
+1
I liked this idea since it keeps separated the framework JS/CSS and the custom JS/CSS.
> Adopt WebJars as encapsulation for Bootstrap and JQuery resources
> -----------------------------------------------------------------
>
> Key: FORGE-1067
> URL: https://issues.jboss.org/browse/FORGE-1067
> Project: Forge
> Issue Type: Enhancement
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Fix For: 1.x Future
>
>
> At the moment JBoss Forge copies the {{bootstrap.css}} into the resources directory. It would be nice to use WebJar [1] to package Bootstrap (and JQuery) into the war file.
> For this to happen you just need to add the following Maven dependencies to the {{pom.xml}} :
> {code}
> <dependency>
> <groupId>org.webjars</groupId>
> <artifactId>bootstrap</artifactId>
> <version>2.3.2</version>
> </dependency>
> <dependency>
> <groupId>org.webjars</groupId>
> <artifactId>jquery</artifactId>
> <version>2.0.3</version>
> </dependency>
> {code}
> Then, change the {{pageTemplate.xhtml}} so it looks like this :
> {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 ? '{#pageTitle}' : pageTitle}</title>
> <link rel="icon" href="#{resource['favicon.ico']}"/>
> <h:outputStylesheet library="webjars/bootstrap/2.3.2/css" name="bootstrap.min.css"/>
> <h:outputStylesheet name="forge-style.css"/>
> </h:head>
> <h:body>
> ...
> ...
> ...
> <!-- Bootstrap core JavaScript
> ================================================== -->
> <!-- Placed at the end of the document so the pages load faster -->
> <h:outputScript name="webjars/jquery/2.0.3/jquery.min.js"/>
> <h:outputScript library="webjars/bootstrap/2.3.2/js" name="bootstrap.min.js"/>
> </h:body>
> </html>
> {code}
> And of course, get rid of the {{bootstrap.css}} file ;o)
> [1] http://www.webjars.org/
> [1] http://www.jamesward.com/2012/10/31/webjars-officially-launched
> See also : https://issues.jboss.org/browse/RF-12584
--
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
10 years, 11 months
[JBoss JIRA] (FORGE-1067) Adopt WebJars as encapsulation for Bootstrap and JQuery resources
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1067?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1067:
-----------------------------------
Fix Version/s: 1.x Future
> Adopt WebJars as encapsulation for Bootstrap and JQuery resources
> -----------------------------------------------------------------
>
> Key: FORGE-1067
> URL: https://issues.jboss.org/browse/FORGE-1067
> Project: Forge
> Issue Type: Enhancement
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Fix For: 1.x Future
>
>
> At the moment JBoss Forge copies the {{bootstrap.css}} into the resources directory. It would be nice to use WebJar [1] to package Bootstrap (and JQuery) into the war file.
> For this to happen you just need to add the following Maven dependencies to the {{pom.xml}} :
> {code}
> <dependency>
> <groupId>org.webjars</groupId>
> <artifactId>bootstrap</artifactId>
> <version>2.3.2</version>
> </dependency>
> <dependency>
> <groupId>org.webjars</groupId>
> <artifactId>jquery</artifactId>
> <version>2.0.3</version>
> </dependency>
> {code}
> Then, change the {{pageTemplate.xhtml}} so it looks like this :
> {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 ? '{#pageTitle}' : pageTitle}</title>
> <link rel="icon" href="#{resource['favicon.ico']}"/>
> <h:outputStylesheet library="webjars/bootstrap/2.3.2/css" name="bootstrap.min.css"/>
> <h:outputStylesheet name="forge-style.css"/>
> </h:head>
> <h:body>
> ...
> ...
> ...
> <!-- Bootstrap core JavaScript
> ================================================== -->
> <!-- Placed at the end of the document so the pages load faster -->
> <h:outputScript name="webjars/jquery/2.0.3/jquery.min.js"/>
> <h:outputScript library="webjars/bootstrap/2.3.2/js" name="bootstrap.min.js"/>
> </h:body>
> </html>
> {code}
> And of course, get rid of the {{bootstrap.css}} file ;o)
> [1] http://www.webjars.org/
> [1] http://www.jamesward.com/2012/10/31/webjars-officially-launched
> See also : https://issues.jboss.org/browse/RF-12584
--
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
10 years, 11 months
[JBoss JIRA] (FORGE-1067) Adopt WebJars as encapsulation for Bootstrap and JQuery resources
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1067:
----------------------------------------
Summary: Adopt WebJars as encapsulation for Bootstrap and JQuery resources
Key: FORGE-1067
URL: https://issues.jboss.org/browse/FORGE-1067
Project: Forge
Issue Type: Enhancement
Components: Scaffold
Affects Versions: 1.3.3.Final
Reporter: Antonio Goncalves
At the moment JBoss Forge copies the {{bootstrap.css}} into the resources directory. It would be nice to use WebJar [1] to package Bootstrap (and JQuery) into the war file.
For this to happen you just need to add the following Maven dependencies to the {{pom.xml}} :
{code}
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.0.3</version>
</dependency>
{code}
Then, change the {{pageTemplate.xhtml}} so it looks like this :
{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 ? '{#pageTitle}' : pageTitle}</title>
<link rel="icon" href="#{resource['favicon.ico']}"/>
<h:outputStylesheet library="webjars/bootstrap/2.3.2/css" name="bootstrap.min.css"/>
<h:outputStylesheet name="forge-style.css"/>
</h:head>
<h:body>
...
...
...
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<h:outputScript name="webjars/jquery/2.0.3/jquery.min.js"/>
<h:outputScript library="webjars/bootstrap/2.3.2/js" name="bootstrap.min.js"/>
</h:body>
</html>
{code}
And of course, get rid of the {{bootstrap.css}} file ;o)
[1] http://www.webjars.org/
[1] http://www.jamesward.com/2012/10/31/webjars-officially-launched
See also : https://issues.jboss.org/browse/RF-12584
--
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
10 years, 11 months
[JBoss JIRA] (FORGE-1066) Integer entity field generates NPE in getSearchPredicates
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1066?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1066:
----------------------------------------
Don't worry [~vineet.reynolds], I got your back! :)
> Integer entity field generates NPE in getSearchPredicates
> ---------------------------------------------------------
>
> Key: FORGE-1066
> URL: https://issues.jboss.org/browse/FORGE-1066
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 1.3.4.Final
>
>
> When I add an Integer attribute to an entity with the following command :
> {code}
> entity --named Book ;
> field number --type java.lang.Integer --named nbOfPage ;
> {code}
> It creates the following
> {code}
> @Entity
> public class Book implements Serializable
> {
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Column
> private Integer nbOfPage;
> ...
> }
> {code}
> The generated Faces {{BookBean}} handles it as a datatype instead of an object, so it gets an NPE if the attribute is null. The generated code is :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != 0)
> ...
> }
> {code}
> But it should check null value :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != null && nbOfPage != 0)
> ...
> }
> {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
10 years, 11 months
[JBoss JIRA] (FORGE-1066) Integer entity field generates NPE in getSearchPredicates
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1066?page=com.atlassian.jira.plugin... ]
Vineet Reynolds edited comment on FORGE-1066 at 8/1/13 9:51 AM:
----------------------------------------------------------------
Sorry I can't take a deeper look at this right now, but I believe this is related to FORGE-981 and FORGE-982.
was (Author: vineet.reynolds):
Sorry I can't take a deeper look at this right now, but I believe this is related to FORGE-981 and FORGEE-982.
> Integer entity field generates NPE in getSearchPredicates
> ---------------------------------------------------------
>
> Key: FORGE-1066
> URL: https://issues.jboss.org/browse/FORGE-1066
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 1.3.4.Final
>
>
> When I add an Integer attribute to an entity with the following command :
> {code}
> entity --named Book ;
> field number --type java.lang.Integer --named nbOfPage ;
> {code}
> It creates the following
> {code}
> @Entity
> public class Book implements Serializable
> {
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Column
> private Integer nbOfPage;
> ...
> }
> {code}
> The generated Faces {{BookBean}} handles it as a datatype instead of an object, so it gets an NPE if the attribute is null. The generated code is :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != 0)
> ...
> }
> {code}
> But it should check null value :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != null && nbOfPage != 0)
> ...
> }
> {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
10 years, 11 months
[JBoss JIRA] (FORGE-1066) Integer entity field generates NPE in getSearchPredicates
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1066?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1066.
----------------------------------
Resolution: Done
> Integer entity field generates NPE in getSearchPredicates
> ---------------------------------------------------------
>
> Key: FORGE-1066
> URL: https://issues.jboss.org/browse/FORGE-1066
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 1.3.4.Final
>
>
> When I add an Integer attribute to an entity with the following command :
> {code}
> entity --named Book ;
> field number --type java.lang.Integer --named nbOfPage ;
> {code}
> It creates the following
> {code}
> @Entity
> public class Book implements Serializable
> {
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Column
> private Integer nbOfPage;
> ...
> }
> {code}
> The generated Faces {{BookBean}} handles it as a datatype instead of an object, so it gets an NPE if the attribute is null. The generated code is :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != 0)
> ...
> }
> {code}
> But it should check null value :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != null && nbOfPage != 0)
> ...
> }
> {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
10 years, 11 months
[JBoss JIRA] (FORGE-1066) Integer entity field generates NPE in getSearchPredicates
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1066?page=com.atlassian.jira.plugin... ]
Vineet Reynolds commented on FORGE-1066:
----------------------------------------
Sorry I can't take a deeper look at this right now, but I believe this is related to FORGE-981 and FORGEE-982.
> Integer entity field generates NPE in getSearchPredicates
> ---------------------------------------------------------
>
> Key: FORGE-1066
> URL: https://issues.jboss.org/browse/FORGE-1066
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 1.3.4.Final
>
>
> When I add an Integer attribute to an entity with the following command :
> {code}
> entity --named Book ;
> field number --type java.lang.Integer --named nbOfPage ;
> {code}
> It creates the following
> {code}
> @Entity
> public class Book implements Serializable
> {
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Column
> private Integer nbOfPage;
> ...
> }
> {code}
> The generated Faces {{BookBean}} handles it as a datatype instead of an object, so it gets an NPE if the attribute is null. The generated code is :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != 0)
> ...
> }
> {code}
> But it should check null value :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != null && nbOfPage != 0)
> ...
> }
> {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
10 years, 11 months
[JBoss JIRA] (FORGE-1066) Integer entity field generates NPE in getSearchPredicates
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1066?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1066:
-----------------------------------
Fix Version/s: 1.3.4.Final
> Integer entity field generates NPE in getSearchPredicates
> ---------------------------------------------------------
>
> Key: FORGE-1066
> URL: https://issues.jboss.org/browse/FORGE-1066
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 1.3.4.Final
>
>
> When I add an Integer attribute to an entity with the following command :
> {code}
> entity --named Book ;
> field number --type java.lang.Integer --named nbOfPage ;
> {code}
> It creates the following
> {code}
> @Entity
> public class Book implements Serializable
> {
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Column
> private Integer nbOfPage;
> ...
> }
> {code}
> The generated Faces {{BookBean}} handles it as a datatype instead of an object, so it gets an NPE if the attribute is null. The generated code is :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != 0)
> ...
> }
> {code}
> But it should check null value :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != null && nbOfPage != 0)
> ...
> }
> {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
10 years, 11 months
[JBoss JIRA] (FORGE-1066) Integer entity field generates NPE in getSearchPredicates
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1066?page=com.atlassian.jira.plugin... ]
George Gastaldi reassigned FORGE-1066:
--------------------------------------
Assignee: George Gastaldi
> Integer entity field generates NPE in getSearchPredicates
> ---------------------------------------------------------
>
> Key: FORGE-1066
> URL: https://issues.jboss.org/browse/FORGE-1066
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.3.3.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
>
> When I add an Integer attribute to an entity with the following command :
> {code}
> entity --named Book ;
> field number --type java.lang.Integer --named nbOfPage ;
> {code}
> It creates the following
> {code}
> @Entity
> public class Book implements Serializable
> {
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Column
> private Integer nbOfPage;
> ...
> }
> {code}
> The generated Faces {{BookBean}} handles it as a datatype instead of an object, so it gets an NPE if the attribute is null. The generated code is :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != 0)
> ...
> }
> {code}
> But it should check null value :
> {code}
> private Predicate[] getSearchPredicates(Root<Book> root)
> {
> ...
> Integer nbOfPage = this.example.getNbOfPage();
> if (nbOfPage != null && nbOfPage != 0)
> ...
> }
> {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
10 years, 11 months