Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare shwocase for the current snapshot of 2.0 #77

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile-wildfly
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM quay.io/wildfly/wildfly:28.0.1.Final-jdk11
FROM quay.io/wildfly/wildfly:31.0.1.Final-jdk11

ADD target/BootsFacesWeb.war /opt/jboss/wildfly/standalone/deployments/BootsFacesWeb.war
80 changes: 40 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,49 +82,49 @@
</repositories>

<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>net.bootsfaces</groupId>
<artifactId>bootsfaces</artifactId>
<version>1.6.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.bootsfaces</groupId>
<artifactId>bootsfaces</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>

<!-- https://primefaces.github.io/primefaces/12_0_0/#/gettingstarted/dependencies -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>12.0.0</version>
<classifier>jakarta</classifier>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>12.0.0</version>
<classifier>jakarta</classifier>
</dependency>

<!-- import for primefaces example # https://mvnrepository.com/artifact/io.nayuki/qrcodegen -->
<dependency>
<groupId>io.nayuki</groupId>
<artifactId>qrcodegen</artifactId>
<version>1.8.0</version>
</dependency>
<!-- import for primefaces example # https://mvnrepository.com/artifact/org.primefaces.extensions/barcode4j-light -->
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>barcode4j-light</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
<artifactId>owasp-java-html-sanitizer</artifactId>
<version>20220608.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>
<!-- import for primefaces example # https://mvnrepository.com/artifact/io.nayuki/qrcodegen -->
<dependency>
<groupId>io.nayuki</groupId>
<artifactId>qrcodegen</artifactId>
<version>1.8.0</version>
</dependency>
<!-- import for primefaces example # https://mvnrepository.com/artifact/org.primefaces.extensions/barcode4j-light -->
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>barcode4j-light</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
<artifactId>owasp-java-html-sanitizer</artifactId>
<version>20220608.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>

<!-- currently not see to be necessary -->
<!--
Expand Down Expand Up @@ -234,7 +234,7 @@
<properties>
<wildfly-jar-plugin.version>10.0.0.Final</wildfly-jar-plugin.version>
<plugin.fork.embedded>true</plugin.fork.embedded>
<version.wildfly>30.0.1.Final</version.wildfly>
<version.wildfly>31.0.1.Final</version.wildfly>
</properties>
<build>
<plugins>
Expand Down
14 changes: 4 additions & 10 deletions src/main/java/net/bootsfaces/demo/StringToBooleanConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,20 @@
import jakarta.faces.convert.Converter;
import jakarta.faces.convert.FacesConverter;

@FacesConverter(value = "StringToBooleanConverter")
@FacesConverter(value = "stringToBooleanConverter")
public class StringToBooleanConverter implements Converter {

@Override
public Object getAsObject(FacesContext ctx, UIComponent uiComponent, String s) {
if (s != null && s.equals("true")) {
return true;
} else {
return false;
}
return s;
}

@Override
public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object bool) {
if (bool == null) {
return "false";
}
if (bool.equals(Boolean.TRUE)) {
return "true";
}
return "false";
return bool.toString();
}

}
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@

<session-config>
<session-timeout>30</session-timeout>
<tracking-mode>COOKIE</tracking-mode>
<cookie-config>
<name>showcase</name>
<http-only>true</http-only>
<secure>false</secure>
<secure>false</secure>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>

<welcome-file-list>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/applayout/navbarbottom.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<b:navBar brand="&copy;2013-2023 TheCoder4Eu" brandHref="http://www.thecoder4.eu/" position="bottom" sticky="true">
<p class="navbar-text pull-right">
<a href="/privacy.jsf">Privacy</a>
- <h:outputText value="BootsFaces-OSP #{versions.bsfVersion} based on Jakarta 10.0 hosted with Wildfly 28.0 supplemented by PrimeFaces 12.0" />
- <h:outputText value="BootsFaces-OSP #{versions.bsfVersion} based on Jakarta 10.0 hosted with Wildfly 31.0 supplemented by PrimeFaces 12.0" />
</p>
</b:navBar>

Expand Down
37 changes: 23 additions & 14 deletions src/main/webapp/forms/switch.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,26 @@
<b:panel title="Live preview" look="info" collapsible="false">
<b:form>
<b:panelGrid columns="4">
<b:switch value="#{settingsBean.sbox1}" label="switch 1" offColor="success" onColor="info"
onchange="ajax:settingsBean.action()" update="@none"
converter="StringToBooleanConverter">
<!--
<f:converter converterId="beerConverter" />
-->
<b:switch value="#{settingsBean.sbox1}"
label="switch 1"
offColor="success"
onColor="info"
onchange="ajax:settingsBean.action()"
update="@none"
converter="stringToBooleanConverter">
</b:switch>
<b:switch value="#{settingsBean.checkbox2}" label="switch with tooltip"
<b:switch value="#{settingsBean.checkbox2}"
label="switch with tooltip"
tooltip="I'm the tooltip. I'll tell you what this switch is all about." />
<b:switch value="#{settingsBean.checkbox3}" label="switch with rtl-support!"
<b:switch value="#{settingsBean.checkbox3}"
label="switch with rtl-support!"
caption="and a caption!"
tooltip="Using the English language, one of the effects of the dir=rtl setting is that the exclamation mark are at the left hand side. Isn't that weird?"
dir="rtl" />
<b:switch value="#{settingsBean.checkbox4}" caption="AJAX"
<b:switch value="#{settingsBean.checkbox4}"
caption="AJAX"
label="Toggle the switch to toggle between rtl and ltr."
tooltip="Using the English language, the only effect of the dir=rtl setting is that the exclamation mark are at the left hand side. Isn't that weird?"

dir="#{settingsBean.checkbox4?'ltr':'rtl'}"
onchange="ajax:settingsBean.action()"
offText="rtl"
Expand All @@ -70,14 +73,20 @@
<![CDATA[
<b:form>
<b:panelGrid columns="4">
<b:switch value="#num;{settingsBean.checkbox1}" label="switch 1" offColor="success" onColor="info" />
<b:switch value="#num;{settingsBean.checkbox2}" label="switch with tooltip"
<b:switch value="#num;{settingsBean.checkbox1}"
label="switch 1"
offColor="success"
onColor="info" />
<b:switch value="#num;{settingsBean.checkbox2}"
label="switch with tooltip"
tooltip="I'm the tooltip. I'll tell you what this switch is all about." />
<b:switch value="#num;{settingsBean.checkbox3}" label="switch with rtl-support!"
<b:switch value="#num;{settingsBean.checkbox3}"
label="switch with rtl-support!"
caption="and a caption!"
tooltip="Using the English language, one of the effects of the dir=rtl setting is that the exclamation mark are at the left hand side. Isn't that weird?"
dir="rtl" />
<b:switch value="#num;{settingsBean.checkbox4}" caption="AJAX"
<b:switch value="#num;{settingsBean.checkbox4}"
caption="AJAX"
label="Toggle the switch to toggle between rtl and ltr."
tooltip="Using the English language, the only effect of the dir=rtl setting is that the exclamation mark are at the left hand side. Isn't that weird?"
dir="#num;{settingsBean.checkbox4?'ltr':'rtl'}"
Expand Down