Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JonathanLalou/7b24a2431a8d0273d989cdfb6d0beded to your computer and use it in GitHub Desktop.
Save JonathanLalou/7b24a2431a8d0273d989cdfb6d0beded to your computer and use it in GitHub Desktop.

Hi,

Here is a summary of the issue I write about on Twitter (cf https://twitter.com/John_the_Cowboy/status/921973717823082497 and previous tweets):

  • versions:
    • JRebel Agent 7.1.1
    • licence "myRebel"
    • Tomcat 7.0.59 (appears also with 8.5.23)
    • JDK 1.8.0_141-b15
    • the application is deployed via IntelliJ IDEA CE 2017.2.5
    • Firefox 56.0.1 (64 bits). The issue also appears with the last GoogleChrome
  • setup:
    • several JARs in several folders
    • one WAR common.war in folder common/: contains only resources such as XHTML, CSS, JPEGs, etc.
    • one WAR ROOT.war in folder petshop/. The WAR ROOT.war contains both resources and Java code, and depends on common.war
    • the WAR relies on JSF, Primefaces 6 and Bootsfaces 1
  • JSF code: the XHTML file has a block such as: <h:form id="signupCCForm"> <p:commandButton iconAwesome="user-plus" styleClass="btn-light-blue btn-block" value="#{messages['login.signupButton']}" id="signupPrimefaces" action="#{loginBean.doSignup()}"/> <b:commandButton iconAwesome="user-plus" styleClass="btn-light-blue btn-block" value="#{messages['login.signupButton']}" id="signupBootsfaces" action="#{loginBean.doSignup()}"/> </h:form> This code generates the following HTML (screenshot: https://screenshots.firefox.com/HatzQr4lYjcuznpy/localhost):
Signup! <script id="signupCCForm:signupPrimefaces_s" type="text/javascript"> PrimeFaces.cw("CommandButton","widget_signupCCForm_signupPrimefaces",{id:"signupCCForm:signupPrimefaces"}); </script> Signup!

In any class, let's say com.github.jonathanlalou.petshop.Controller, I add the following line: System.out.println("hello world"); Then, as expected, in (Tomcat's) logs, I see: 2017-10-24 23:07:48 JRebel: Reloading class 'com.github.jonathanlalou.petshop.Controller'. 2017-10-24 23:10:24 JRebel: Reloading configuration

I refresh the page. The Bootsfaces's button does not appear (cf https://screenshots.firefox.com/GqtSOFHtXJt2gpBI/localhost). The generated HTML is below:

Signup! <script id="signupCCForm:signupPrimefaces_s" type="text/javascript"> PrimeFaces.cw("CommandButton","widget_signupCCForm_signupPrimefaces",{id:"signupCCForm:signupPrimefaces"}); </script>

So, in a nutshell, Bootsfaces' components are discarded by JRebel. Please could you have a look? Thanks and regards,

Jonathan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment