BAEL-1303 Intro to Primefaces (#3874)

* ivan.ljubicic.app.developer@gmail.com

* Added unit tests, configuration class and minor adjustments

* primefaces intro module added

* deleted primefaces old module

* deleted different bean injection types sample project

* deleted addition different bean injection types file

* Renaming archetype in web.xml

* Added primefaces in jsf module

* Primefaces improvements

* Added commandButton and dialog

* Added PFM

* Code formatting

* Update pom.xml

* Formatting changes
This commit is contained in:
IvanLjubicic
2018-05-01 16:59:17 +02:00
committed by daoire
parent a86f9de2cd
commit 13d226c97b
6 changed files with 259 additions and 1 deletions
@@ -25,6 +25,12 @@
</var>
</resource-bundle>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<navigation-handler>
org.primefaces.mobile.application.MobileNavigationHandler
</navigation-handler>
<!-- <default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id> -->
</application>
<navigation-rule>
+59
View File
@@ -0,0 +1,59 @@
<?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">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Hello Primefaces</title>
</h:head>
<h:body>
<h:form id="primeForm">
<p:panelGrid columns="2">
<h:outputText value="#{helloPFBean.firstName}" />
<h:outputText value="#{helloPFBean.lastName}" />
</p:panelGrid>
<h:panelGrid columns="2">
<p:outputLabel for="jsfCompSuite" value="Component Suite" />
<p:selectOneRadio id="jsfCompSuite"
value="#{helloPFBean.componentSuite}">
<f:selectItem itemLabel="ICEfaces" itemValue="ICEfaces" />
<f:selectItem itemLabel="RichFaces" itemValue="RichFaces" />
</p:selectOneRadio>
</h:panelGrid>
<p:dataTable var="technology" value="#{helloPFBean.technologies}">
<p:column headerText="Name">
<h:outputText value="#{technology.name}" />
</p:column>
<p:column headerText="Version">
<h:outputText value="#{technology.currentVersion}" />
</p:column>
</p:dataTable>
<h:panelGrid columns="3">
<h:outputText value="Blur event " />
<p:inputText id="inputTextId" value="#{helloPFBean.inputText}">
<p:ajax event="blur" update="outputTextId"
listener="#{helloPFBean.onBlurEvent}" />
</p:inputText>
<h:outputText id="outputTextId" value="#{helloPFBean.outputText}" />
<p:commandButton value="Open Dialog" icon="ui-icon-note"
onclick="PF('exDialog').show();">
</p:commandButton>
</h:panelGrid>
<p:dialog header="Example dialog" widgetVar="exDialog" minHeight="40">
<h:outputText value="Hello Baeldung!" />
</p:dialog>
</h:form>
</h:body>
</html>
+38
View File
@@ -0,0 +1,38 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile">
<f:view renderKitId="PRIMEFACES_MOBILE" />
<h:head>
</h:head>
<h:body>
<pm:page id="enter">
<pm:header>
<p:outputLabel value="Introduction to PFM"></p:outputLabel>
</pm:header>
<pm:content>
<h:form id="enterForm">
<pm:field>
<p:outputLabel value="Enter Magic Word"></p:outputLabel>
<p:inputText id="magicWord" value="#{helloPFMBean.magicWord}"></p:inputText>
</pm:field>
<p:commandButton value="Go!" action="#{helloPFMBean.go}"></p:commandButton>
</h:form>
</pm:content>
</pm:page>
<pm:page id="success">
<pm:content>
<p:outputLabel value="Correct!"></p:outputLabel>
<p:button value="Back" outcome="pm:enter?transition=flow"></p:button>
</pm:content>
</pm:page>
<pm:page id="failure">
<pm:content>
<p:outputLabel value="That is not the magic word"></p:outputLabel>
<p:button value="Back" outcome="pm:enter?transition=flow"></p:button>
</pm:content>
</pm:page>
</h:body>
</html>