Add primefaces-showcase
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:faces="http://www.springframework.org/schema/faces"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:faces="http://www.springframework.org/schema/faces"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.4.xsd">
|
||||
|
||||
<faces:resources />
|
||||
|
||||
|
||||
238
primefaces-showcase/pom.xml
Normal file
@@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.webflow.samples</groupId>
|
||||
<artifactId>primefaces-showcase</artifactId>
|
||||
<name>Spring Web Flow and PrimeFaces Showcase</name>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0-BUILD-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<java-version>1.5</java-version>
|
||||
<springframework-version>3.2.1.RELEASE</springframework-version>
|
||||
<springwebflow-version>2.4.0.BUILD-SNAPSHOT</springwebflow-version>
|
||||
<springsecurity-version>3.1.3.RELEASE</springsecurity-version>
|
||||
<org.slf4j-version>1.6.1</org.slf4j-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${springframework-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>spring-faces</artifactId>
|
||||
<version>${springwebflow-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-core</artifactId>
|
||||
<version>${springsecurity-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-config</artifactId>
|
||||
<version>${springsecurity-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-web</artifactId>
|
||||
<version>${springsecurity-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- Logging -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- JSF-303 Dependency Injection -->
|
||||
<dependency>
|
||||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<!-- Servlet -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<version>2.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<!-- Sun Mojarra JSF 2 runtime -->
|
||||
<dependency>
|
||||
<groupId>com.sun.faces</groupId>
|
||||
<artifactId>jsf-api</artifactId>
|
||||
<version>2.1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.faces</groupId>
|
||||
<artifactId>jsf-impl</artifactId>
|
||||
<version>2.1.7</version>
|
||||
</dependency>
|
||||
<!-- PrimeFaces component library -->
|
||||
<dependency>
|
||||
<groupId>org.primefaces</groupId>
|
||||
<artifactId>primefaces</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</dependency>
|
||||
<!-- File uploads -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<!-- JSR 303 validation -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>1.0.0.GA</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>4.0.2.GA</version>
|
||||
</dependency>
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<!-- For developing against latest Spring milestones -->
|
||||
<repository>
|
||||
<id>springsource</id>
|
||||
<name>SpringSource Repository</name>
|
||||
<url>http://repo.springsource.org/release</url>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
</repository>
|
||||
<!-- Hibernate Validator -->
|
||||
<repository>
|
||||
<id>jboss</id>
|
||||
<name>JBoss Maven Release Repository</name>
|
||||
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>java.net</id>
|
||||
<name>Java.net Repository for Maven</name>
|
||||
<url>http://download.java.net/maven/2/</url>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>primefaces</id>
|
||||
<name>Prime Technology Maven Repository</name>
|
||||
<url>http://repository.primefaces.org</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java-version}</source>
|
||||
<target>${java-version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>false</downloadJavadocs>
|
||||
<wtpversion>2.0</wtpversion>
|
||||
<sourceExcludes>
|
||||
<sourceExclude>**/.svn/**</sourceExclude>
|
||||
</sourceExcludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>sources</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>tomcat-maven-plugin</artifactId>
|
||||
<version>1.0-beta-1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,54 @@
|
||||
package org.springframework.samples.webflow.ajax;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.binding.message.MessageBuilder;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.webflow.execution.RequestContext;
|
||||
|
||||
public class UserBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String firstName;
|
||||
|
||||
private String lastName;
|
||||
|
||||
public String createEmailSuggestion(RequestContext context) {
|
||||
|
||||
boolean haveFirst = StringUtils.hasText(firstName);
|
||||
boolean haveLast = StringUtils.hasLength(lastName);
|
||||
|
||||
if (haveFirst && haveLast) {
|
||||
return firstName + "." + lastName + "@fastmail.com";
|
||||
|
||||
} else if (haveFirst) {
|
||||
return firstName + "@fastmail.com";
|
||||
|
||||
} else if (haveLast) {
|
||||
return lastName + "@fastmail.com";
|
||||
|
||||
} else {
|
||||
context.getMessageContext().addMessage(
|
||||
new MessageBuilder().error().defaultText("Please enter a first or a last name of both!").build());
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springframework.samples.webflow.autocomplete;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class FormBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String value;
|
||||
|
||||
private Person person;
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Person getPerson() {
|
||||
return person;
|
||||
}
|
||||
|
||||
public void setPerson(Person person) {
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.springframework.samples.webflow.autocomplete;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Person implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private long id;
|
||||
|
||||
private String name;
|
||||
|
||||
public Person(long id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.springframework.samples.webflow.autocomplete;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.FacesConverter;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@FacesConverter(value="personConverter")
|
||||
public class PersonConverter implements Converter {
|
||||
|
||||
private static List<Person> cache = new ArrayList<Person>();
|
||||
|
||||
static {
|
||||
cache.add(new Person(0L, "Jamie Carr"));
|
||||
cache.add(new Person(1L, "Jean Cobbs"));
|
||||
cache.add(new Person(2L, "John Howard"));
|
||||
cache.add(new Person(3L, "John Mudra"));
|
||||
cache.add(new Person(4L, "Julia Webber"));
|
||||
}
|
||||
|
||||
public Object getAsObject(FacesContext context, UIComponent component, String value) {
|
||||
if (StringUtils.hasText(value)) {
|
||||
for (Person p : cache) {
|
||||
if (p.getName().equals(value)) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getAsString(FacesContext context, UIComponent component, Object value) {
|
||||
if (value != null) {
|
||||
return String.valueOf(((Person) value).getName());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.springframework.samples.webflow.autocomplete;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class PersonService {
|
||||
|
||||
private static List<Person> cache = new ArrayList<Person>();
|
||||
|
||||
static {
|
||||
cache.add(new Person(0L, "Jamie Carr"));
|
||||
cache.add(new Person(1L, "Jean Cobbs"));
|
||||
cache.add(new Person(2L, "John Howard"));
|
||||
cache.add(new Person(3L, "John Mudra"));
|
||||
cache.add(new Person(4L, "Julia Webber"));
|
||||
}
|
||||
|
||||
public List<String> suggestNames(String text) {
|
||||
List<String> results = new ArrayList<String>();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
results.add(text + i);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<Person> suggestPeople(String text) {
|
||||
List<Person> results = new ArrayList<Person>();
|
||||
for (Person p : cache) {
|
||||
if (p.getName().toLowerCase().startsWith(text.toLowerCase())) {
|
||||
results.add(p);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.springframework.samples.webflow.jsf;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class FacesHelper {
|
||||
|
||||
/**
|
||||
* This method can be used in a Facelets View to render a box around <h:messages/> conditionally.
|
||||
* Note that this is only necessary with vanilla JSF. With PrimeFaces you can use <p:messages/>
|
||||
* or <p:growl>.
|
||||
*
|
||||
* @return true if there are messages to display
|
||||
*/
|
||||
public boolean isError() {
|
||||
return FacesContext.getCurrentInstance().getMessages().hasNext();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springframework.samples.webflow.modal;
|
||||
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ModalAction {
|
||||
|
||||
public void addInfoMessage(String summary) {
|
||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, null);
|
||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.springframework.samples.webflow.poller;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class CurrentTimeBean {
|
||||
|
||||
public Date getTime() {
|
||||
return new Date();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springframework.samples.webflow.upload;
|
||||
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.primefaces.event.FileUploadEvent;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class FileUploadController {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(FileUploadController.class);
|
||||
|
||||
public void handleFileUpload(FileUploadEvent event) {
|
||||
logger.info("Uploaded: {}", event.getFile().getFileName());
|
||||
FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded.");
|
||||
FacesContext.getCurrentInstance().addMessage(null, msg);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.springframework.samples.webflow.validation;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Past;
|
||||
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class Account implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotEmpty
|
||||
private String firstName;
|
||||
|
||||
@NotEmpty
|
||||
private String lastName;
|
||||
|
||||
@Past
|
||||
@NotNull
|
||||
private Date dateOfBirth;
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public Date getDateOfBirth() {
|
||||
return dateOfBirth;
|
||||
}
|
||||
|
||||
public void setDateOfBirth(Date dateOfBirth) {
|
||||
this.dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package org.springframework.samples.webflow.validation;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.binding.message.MessageBuilder;
|
||||
import org.springframework.binding.message.MessageContext;
|
||||
import org.springframework.binding.validation.ValidationContext;
|
||||
|
||||
public class Reservation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Date startDate;
|
||||
|
||||
private Date endDate;
|
||||
|
||||
private boolean stateValidationEnabled;
|
||||
|
||||
private boolean globalValidationEnabled;
|
||||
|
||||
public void validateEdit(ValidationContext validationContext) {
|
||||
if (stateValidationEnabled && startDate.after(endDate)) {
|
||||
MessageContext messageContext = validationContext.getMessageContext();
|
||||
messageContext.addMessage(new MessageBuilder().error().code("startDateBeforeEndDate.viewState").build());
|
||||
}
|
||||
}
|
||||
|
||||
public void validate(ValidationContext validationContext) {
|
||||
if (globalValidationEnabled && startDate.after(endDate)) {
|
||||
MessageContext messageContext = validationContext.getMessageContext();
|
||||
messageContext.addMessage(new MessageBuilder().error().code("startDateBeforeEndDate.global").build());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean validateDates(MessageContext messageContext) {
|
||||
if (startDate.after(endDate)) {
|
||||
messageContext.addMessage(new MessageBuilder().error().code("startDateBeforeEndDate.validationMethod").build());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Date getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(Date startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public boolean isStateValidationEnabled() {
|
||||
return stateValidationEnabled;
|
||||
}
|
||||
|
||||
public void setStateValidationEnabled(boolean stateValidationEnabled) {
|
||||
this.stateValidationEnabled = stateValidationEnabled;
|
||||
}
|
||||
|
||||
public boolean isGlobalValidationEnabled() {
|
||||
return globalValidationEnabled;
|
||||
}
|
||||
|
||||
public void setGlobalValidationEnabled(boolean globalValidationEnabled) {
|
||||
this.globalValidationEnabled = globalValidationEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# Overrides default pattern in JSF for Bean Validation messages from "{0}" to "{1} {0}" where
|
||||
# the {0} is the Bean Validation constraint message (e.g. "may not be empty") and {1} is the
|
||||
# field name or the field label if defined (e.g. "First name").
|
||||
#
|
||||
javax.faces.validator.BeanValidator.MESSAGE={1} {0}
|
||||
@@ -0,0 +1,4 @@
|
||||
#
|
||||
# Overrides the default message for the @NotNull constraint.
|
||||
#
|
||||
javax.validation.constraints.NotNull.message=must be provided
|
||||
57
primefaces-showcase/src/main/resources/log4j.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<!-- Appenders -->
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Application Loggers -->
|
||||
<logger name="org.springframework.samples.webflow">
|
||||
<level value="debug" />
|
||||
</logger>
|
||||
|
||||
<!-- 3rdparty Loggers -->
|
||||
<logger name="org.springframework.core">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.beans">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.context">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.http">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.web">
|
||||
<level value="debug" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.binding">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.webflow">
|
||||
<level value="debug" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.primefaces">
|
||||
<level value="debug" />
|
||||
</logger>
|
||||
|
||||
<!-- Root Logger -->
|
||||
<root>
|
||||
<priority value="info" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
11
primefaces-showcase/src/main/webapp/WEB-INF/faces-config.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
|
||||
version="2.0">
|
||||
|
||||
<application>
|
||||
<message-bundle>JsfMessageResources</message-bundle>
|
||||
</application>
|
||||
|
||||
</faces-config>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="userBean" class="org.springframework.samples.webflow.ajax.UserBean" />
|
||||
|
||||
<view-state id="view">
|
||||
<transition on="suggest" >
|
||||
<evaluate expression="userBean.createEmailSuggestion(flowRequestContext)"
|
||||
result="viewScope.emailSuggestion" />
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">JSF 2 ajax with commandButton and f:ajax</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/ajax-jsf</span><br/>
|
||||
Java classes <span class="alt">~/ajax/UserBean.java</span>, <span class="alt">~/jsf/FacesHelper.java</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form class="span-10">
|
||||
<fieldset>
|
||||
<legend>User Details</legend>
|
||||
<h:panelGroup layout="block" styleClass="error" rendered="#{facesHelper.error}">
|
||||
<h:messages />
|
||||
</h:panelGroup>
|
||||
<h:panelGroup layout="block" styleClass="success" rendered="${not empty emailSuggestion}">
|
||||
<h:outputLabel for="email">Email suggestion: </h:outputLabel>
|
||||
<h:outputText id="email" value="${emailSuggestion}"/>
|
||||
</h:panelGroup>
|
||||
<p>
|
||||
<h:outputLabel for="firstName">First Name: </h:outputLabel><br/>
|
||||
<h:inputText id="firstName" value="#{userBean.firstName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="lastName">Last Name: </h:outputLabel><br/>
|
||||
<h:inputText id="lastName" value="#{userBean.lastName}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
<p>
|
||||
<h:commandButton value="Suggest" action="suggest">
|
||||
<f:ajax execute="@form" render="@form" />
|
||||
</h:commandButton>
|
||||
<h:commandButton value="Exit" action="exit" />
|
||||
</p>
|
||||
<pre><span class="alt"><h:commandButton value="Suggest" action="suggest" ></span>
|
||||
<span class="alt"><f:ajax execute="@form" render="@form" /></span>
|
||||
<span class="alt"><h:commandButton/></span></pre>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="userBean" class="org.springframework.samples.webflow.ajax.UserBean" />
|
||||
|
||||
<view-state id="view">
|
||||
<transition on="suggest" >
|
||||
<evaluate expression="userBean.createEmailSuggestion(flowRequestContext)"
|
||||
result="viewScope.emailSuggestion" />
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Ajax With PrimeFaces CommandButton</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/ajax-primefaces</span><br/>
|
||||
Java class <span class="alt">~/ajax/UserBean.java</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:fieldset legend="User Details">
|
||||
<h:panelGroup layout="block" styleClass="success" rendered="${not empty emailSuggestion}">
|
||||
<h:outputLabel for="email">Email suggestion: </h:outputLabel>
|
||||
<h:outputText id="email" value="${emailSuggestion}"/>
|
||||
</h:panelGroup>
|
||||
<p:messages />
|
||||
<p>
|
||||
<h:outputLabel for="firstName">First Name: </h:outputLabel><br/>
|
||||
<h:inputText id="firstName" value="#{userBean.firstName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="lastName">Last Name: </h:outputLabel><br/>
|
||||
<h:inputText id="lastName" value="#{userBean.lastName}" />
|
||||
</p>
|
||||
<p>
|
||||
<p:commandButton value="Suggest" action="suggest" execute="@form" update="@form"/>
|
||||
<p:commandButton value="Exit" action="exit" />
|
||||
</p>
|
||||
<hr/>
|
||||
<pre>
|
||||
<span class="alt"><p:commandButton value="Suggest" action="suggest" execute="@form" update="@form"/></span></pre>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="userBean" class="org.springframework.samples.webflow.ajax.UserBean" />
|
||||
|
||||
<view-state id="view">
|
||||
<transition on="suggest" >
|
||||
<set name="viewScope.emailSuggestion" value="userBean.createEmailSuggestion(flowRequestContext)"/>
|
||||
<render fragments="emailForm" />
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Ajax with Server-Side Render Action</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/ajax-render-action</span><br/>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form id="emailForm">
|
||||
<p:fieldset legend="User Details">
|
||||
<h:panelGroup layout="block" styleClass="success" rendered="${not empty emailSuggestion}">
|
||||
<h:outputLabel for="email">Email suggestion: </h:outputLabel>
|
||||
<h:outputText id="email" value="${emailSuggestion}"/>
|
||||
</h:panelGroup>
|
||||
<p:messages />
|
||||
<p>
|
||||
<h:outputLabel for="firstName">First Name: </h:outputLabel><br/>
|
||||
<h:inputText id="firstName" value="#{userBean.firstName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="lastName">Last Name: </h:outputLabel><br/>
|
||||
<h:inputText id="lastName" value="#{userBean.lastName}" />
|
||||
</p>
|
||||
<p>
|
||||
<p:commandButton value="Suggest" action="suggest" execute="@form" update="@form"/>
|
||||
<p:commandButton value="Exit" action="exit" immediate="true" />
|
||||
</p>
|
||||
<hr/>
|
||||
<pre>
|
||||
<span class="alt"><p:commandButton value="Suggest" action="suggest" /></span></pre>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="formBean" class="org.springframework.samples.webflow.autocomplete.FormBean" />
|
||||
|
||||
<view-state id="view" />
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Auto-complete</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Comments:</h5>
|
||||
<p>
|
||||
Flow artifacts in <span class="alt">src/main/webapp/WEB-INF/flows/autocomplete</span><br/>
|
||||
Java classes in package <span class="alt">~/autocomplate</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:messages />
|
||||
<div>
|
||||
<h:outputLabel value="Suggest a name (type anything): " for="stringValue" /><br/>
|
||||
<p:autoComplete id="stringValue" value="#{formBean.value}" completeMethod="#{personService.suggestNames}" />
|
||||
</div>
|
||||
<div>
|
||||
<h:outputLabel value="Person (type 'J'): " for="person" /><br/>
|
||||
<p:autoComplete id="person" value="#{formBean.person}" completeMethod="#{personService.suggestPeople}"
|
||||
var="selectedPerson" itemLabel="#{selectedPerson.name}" itemValue="#{selectedPerson}" converter="personConverter"/>
|
||||
</div>
|
||||
<h:panelGroup layout="block" styleClass="success" rendered="${formBean.value != null or formBean.person != null}">
|
||||
<p>String Value: ${formBean.value}</p>
|
||||
<p>Person: ${formBean.person.name}</p>
|
||||
</h:panelGroup>
|
||||
<br/>
|
||||
<p>
|
||||
<p:commandButton value="Suggest" update="@form"/>
|
||||
<p:commandButton value="Exit" action="exit" immediate="true" /><br/>
|
||||
</p>
|
||||
</h:form>
|
||||
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<view-state id="view" />
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Ajax With PrimeFaces CommandButton</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/ajax-primefaces</span><br/>
|
||||
Java class <span class="alt">~/upload/FileUploadController.java</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form enctype="multipart/form-data">
|
||||
<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}"
|
||||
allowTypes="/(\.|\/)(gif|jpe?g|png)$/" description="Images"/>
|
||||
<p:commandButton value="Exit" action="exit" />
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<view-state id="view">
|
||||
<transition on="android">
|
||||
<set name="viewScope.selectedPhone" value="'Android'" />
|
||||
</transition>
|
||||
<transition on="blackberry">
|
||||
<set name="viewScope.selectedPhone" value="'BlackBerry'" />
|
||||
</transition>
|
||||
<transition on="iphone">
|
||||
<set name="viewScope.selectedPhone" value="'iPhone'" />
|
||||
</transition>
|
||||
<transition on="confirm" >
|
||||
<evaluate expression="modalAction.addInfoMessage(selectedPhone + ' is a truly awesome phone!')" />
|
||||
</transition>
|
||||
<transition on="cancel" />
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Modal Dialog In View</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Comments:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in src/main/webapp/WEB-INF/flows/modal-dialog-in-view<br/>
|
||||
Java class ~/modal/ModalAction.java
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form id="mainForm">
|
||||
<p:messages id="messages" />
|
||||
<p:menu style="width:250px">
|
||||
<p:submenu label="Select your favorite phone">
|
||||
<p:menuitem value="Android" action="android" update="confirmContent" oncomplete="confirmDialog.show()" />
|
||||
<p:menuitem value="BlackBerry" action="blackberry" update="confirmContent" oncomplete="confirmDialog.show()" />
|
||||
<p:menuitem value="iPhone" action="iphone" update="confirmContent" oncomplete="confirmDialog.show()" />
|
||||
</p:submenu>
|
||||
</p:menu>
|
||||
<p:dialog widgetVar="confirmDialog" header="Confirmation" modal="true" width="300">
|
||||
<p:outputPanel id="confirmContent">
|
||||
<p><h:outputText value="Is ${selectedPhone} you favorite phone?" /></p>
|
||||
<p:commandButton value="Yes" action="confirm" update="messages" oncomplete="confirmDialog.hide()" />
|
||||
<p:commandButton value="No" action="cancel" update="messages" oncomplete="confirmDialog.hide()" />
|
||||
</p:outputPanel>
|
||||
</p:dialog>
|
||||
<p:commandButton value="Exit" action="exit" />
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow
|
||||
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
|
||||
|
||||
<input name="tab" value="flowScope.tab" required="false" />
|
||||
|
||||
<end-state id="end" view="externalRedirect:servletRelative:/home?tab=#{tab}" />
|
||||
|
||||
<global-transitions>
|
||||
<transition on="exit" to="end" />
|
||||
</global-transitions>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<view-state id="view">
|
||||
<transition on="start" />
|
||||
<transition on="stop" />
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Polling</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Comments:</h5>
|
||||
<p>
|
||||
Polling occurs every 3 seconds once started<br/>
|
||||
Review flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/poller</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<h:panelGroup id="contentPanel" layout="block" styleClass="notice">
|
||||
<h:outputLabel for="message" value="Current Time: " styleClass="large" />
|
||||
<hr/>
|
||||
<h:outputText id="message" value="#{currentTimeBean.time}" styleClass="large alt" />
|
||||
</h:panelGroup>
|
||||
<br/>
|
||||
<div>
|
||||
<p:poll widgetVar="poller" interval="1" update="contentPanel" autoStart="false" />
|
||||
<p:commandButton value="Start" action="start" update="contentPanel" onclick="poller.start()" />
|
||||
<p:commandButton value="Stop" action="stop" update="contentPanel" onclick="poller.stop()" />
|
||||
<p:commandButton value="Exit" action="exit" /><br/>
|
||||
<hr/>
|
||||
<pre>
|
||||
<span class="alt"><p:poll widgetVar="poller" interval="1" update="contentPanel" autoStart="false"/></span>
|
||||
<span class="alt"><p:commandButton value="Start" action="start" update="contentPanel" onclick="poller.start()"/></span>
|
||||
<span class="alt"><p:commandButton value="Stop" action="stop" update="contentPanel" onclick="poller.stop()"/></span>
|
||||
</pre>
|
||||
</div>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<secured attributes="ROLE_USER" />
|
||||
|
||||
<view-state id="view">
|
||||
<transition on="logout" to="endAndLogout"/>
|
||||
</view-state>
|
||||
|
||||
<end-state id="endAndLogout" view="externalRedirect:servletRelative:/logout?activeTab=springSecurity" />
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,124 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui"
|
||||
xmlns:sec="http://www.springframework.org/security/tags"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Spring Security Facelets Tag Library</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in
|
||||
<span class="alt">src/main/webapp/WEB-INF/flows/spring-security-taglib</span><br/>
|
||||
Taglib declaration in <span class="alt">web.xml</span><br/>
|
||||
Taglib file <span class="alt">src/main/webapp/WEB-INF/springsecurity.taglib.xml</span><br/>
|
||||
Spring security configuation <span class="alt">src/main/webapp/WEB-INF/spring/security-config.xml</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<p class="alt">
|
||||
You're currently logged in as '${currentUser.name}'
|
||||
</p>
|
||||
|
||||
<p class="prepend-top">
|
||||
<span class="alt"><sec:authorize ifAllGranted="ROLE_USER, ROLE_APPLE_USER"></span>
|
||||
<sec:authorize ifAllGranted="ROLE_USER, ROLE_APPLE_USER">
|
||||
Lorem ipsum dolor sit amet
|
||||
</sec:authorize>
|
||||
...
|
||||
<span class="alt"></sec:authorize></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><sec:authorize ifAllGranted="ROLE_USER, ROLE_ANDROID_USER"></span>
|
||||
<sec:authorize ifAllGranted="ROLE_USER, ROLE_ANDROID_USER">
|
||||
Lorem ipsum dolor sit amet
|
||||
</sec:authorize>
|
||||
...
|
||||
<span class="alt"></sec:authorize></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><sec:authorize ifNotGranted="ROLE_APPLE_USER"></span>
|
||||
<sec:authorize ifNotGranted="ROLE_APPLE_USER">
|
||||
Lorem ipsum dolor sit amet
|
||||
</sec:authorize>
|
||||
...
|
||||
<span class="alt"></sec:authorize></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><sec:authorize ifNotGranted="ROLE_ANDROID_USER"></span>
|
||||
<sec:authorize ifNotGranted="ROLE_ANDROID_USER">
|
||||
Lorem ipsum dolor sit amet
|
||||
</sec:authorize>
|
||||
...
|
||||
<span class="alt"></sec:authorize></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><sec:authorize ifAnyGranted="ROLE_APPLE_USER, ROLE_ANDROID_USER"></span>
|
||||
<sec:authorize ifAnyGranted="ROLE_APPLE_USER, ROLE_ANDROID_USER">
|
||||
Lorem ipsum dolor sit amet
|
||||
</sec:authorize>
|
||||
...
|
||||
<span class="alt"></sec:authorize></span>
|
||||
</p>
|
||||
|
||||
<p class="prepend-top">
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:areAllGranted('ROLE_USER, ROLE_APPLE_USER')}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:areAllGranted('ROLE_USER, ROLE_APPLE_USER')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:areAllGranted('ROLE_USER, ROLE_ANDROID_USER')}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:areAllGranted('ROLE_USER, ROLE_ANDROID_USER')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:areNotGranted('ROLE_APPLE_USER')}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:areNotGranted('ROLE_APPLE_USER')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:areNotGranted('ROLE_ANDROID_USER')}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:areNotGranted('ROLE_ANDROID_USER')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:areAnyGranted('ROLE_APPLE_USER, ROLE_ANDROID_USER')}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:areAnyGranted('ROLE_APPLE_USER, ROLE_ANDROID_USER')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:isAllowed('/secured/appleUser', 'POST'}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:isAllowed('/secured/appleUser', 'POST')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="alt"><h:outputText ... rendered="\#{sec:isAllowed('/secured/androidUser', 'POST'}" /> </span>
|
||||
<h:outputText value="Lorem ipsum dolor sit amet" rendered="#{sec:isAllowed('/secured/androidUser', 'POST')}"/>
|
||||
...
|
||||
</p>
|
||||
|
||||
<h:form>
|
||||
<p:commandButton value="Logout" action="logout"/>
|
||||
<p:commandButton value="Exit" action="exit"/>
|
||||
</h:form>
|
||||
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Embedded Flow: Confirmation</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form id="mainForm">
|
||||
<p:messages/>
|
||||
<h:panelGroup layout="block" styleClass="success" rendered="${not empty emailSuggestion}">
|
||||
<h:outputLabel for="email">Email suggestion: </h:outputLabel>
|
||||
<h:outputText id="email" value="${emailSuggestion}"/>
|
||||
</h:panelGroup>
|
||||
<p>
|
||||
<p:commandButton value="Edit" action="edit" update="mainForm"/>
|
||||
<p:commandButton value="Exit" action="exit" update="mainForm" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="userBean" class="org.springframework.samples.webflow.ajax.UserBean" />
|
||||
|
||||
<view-state id="main">
|
||||
<transition on="suggest" to="confirmation">
|
||||
<set name="flashScope.emailSuggestion" value="userBean.createEmailSuggestion(flowRequestContext)" />
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
<view-state id="confirmation">
|
||||
<transition on="edit" to="main"/>
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Embedded Flow: User Details</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form id="mainForm">
|
||||
<p:messages />
|
||||
<p>
|
||||
<h:outputLabel for="firstName">First Name: </h:outputLabel><br/>
|
||||
<h:inputText id="firstName" value="#{userBean.firstName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="lastName">Last Name: </h:outputLabel><br/>
|
||||
<h:inputText id="lastName" value="#{userBean.lastName}" />
|
||||
</p>
|
||||
<p>
|
||||
<p:commandButton value="Suggest" action="suggest" update="mainForm"/>
|
||||
<p:commandButton value="Exit" action="exit" update="mainForm"/>
|
||||
</p>
|
||||
<hr/>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<view-state id="main">
|
||||
<transition on="start" to="embedded-flow"/>
|
||||
</view-state>
|
||||
|
||||
<subflow-state id="embedded-flow" subflow="top-flow-with-embedded-subflow/embedded-flow">
|
||||
<input name="mode" value="'embedded'"/>
|
||||
<transition on="end" to="main"/>
|
||||
</subflow-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Top Flow Container</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
This is the landing page for the top flow. From her you can launch the embedded sub-flow
|
||||
without ever causing this part of the page to be reloaded.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Note the mode=embedded input attribute passed to the sub-flow in
|
||||
<span class="alt">src/main/webapp/WEB-INF/flows/top-flow-with-embedded-subflow/flow.xml</span>.
|
||||
This instructs the subflow to launch in embedded mode and avoid flow execution redirects
|
||||
during Ajax requests.
|
||||
</li>
|
||||
<li>
|
||||
Also notice the identical form ids used on all three view pages.
|
||||
This is required in order for the client-side JSF JavaScript to replace the form contents.
|
||||
</li>
|
||||
</ul>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<hr/>
|
||||
<div class="span-4 colborder">
|
||||
<h6>Some text to the left</h6>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
||||
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
||||
nisi ut aliquip.</p>
|
||||
</div>
|
||||
<div class="span-12 colborder">
|
||||
<h3>Embedded Sub-Flow Area</h3>
|
||||
<h:form id="mainForm">
|
||||
<p:messages/>
|
||||
<p>
|
||||
<p:commandButton value="Start Sub-Flow" action="start" update="mainForm"/>
|
||||
<p:commandButton value="Exit" action="exit" immediate="true" />
|
||||
</p>
|
||||
</h:form>
|
||||
</div>
|
||||
<div class="span-4 last">
|
||||
<h6>Some text to the right</h6>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
||||
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
||||
nisi ut aliquip.</p>
|
||||
</div>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Standard JSR-303 Bean Validation</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/validation-bean</span><br/>
|
||||
Java class with JSR-303 validation annotations <span class="alt">~/validation/Account.java</span><br/>
|
||||
Customized @NotNull constraint message in <span class="alt">src/main/resources/ValidationMessages.properties</span><br/>
|
||||
Customized pattern used by JSF for Bean Validation in <span class="alt">src/main/resources/org/springframework/samples/webflow/JsfMessageResources.properties</span><br/>
|
||||
Registration of <span class="alt">JsfMessageResources.properties</span> in <span class="alt">src/main/webapp/WEB-INF/faces-config.xml</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:fieldset legend="Account Details">
|
||||
<div>
|
||||
<div class="span-8 colborder">
|
||||
<p:messages />
|
||||
<p>
|
||||
<h:outputLabel for="firstName">First Name: </h:outputLabel><br/>
|
||||
<h:inputText id="firstName" label="First Name" value="#{account.firstName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="lastName">Last Name: </h:outputLabel><br/>
|
||||
<h:inputText id="lastName" label="Last Name" value="#{account.lastName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="dateOfBirth">Date of Birth: </h:outputLabel><br/>
|
||||
<p:calendar id="dateOfBirth" label="Date of Birth" value="#{account.dateOfBirth}" pattern="MM/dd/yyyy" />
|
||||
</p>
|
||||
<p>
|
||||
<p:commandButton value="Next >>" action="next" execute="@form" update="@form"/>
|
||||
<p:commandButton value="Exit" action="exit" immediate="true" />
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-13 last">
|
||||
<p>
|
||||
By default JSF does not include field names in messages resulting from standard bean validation.
|
||||
For example instead of seeing "First name may not be empty" you would see "may not be empty".
|
||||
To change this behavior we've customized the pattern used by
|
||||
<span class="alt">javax.faces.validator.BeanValidator</span>.<br/>
|
||||
See the following for details:<br/>
|
||||
<span class="alt">src/main/webapp/WEB-INF/faces-config.xml</span>
|
||||
<span class="alt">src/main/resources/org/springframework/samples/webflow/JsfMessageResources.properties</span><br/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="account" class="org.springframework.samples.webflow.validation.Account" />
|
||||
|
||||
<view-state id="edit" model="account">
|
||||
<transition on="next" to="review"/>
|
||||
</view-state>
|
||||
|
||||
<view-state id="review">
|
||||
<transition on="back" to="edit"/>
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Standard JSR-303 Bean Validation</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/bean-validation</span><br/>
|
||||
Java class with JSR-303 validation annotations <span class="alt">~/validation/Account.java</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:fieldset legend="Review Account Changes">
|
||||
<p:messages />
|
||||
<p>
|
||||
<h:outputLabel for="firstName">First Name: </h:outputLabel><br/>
|
||||
<h:outputText id="firstName" value="#{account.firstName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="lastName">Last Name: </h:outputLabel><br/>
|
||||
<h:outputText id="lastName" value="#{account.lastName}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="dateOfBirth">Date of Birth: </h:outputLabel><br/>
|
||||
<h:outputText id="dateOfBirth" value="#{account.dateOfBirth}" />
|
||||
</p>
|
||||
<p>
|
||||
<p:commandButton value="<< Back" action="back"/>
|
||||
<p:commandButton value="Exit" action="exit" immediate="true" />
|
||||
</p>
|
||||
<hr/>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Model Validation</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and views in <span class="alt">src/main/webapp/WEB-INF/flows/validation-model</span><br/>
|
||||
Java model with validation methods <span class="alt">~/validation/Reservation.java</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:tabView activeIndex="${activeTabIndex}">
|
||||
|
||||
<p:tab title="Reservation Form" >
|
||||
<p:messages />
|
||||
<div>
|
||||
<div class="span-5 colborder">
|
||||
<p>
|
||||
<h:outputLabel for="startDate">Start Date: </h:outputLabel><br/>
|
||||
<p:calendar id="startDate" label="Start Date" value="#{reservation.startDate}" pattern="MM/dd/yyyy" timeZone="EST" required="true" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="endDate">End Date: </h:outputLabel><br/>
|
||||
<p:calendar id="endDate" label="End Date" value="#{reservation.endDate}" pattern="MM/dd/yyyy" timeZone="EST" required="true" />
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
<h:selectBooleanCheckbox title="stateValidation" value="#{reservation.stateValidationEnabled}" />
|
||||
Enable state validation<br/>
|
||||
<h:selectBooleanCheckbox title="globalValidation" value="#{reservation.globalValidationEnabled}" />
|
||||
Enable global validation
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
<p:commandButton value="Validate" action="next" update="@form" render="@form" />
|
||||
<p:commandButton value="Exit" action="exit" immediate="true" />
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-16 last">
|
||||
<p>Types of validation used on this form:</p>
|
||||
<ol>
|
||||
<li>JSF component validation based on "required" attribute on start/end date tags</li>
|
||||
<li>Model validation method invoked by convention for this state only</li>
|
||||
<li>Model validation method invoked by convention for any view states of the current flow</li>
|
||||
<li>Validation method invoked directly in a transition</li>
|
||||
</ol>
|
||||
</div>
|
||||
<hr/>
|
||||
</div>
|
||||
</p:tab>
|
||||
<p:tab title="By Convention">
|
||||
<p>
|
||||
Validation by convention relies on model methods with a special signature.<br/>
|
||||
First you need to declare the model on the view-state using the "model" attribute.<br/>
|
||||
Then you add one or more validation methods to the model object.<br/>
|
||||
For example see the following methods on <span class="alt">~/validation/Reservation.java</span>:<br/>
|
||||
<span class="alt">public void
|
||||
Reservation.validateEdit(ValidationContext)</span> matches to the view state called "edit".<br/>
|
||||
<span class="alt">public void
|
||||
Reservation.validate(ValidationContext)</span> matches to all view states in the flow.<br/>
|
||||
</p>
|
||||
</p:tab>
|
||||
|
||||
<p:tab title="By Validation Method">
|
||||
<p>
|
||||
You can choose to invoke a validation method during a specific transition.<br/>
|
||||
The validation method registers errors and returns false to prevent the transition
|
||||
and display the error(s).
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
Don't forget to disable state and global validation by convention.<br/>
|
||||
Those validations are invoked first and they will prevent the transition altogether!
|
||||
</p>
|
||||
</p:tab>
|
||||
</p:tabView>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
|
||||
parent="parent-flow">
|
||||
|
||||
<!--
|
||||
Also see ../parent-flow.xml.
|
||||
-->
|
||||
|
||||
<var name="reservation" class="org.springframework.samples.webflow.validation.Reservation" />
|
||||
|
||||
<view-state id="edit" model="reservation">
|
||||
<transition on="next" to="review">
|
||||
<evaluate expression="reservation.validateDates(messageContext)" />
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
<view-state id="review">
|
||||
<transition on="back" to="edit"/>
|
||||
</view-state>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,3 @@
|
||||
startDateBeforeEndDate.viewState=End date is earlier than the start date (state validation by convention)
|
||||
startDateBeforeEndDate.global=End date is earlier than the start date (global validation by convention)
|
||||
startDateBeforeEndDate.validationMethod=End date is earlier than the start date (validation method invocation)
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Model Validation</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Files to review:</h5>
|
||||
<p>
|
||||
Flow definition and view.xhtml in <span class="alt">src/main/webapp/WEB-INF/flows/validation-model</span><br/>
|
||||
Java model with validation methods <span class="alt">~/validation/Reservation.java</span>
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:fieldset legend="Resort Selection">
|
||||
<p:messages />
|
||||
<p>
|
||||
<h:outputLabel for="startDate">Start Date: </h:outputLabel><br/>
|
||||
<h:outputText id="startDate" value="#{reservation.startDate}" />
|
||||
</p>
|
||||
<p>
|
||||
<h:outputLabel for="endDate">End Date: </h:outputLabel><br/>
|
||||
<h:outputText id="endDate" value="#{reservation.endDate}" />
|
||||
</p>
|
||||
<p>
|
||||
<p:commandButton value="<< Back" action="back" update="@form" render="@form" />
|
||||
<p:commandButton value="Exit" action="exit" />
|
||||
</p>
|
||||
<hr/>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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">
|
||||
<f:view contentType="text/html">
|
||||
<h:head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>JSF 2, Spring Web Flow, and PrimeFaces Showcase</title>
|
||||
<link rel="stylesheet" href="${request.contextPath}/app/resources/styles/blueprint/screen.css" type="text/css" media="screen, projection" />
|
||||
<link rel="stylesheet" href="${request.contextPath}/app/resources/styles/blueprint/print.css" type="text/css" media="print" />
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="${request.servletPath}/styles/blueprint/ie.css" type="text/css" media="screen, projection" />
|
||||
<![endif]-->
|
||||
<ui:insert name="headIncludes"/>
|
||||
</h:head>
|
||||
<h:body>
|
||||
<div class="container">
|
||||
<div>
|
||||
<h1>JSF 2, PrimeFaces, and Spring Web Flow</h1>
|
||||
<h3 class="alt">
|
||||
<ui:insert name="title"/>
|
||||
</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
<div>
|
||||
<ui:insert name="notes"/>
|
||||
</div>
|
||||
<div>
|
||||
<ui:insert name="content"/>
|
||||
</div>
|
||||
</div>
|
||||
</h:body>
|
||||
</f:view>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
|
||||
|
||||
<!--
|
||||
URL mappings for views without controller logic.
|
||||
Example:
|
||||
Incoming path '/home' is mapped maps to the view name 'home'
|
||||
UrlBasedViewResolver in servlet-context resolves 'home' to /WEB-INF/views/home.xhtml
|
||||
-->
|
||||
<mvc:view-controller path="/login" />
|
||||
|
||||
<mvc:view-controller path="/home" />
|
||||
|
||||
<context:component-scan base-package="org.springframework.samples.webflow" />
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:faces="http://www.springframework.org/schema/faces"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
|
||||
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.4.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
|
||||
|
||||
<!--
|
||||
DispatcherServlet Context: defines this servlet's request-processing infrastructure
|
||||
-->
|
||||
|
||||
<!-- Imports user-defined @Controller beans that process client requests -->
|
||||
<import resource="controllers.xml" />
|
||||
<import resource="webflow.xml" />
|
||||
|
||||
<!-- Scan for Spring beans declared via annotations. -->
|
||||
<context:component-scan base-package="org.springframework.samples.webflow"/>
|
||||
|
||||
<!-- Enables the Spring MVC @Controller programming model -->
|
||||
<mvc:annotation-driven />
|
||||
|
||||
<!--
|
||||
Enable serving of classpath with Spring 3 resource serving mechanism. For example:
|
||||
/webflow-primefaces-showcase/app/resources/styles/blueprint/print.css
|
||||
-->
|
||||
<mvc:resources location="/" mapping="/resources/**" />
|
||||
|
||||
<!--
|
||||
Enable processing of JSF 2 resource requests. For example:
|
||||
/webflow-primefaces-showcase/app/javax.faces.resource/jsf.js?ln=javax.faces
|
||||
-->
|
||||
<faces:resources />
|
||||
|
||||
<!--
|
||||
Maps request paths to flows in the flowRegistry; e.g. a path of
|
||||
/hotels/booking looks for a flow with id "hotels/booking"
|
||||
-->
|
||||
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
|
||||
<property name="flowRegistry" ref="flowRegistry" />
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Resolves views selected for rendering by @Controllers to .xhtml
|
||||
resources in the /WEB-INF/views directory
|
||||
-->
|
||||
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass" value="org.springframework.faces.mvc.JsfView" />
|
||||
<property name="prefix" value="/WEB-INF/views/" />
|
||||
<property name="suffix" value=".xhtml" />
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Dispatches requests mapped to flows to FlowHandler implementations
|
||||
-->
|
||||
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
|
||||
<property name="flowExecutor" ref="flowExecutor" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/webflow-config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:faces="http://www.springframework.org/schema/faces"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
|
||||
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.4.xsd">
|
||||
|
||||
<!-- Executes flows: the central entry point into the Spring Web Flow system -->
|
||||
<flow-executor id="flowExecutor">
|
||||
<flow-execution-listeners>
|
||||
<listener ref="facesContextListener"/>
|
||||
<listener ref="securityListener"/>
|
||||
</flow-execution-listeners>
|
||||
</flow-executor>
|
||||
|
||||
<!-- The registry of executable flow definitions -->
|
||||
<flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF/flows">
|
||||
<flow-location-pattern value="/**/flow.xml" />
|
||||
<flow-location id="parent-flow" path="parent-flow.xml"/>
|
||||
</flow-registry>
|
||||
|
||||
<!-- Configures the Spring Web Flow JSF integration -->
|
||||
<faces:flow-builder-services id="flowBuilderServices" development="true" />
|
||||
|
||||
<!-- A listener to create and release a FacesContext -->
|
||||
<beans:bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
|
||||
|
||||
<!-- A listener to apply Spring Security authorities -->
|
||||
<beans:bean id="securityListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />
|
||||
|
||||
</beans:beans>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
|
||||
|
||||
<!-- Root Context: defines shared resources visible to all other web components -->
|
||||
<import resource="security-config.xml"/>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
|
||||
http://www.springframework.org/schema/security
|
||||
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
||||
|
||||
<!--
|
||||
Configure Spring Security
|
||||
-->
|
||||
<security:http auto-config="true" use-expressions="true">
|
||||
<security:form-login login-page="/app/login" login-processing-url="/app/j_spring_security_check"
|
||||
default-target-url="/app/home" authentication-failure-url="/app/login?login_error=1" />
|
||||
<security:logout logout-url="/app/logout" logout-success-url="/app/home" />
|
||||
<security:intercept-url pattern="/secured/appleUser" method="POST" access="hasRole('ROLE_APPLE_USER')" />
|
||||
<security:intercept-url pattern="/secured/androidUser" method="POST" access="hasRole('ROLE_ANDROID_USER')" />
|
||||
</security:http>
|
||||
|
||||
<!--
|
||||
Define local authentication provider, a real app would use an external provider (JDBC, LDAP, CAS, etc)
|
||||
|
||||
usernames/passwords are:
|
||||
joe/joe1
|
||||
pete/pete1
|
||||
-->
|
||||
<security:authentication-manager>
|
||||
<security:authentication-provider>
|
||||
<security:password-encoder hash="md5" />
|
||||
<security:user-service>
|
||||
<security:user name="joe" password="bf403351dfb2ae819874163aff25a49c"
|
||||
authorities="ROLE_USER, ROLE_APPLE_USER" />
|
||||
<security:user name="pete" password="5d2ea1f70185e4357183bb9c00187219"
|
||||
authorities="ROLE_USER, ROLE_ANDROID_USER" />
|
||||
</security:user-service>
|
||||
</security:authentication-provider>
|
||||
</security:authentication-manager>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE facelet-taglib PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
|
||||
"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
|
||||
<facelet-taglib>
|
||||
<namespace>http://www.springframework.org/security/tags</namespace>
|
||||
<tag>
|
||||
<tag-name>authorize</tag-name>
|
||||
<handler-class>org.springframework.faces.security.FaceletsAuthorizeTagHandler</handler-class>
|
||||
</tag>
|
||||
<function>
|
||||
<function-name>areAllGranted</function-name>
|
||||
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
|
||||
<function-signature>boolean areAllGranted(java.lang.String)</function-signature>
|
||||
</function>
|
||||
<function>
|
||||
<function-name>areAnyGranted</function-name>
|
||||
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
|
||||
<function-signature>boolean areAnyGranted(java.lang.String)</function-signature>
|
||||
</function>
|
||||
<function>
|
||||
<function-name>areNotGranted</function-name>
|
||||
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
|
||||
<function-signature>boolean areNotGranted(java.lang.String)</function-signature>
|
||||
</function>
|
||||
<function>
|
||||
<function-name>isAllowed</function-name>
|
||||
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
|
||||
<function-signature>boolean isAllowed(java.lang.String, java.lang.String)</function-signature>
|
||||
</function>
|
||||
</facelet-taglib>
|
||||
127
primefaces-showcase/src/main/webapp/WEB-INF/views/home.xhtml
Normal file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition 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"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title"></ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
Note that in "development" mode you can make changes to flow definitions without the
|
||||
need to restart the server. The development mode is specified in
|
||||
<span class="alt">src/main/webapp/WEB-INF/spring/appServlet/webflow.xml</span>.
|
||||
</p>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
|
||||
<p:tabView activeIndex="${param.tab}">
|
||||
|
||||
<p:tab title="Ajax 101">
|
||||
<ul>
|
||||
<li>
|
||||
<h:outputLink value="ajax-jsf?tab=0" >
|
||||
<h:outputText value="JSF 2 commandButton with f:ajax" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Ajax request and responses with h:commandButton + nested f:ajax tag.</span>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="ajax-primefaces?tab=0" >
|
||||
<h:outputText value="PrimeFaces commandButton" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Ajax request and response with the PrimeFaces commandButton.</span>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="ajax-render-action?tab=0" >
|
||||
<h:outputText value="Web Flow render action" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Integration between the Web Flow render action and PrimeFaces partial rendering.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p:tab>
|
||||
|
||||
<p:tab title="Advanced Ajax">
|
||||
<ul>
|
||||
<li>
|
||||
<h:outputLink value="autocomplete?tab=1" >
|
||||
<h:outputText value="Auto-complete" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">PrimeFaces Auto-complete component.</span>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="modal-dialog-in-view?tab=1" >
|
||||
<h:outputText value="Modal Dialog In View" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Display a modal dialog without leaving the current view state.</span>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="top-flow-with-embedded-subflow?tab=1" >
|
||||
<h:outputText value="Top Flow with Embedded Sub-Flow" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Top flow with a sub-flow embedded within it without causing any redirects or a full page refresh.</span>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="poller?tab=1" >
|
||||
<h:outputText value="Polling" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Shows PrimeFaces poller component accesses server-side Web Flow data.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p:tab>
|
||||
|
||||
<p:tab title="Validation">
|
||||
<ul>
|
||||
<li>
|
||||
<h:outputLink value="validation-bean?tab=2" >
|
||||
<h:outputText value="Bean Validation" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">JSR-303 Bean Validation Annotations.</span>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="validation-model?tab=2" >
|
||||
<h:outputText value="Model Validation" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Web Flow specific mechanism with validation methods in the model object.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p:tab>
|
||||
|
||||
<p:tab title="Miscellaneous">
|
||||
<h5>Comments: </h5>
|
||||
<ul>
|
||||
<li>
|
||||
<h:outputLink value="spring-security-taglib?tab=3" >
|
||||
<h:outputText value="Spring Security Facelets Tag Library" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Demonstrates use of the Spring Security Facelets tag library.</span>
|
||||
<p class="notice">
|
||||
The above flow definition is protected with Spring Security.
|
||||
You'll be redirected to a login page the first time.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<h:outputLink value="file-upload?tab=3" >
|
||||
<h:outputText value="File Upload" />
|
||||
</h:outputLink><br/>
|
||||
<span class="alt">Uses the PrimeFaces fileUpload component to demonstratie uploading a file.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p:tab>
|
||||
|
||||
<!--
|
||||
popup with form validation
|
||||
popup with multiple state transitions
|
||||
breadcrumb(http://forum.springsource.org/showthread.php?t=94207)
|
||||
custom jsf component
|
||||
jpa persistence
|
||||
file upload
|
||||
-->
|
||||
|
||||
</p:tabView>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
66
primefaces-showcase/src/main/webapp/WEB-INF/views/login.xhtml
Executable file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
xmlns:p="http://primefaces.org/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="title">Login</ui:define>
|
||||
|
||||
<ui:define name="notes">
|
||||
<h5>Configuration to review:</h5>
|
||||
<ul>
|
||||
<li>Spring Security filter and taglib declarations: src/main/webapp/WEB-INF/web.xml</li>
|
||||
<li>Spring Security configuration: src/main/webapp/WEB-INF/spring/security-config.xml</li>
|
||||
<li>Taglib file: src/main/webapp/WEB-INF/springsecurity.taglib.xml</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<div class="span-10">
|
||||
<c:if test="${not empty param.login_error}">
|
||||
<div class="error">
|
||||
Your login attempt was not successful, try again.<br />
|
||||
Reason: #{sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
|
||||
</div>
|
||||
</c:if>
|
||||
<p:panel header="Login Information">
|
||||
<form name="f" action="${request.contextPath}/app/j_spring_security_check" method="post">
|
||||
<p>
|
||||
User:
|
||||
<br />
|
||||
<c:if test="${not empty param.login_error}">
|
||||
<c:set var="username" value="${sessionScope.SPRING_SECURITY_LAST_USERNAME}"/>
|
||||
</c:if>
|
||||
<input type="text" name="j_username" value="#{username}"/>
|
||||
</p>
|
||||
<p>
|
||||
Password:
|
||||
<br />
|
||||
<input type="password" name="j_password" />
|
||||
</p>
|
||||
<p>
|
||||
<input type="checkbox" name="_spring_security_remember_me"/>
|
||||
Don't ask for my password for two weeks
|
||||
</p>
|
||||
<p>
|
||||
<input name="submit" type="submit" value="Login" />
|
||||
</p>
|
||||
</form>
|
||||
</p:panel>
|
||||
</div>
|
||||
<div class="prepend-1 span-12 last">
|
||||
<h5>Username/password pairs:</h5>
|
||||
<ul>
|
||||
<li>joe/joe1</li>
|
||||
<li>pete/pete1</li>
|
||||
</ul>
|
||||
<h5>Roles assigned:</h5>
|
||||
<ul>
|
||||
<li>joe has ROLE_USER and ROLE_APPLE_USER</li>
|
||||
<li>pete has ROLE_USER and ROLE_ANDROID_USER</li>
|
||||
</ul>
|
||||
</div>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
113
primefaces-showcase/src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||||
|
||||
<!--
|
||||
SPRING ROOT WEB APPLICATION CONTEXT
|
||||
-->
|
||||
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/spring/root-context.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
|
||||
<!--
|
||||
SPRING SECURITY
|
||||
-->
|
||||
<filter>
|
||||
<filter-name>springSecurityFilterChain</filter-name>
|
||||
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>springSecurityFilterChain</filter-name>
|
||||
<servlet-name>Spring MVC Servlet</servlet-name>
|
||||
</filter-mapping>
|
||||
|
||||
<!--
|
||||
JSF 2 IMPLEMENTATION
|
||||
-->
|
||||
|
||||
<!-- Use JSF view templates saved as *.xhtml, for use with Facelets -->
|
||||
<context-param>
|
||||
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
|
||||
<param-value>.xhtml</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Enables special Facelets debug output during development -->
|
||||
<context-param>
|
||||
<param-name>javax.faces.PROJECT_STAGE</param-name>
|
||||
<param-value>Development</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Causes Facelets to refresh templates during development -->
|
||||
<context-param>
|
||||
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
|
||||
<param-value>1</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Just here so the JSF implementation can initialize, *not* used at runtime -->
|
||||
<servlet>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<!-- Just here so the JSF implementation can initialize -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.faces</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!--
|
||||
SPRING MVC
|
||||
-->
|
||||
|
||||
<servlet>
|
||||
<servlet-name>Spring MVC Servlet</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>Spring MVC Servlet</servlet-name>
|
||||
<url-pattern>/app/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<filter>
|
||||
<filter-name>PrimeFaces FileUpload Filter</filter-name>
|
||||
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>PrimeFaces FileUpload Filter</filter-name>
|
||||
<servlet-name>Spring MVC Servlet</servlet-name>
|
||||
</filter-mapping>
|
||||
|
||||
<!--
|
||||
Spring Security Facelets tag library declaration
|
||||
-->
|
||||
<context-param>
|
||||
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
|
||||
<param-value>/WEB-INF/springsecurity.taglib.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<!--
|
||||
DEFAULT PAGE
|
||||
-->
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
5
primefaces-showcase/src/main/webapp/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Refresh" content="0; URL=app/home">
|
||||
</head>
|
||||
</html>
|
||||
BIN
primefaces-showcase/src/main/webapp/styles/blueprint/icons/cross.png
Executable file
|
After Width: | Height: | Size: 655 B |
BIN
primefaces-showcase/src/main/webapp/styles/blueprint/icons/key.png
Executable file
|
After Width: | Height: | Size: 455 B |
BIN
primefaces-showcase/src/main/webapp/styles/blueprint/icons/tick.png
Executable file
|
After Width: | Height: | Size: 537 B |
36
primefaces-showcase/src/main/webapp/styles/blueprint/ie.css
Executable file
@@ -0,0 +1,36 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
|
||||
|
||||
Blueprint CSS Framework 0.9
|
||||
http://blueprintcss.org
|
||||
|
||||
* Copyright (c) 2007-Present. See LICENSE for more info.
|
||||
* See README for instructions on how to use Blueprint.
|
||||
* For credits and origins, see AUTHORS.
|
||||
* This is a compressed file. See the sources in the 'src' directory.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
/* ie.css */
|
||||
body {text-align:center;}
|
||||
.container {text-align:left;}
|
||||
* html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {display:inline;overflow-x:hidden;}
|
||||
* html legend {margin:0px -8px 16px 0;padding:0;}
|
||||
ol {margin-left:2em;}
|
||||
sup {vertical-align:text-top;}
|
||||
sub {vertical-align:text-bottom;}
|
||||
html>body p code {*white-space:normal;}
|
||||
hr {margin:-8px auto 11px;}
|
||||
img {-ms-interpolation-mode:bicubic;}
|
||||
.clearfix, .container {display:inline-block;}
|
||||
* html .clearfix, * html .container {height:1%;}
|
||||
fieldset {padding-top:0;}
|
||||
textarea {overflow:auto;}
|
||||
input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;}
|
||||
input.text:focus, input.title:focus {border-color:#666;}
|
||||
input.text, input.title, textarea, select {margin:0.5em 0;}
|
||||
input.checkbox, input.radio {position:relative;top:.25em;}
|
||||
form.inline div, form.inline p {vertical-align:middle;}
|
||||
form.inline label {position:relative;top:-0.25em;}
|
||||
form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
|
||||
button, input.button {position:relative;top:0.25em;}
|
||||
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 455 B |
|
After Width: | Height: | Size: 537 B |
@@ -0,0 +1,32 @@
|
||||
Buttons
|
||||
|
||||
* Gives you great looking CSS buttons, for both <a> and <button>.
|
||||
* Demo: particletree.com/features/rediscovering-the-button-element
|
||||
|
||||
|
||||
Credits
|
||||
----------------------------------------------------------------
|
||||
|
||||
* Created by Kevin Hale [particletree.com]
|
||||
* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com]
|
||||
|
||||
|
||||
Usage
|
||||
----------------------------------------------------------------
|
||||
|
||||
1) Add this plugin to lib/settings.yml.
|
||||
See compress.rb for instructions.
|
||||
|
||||
2) Use the following HTML code to place the buttons on your site:
|
||||
|
||||
<button type="submit" class="button positive">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
|
||||
</button>
|
||||
|
||||
<a class="button" href="/password/reset/">
|
||||
<img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
|
||||
</a>
|
||||
|
||||
<a href="#" class="button negative">
|
||||
<img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
|
||||
</a>
|
||||
@@ -0,0 +1,97 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
buttons.css
|
||||
* Gives you some great CSS-only buttons.
|
||||
|
||||
Created by Kevin Hale [particletree.com]
|
||||
* particletree.com/features/rediscovering-the-button-element
|
||||
|
||||
See Readme.txt in this folder for instructions.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
a.button, button {
|
||||
display:block;
|
||||
float:left;
|
||||
margin: 0.7em 0.5em 0.7em 0;
|
||||
padding:5px 10px 5px 7px; /* Links */
|
||||
|
||||
border:1px solid #dedede;
|
||||
border-top:1px solid #eee;
|
||||
border-left:1px solid #eee;
|
||||
|
||||
background-color:#f5f5f5;
|
||||
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
|
||||
font-size:100%;
|
||||
line-height:130%;
|
||||
text-decoration:none;
|
||||
font-weight:bold;
|
||||
color:#565656;
|
||||
cursor:pointer;
|
||||
}
|
||||
button {
|
||||
width:auto;
|
||||
overflow:visible;
|
||||
padding:4px 10px 3px 7px; /* IE6 */
|
||||
}
|
||||
button[type] {
|
||||
padding:4px 10px 4px 7px; /* Firefox */
|
||||
line-height:17px; /* Safari */
|
||||
}
|
||||
*:first-child+html button[type] {
|
||||
padding:4px 10px 3px 7px; /* IE7 */
|
||||
}
|
||||
button img, a.button img{
|
||||
margin:0 3px -3px 0 !important;
|
||||
padding:0;
|
||||
border:none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
float:none;
|
||||
}
|
||||
|
||||
|
||||
/* Button colors
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Standard */
|
||||
button:hover, a.button:hover{
|
||||
background-color:#dff4ff;
|
||||
border:1px solid #c2e1ef;
|
||||
color:#336699;
|
||||
}
|
||||
a.button:active{
|
||||
background-color:#6299c5;
|
||||
border:1px solid #6299c5;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
/* Positive */
|
||||
body .positive {
|
||||
color:#529214;
|
||||
}
|
||||
a.positive:hover, button.positive:hover {
|
||||
background-color:#E6EFC2;
|
||||
border:1px solid #C6D880;
|
||||
color:#529214;
|
||||
}
|
||||
a.positive:active {
|
||||
background-color:#529214;
|
||||
border:1px solid #529214;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
/* Negative */
|
||||
body .negative {
|
||||
color:#d12f19;
|
||||
}
|
||||
a.negative:hover, button.negative:hover {
|
||||
background-color:#fbe3e4;
|
||||
border:1px solid #fbc2c4;
|
||||
color:#d12f19;
|
||||
}
|
||||
a.negative:active {
|
||||
background-color:#d12f19;
|
||||
border:1px solid #d12f19;
|
||||
color:#fff;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Fancy Type
|
||||
|
||||
* Gives you classes to use if you'd like some
|
||||
extra fancy typography.
|
||||
|
||||
Credits and instructions are specified above each class
|
||||
in the fancy-type.css file in this directory.
|
||||
|
||||
|
||||
Usage
|
||||
----------------------------------------------------------------
|
||||
|
||||
1) Add this plugin to lib/settings.yml.
|
||||
See compress.rb for instructions.
|
||||
@@ -0,0 +1,71 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
fancy-type.css
|
||||
* Lots of pretty advanced classes for manipulating text.
|
||||
|
||||
See the Readme file in this folder for additional instructions.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Indentation instead of line shifts for sibling paragraphs. */
|
||||
p + p { text-indent:2em; margin-top:-1.5em; }
|
||||
form p + p { text-indent: 0; } /* Don't want this in forms. */
|
||||
|
||||
|
||||
/* For great looking type, use this code instead of asdf:
|
||||
<span class="alt">asdf</span>
|
||||
Best used on prepositions and ampersands. */
|
||||
|
||||
.alt {
|
||||
color: #666;
|
||||
font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/* For great looking quote marks in titles, replace "asdf" with:
|
||||
<span class="dquo">“</span>asdf”
|
||||
(That is, when the title starts with a quote mark).
|
||||
(You may have to change this value depending on your font size). */
|
||||
|
||||
.dquo { margin-left: -.5em; }
|
||||
|
||||
|
||||
/* Reduced size type with incremental leading
|
||||
(http://www.markboulton.co.uk/journal/comments/incremental_leading/)
|
||||
|
||||
This could be used for side notes. For smaller type, you don't necessarily want to
|
||||
follow the 1.5x vertical rhythm -- the line-height is too much.
|
||||
|
||||
Using this class, it reduces your font size and line-height so that for
|
||||
every four lines of normal sized type, there is five lines of the sidenote. eg:
|
||||
|
||||
New type size in em's:
|
||||
10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems)
|
||||
|
||||
New line-height value:
|
||||
12px x 1.5 = 18px (old line-height)
|
||||
18px x 4 = 72px
|
||||
72px / 5 = 14.4px (new line height)
|
||||
14.4px / 10px = 1.44 (new line height in em's) */
|
||||
|
||||
p.incr, .incr p {
|
||||
font-size: 10px;
|
||||
line-height: 1.44em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
/* Surround uppercase words and abbreviations with this class.
|
||||
Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */
|
||||
|
||||
.caps {
|
||||
font-variant: small-caps;
|
||||
letter-spacing: 1px;
|
||||
text-transform: lowercase;
|
||||
font-size:1.2em;
|
||||
line-height:1%;
|
||||
font-weight:bold;
|
||||
padding:0 2px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 777 B |
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 691 B |
|
After Width: | Height: | Size: 741 B |
|
After Width: | Height: | Size: 591 B |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 663 B |
@@ -0,0 +1,18 @@
|
||||
Link Icons
|
||||
* Icons for links based on protocol or file type.
|
||||
|
||||
This is not supported in IE versions < 7.
|
||||
|
||||
|
||||
Credits
|
||||
----------------------------------------------------------------
|
||||
|
||||
* Marc Morgan
|
||||
* Olav Bjorkoy [bjorkoy.com]
|
||||
|
||||
|
||||
Usage
|
||||
----------------------------------------------------------------
|
||||
|
||||
1) Add this line to your HTML:
|
||||
<link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">
|
||||
@@ -0,0 +1,40 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
link-icons.css
|
||||
* Icons for links based on protocol or file type.
|
||||
|
||||
See the Readme file in this folder for additional instructions.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Use this class if a link gets an icon when it shouldn't. */
|
||||
body a.noicon {
|
||||
background:transparent none !important;
|
||||
padding:0 !important;
|
||||
margin:0 !important;
|
||||
}
|
||||
|
||||
/* Make sure the icons are not cut */
|
||||
a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
|
||||
a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
|
||||
a[href$=".rdf"], a[href^="aim:"] {
|
||||
padding:2px 22px 2px 0;
|
||||
margin:-2px 0;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right center;
|
||||
}
|
||||
|
||||
/* External links */
|
||||
a[href^="http:"] { background-image: url(icons/external.png); }
|
||||
a[href^="mailto:"] { background-image: url(icons/email.png); }
|
||||
a[href^="http:"]:visited { background-image: url(icons/visited.png); }
|
||||
|
||||
/* Files */
|
||||
a[href$=".pdf"] { background-image: url(icons/pdf.png); }
|
||||
a[href$=".doc"] { background-image: url(icons/doc.png); }
|
||||
a[href$=".xls"] { background-image: url(icons/xls.png); }
|
||||
|
||||
/* Misc */
|
||||
a[href$=".rss"],
|
||||
a[href$=".rdf"] { background-image: url(icons/feed.png); }
|
||||
a[href^="aim:"] { background-image: url(icons/im.png); }
|
||||
10
primefaces-showcase/src/main/webapp/styles/blueprint/plugins/rtl/readme.txt
Executable file
@@ -0,0 +1,10 @@
|
||||
RTL
|
||||
* Mirrors Blueprint, so it can be used with Right-to-Left languages.
|
||||
|
||||
By Ran Yaniv Hartstein, ranh.co.il
|
||||
|
||||
Usage
|
||||
----------------------------------------------------------------
|
||||
|
||||
1) Add this line to your HTML:
|
||||
<link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection">
|
||||
110
primefaces-showcase/src/main/webapp/styles/blueprint/plugins/rtl/screen.css
Executable file
@@ -0,0 +1,110 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
rtl.css
|
||||
* Mirrors Blueprint for left-to-right languages
|
||||
|
||||
By Ran Yaniv Hartstein [ranh.co.il]
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
body .container { direction: rtl; }
|
||||
body .column, body div.span-1, body div.span-2, body div.span-3, body div.span-4, body div.span-5, body div.span-6, body div.span-7, body div.span-8, body div.span-9, body div.span-10, body div.span-11, body div.span-12, body div.span-13, body div.span-14, body div.span-15, body div.span-16, body div.span-17, body div.span-18, body div.span-19, body div.span-20, body div.span-21, body div.span-22, body div.span-23, body div.span-24 {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
body div.last { margin-left: 0; }
|
||||
body table .last { padding-left: 0; }
|
||||
|
||||
body .append-1 { padding-right: 0; padding-left: 40px; }
|
||||
body .append-2 { padding-right: 0; padding-left: 80px; }
|
||||
body .append-3 { padding-right: 0; padding-left: 120px; }
|
||||
body .append-4 { padding-right: 0; padding-left: 160px; }
|
||||
body .append-5 { padding-right: 0; padding-left: 200px; }
|
||||
body .append-6 { padding-right: 0; padding-left: 240px; }
|
||||
body .append-7 { padding-right: 0; padding-left: 280px; }
|
||||
body .append-8 { padding-right: 0; padding-left: 320px; }
|
||||
body .append-9 { padding-right: 0; padding-left: 360px; }
|
||||
body .append-10 { padding-right: 0; padding-left: 400px; }
|
||||
body .append-11 { padding-right: 0; padding-left: 440px; }
|
||||
body .append-12 { padding-right: 0; padding-left: 480px; }
|
||||
body .append-13 { padding-right: 0; padding-left: 520px; }
|
||||
body .append-14 { padding-right: 0; padding-left: 560px; }
|
||||
body .append-15 { padding-right: 0; padding-left: 600px; }
|
||||
body .append-16 { padding-right: 0; padding-left: 640px; }
|
||||
body .append-17 { padding-right: 0; padding-left: 680px; }
|
||||
body .append-18 { padding-right: 0; padding-left: 720px; }
|
||||
body .append-19 { padding-right: 0; padding-left: 760px; }
|
||||
body .append-20 { padding-right: 0; padding-left: 800px; }
|
||||
body .append-21 { padding-right: 0; padding-left: 840px; }
|
||||
body .append-22 { padding-right: 0; padding-left: 880px; }
|
||||
body .append-23 { padding-right: 0; padding-left: 920px; }
|
||||
|
||||
body .prepend-1 { padding-left: 0; padding-right: 40px; }
|
||||
body .prepend-2 { padding-left: 0; padding-right: 80px; }
|
||||
body .prepend-3 { padding-left: 0; padding-right: 120px; }
|
||||
body .prepend-4 { padding-left: 0; padding-right: 160px; }
|
||||
body .prepend-5 { padding-left: 0; padding-right: 200px; }
|
||||
body .prepend-6 { padding-left: 0; padding-right: 240px; }
|
||||
body .prepend-7 { padding-left: 0; padding-right: 280px; }
|
||||
body .prepend-8 { padding-left: 0; padding-right: 320px; }
|
||||
body .prepend-9 { padding-left: 0; padding-right: 360px; }
|
||||
body .prepend-10 { padding-left: 0; padding-right: 400px; }
|
||||
body .prepend-11 { padding-left: 0; padding-right: 440px; }
|
||||
body .prepend-12 { padding-left: 0; padding-right: 480px; }
|
||||
body .prepend-13 { padding-left: 0; padding-right: 520px; }
|
||||
body .prepend-14 { padding-left: 0; padding-right: 560px; }
|
||||
body .prepend-15 { padding-left: 0; padding-right: 600px; }
|
||||
body .prepend-16 { padding-left: 0; padding-right: 640px; }
|
||||
body .prepend-17 { padding-left: 0; padding-right: 680px; }
|
||||
body .prepend-18 { padding-left: 0; padding-right: 720px; }
|
||||
body .prepend-19 { padding-left: 0; padding-right: 760px; }
|
||||
body .prepend-20 { padding-left: 0; padding-right: 800px; }
|
||||
body .prepend-21 { padding-left: 0; padding-right: 840px; }
|
||||
body .prepend-22 { padding-left: 0; padding-right: 880px; }
|
||||
body .prepend-23 { padding-left: 0; padding-right: 920px; }
|
||||
|
||||
body .border {
|
||||
padding-right: 0;
|
||||
padding-left: 4px;
|
||||
margin-right: 0;
|
||||
margin-left: 5px;
|
||||
border-right: none;
|
||||
border-left: 1px solid #eee;
|
||||
}
|
||||
|
||||
body .colborder {
|
||||
padding-right: 0;
|
||||
padding-left: 24px;
|
||||
margin-right: 0;
|
||||
margin-left: 25px;
|
||||
border-right: none;
|
||||
border-left: 1px solid #eee;
|
||||
}
|
||||
|
||||
body .pull-1 { margin-left: 0; margin-right: -40px; }
|
||||
body .pull-2 { margin-left: 0; margin-right: -80px; }
|
||||
body .pull-3 { margin-left: 0; margin-right: -120px; }
|
||||
body .pull-4 { margin-left: 0; margin-right: -160px; }
|
||||
|
||||
body .push-0 { margin: 0 18px 0 0; }
|
||||
body .push-1 { margin: 0 18px 0 -40px; }
|
||||
body .push-2 { margin: 0 18px 0 -80px; }
|
||||
body .push-3 { margin: 0 18px 0 -120px; }
|
||||
body .push-4 { margin: 0 18px 0 -160px; }
|
||||
body .push-0, body .push-1, body .push-2,
|
||||
body .push-3, body .push-4 { float: left; }
|
||||
|
||||
|
||||
/* Typography with RTL support */
|
||||
body h1,body h2,body h3,
|
||||
body h4,body h5,body h6 { font-family: Arial, sans-serif; }
|
||||
html body { font-family: Arial, sans-serif; }
|
||||
body pre,body code,body tt { font-family: monospace; }
|
||||
|
||||
/* Mirror floats and margins on typographic elements */
|
||||
body p img { float: right; margin: 1.5em 0 1.5em 1.5em; }
|
||||
body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;}
|
||||
body td, body th { text-align:right; }
|
||||
29
primefaces-showcase/src/main/webapp/styles/blueprint/print.css
Executable file
@@ -0,0 +1,29 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
|
||||
|
||||
Blueprint CSS Framework 0.9
|
||||
http://blueprintcss.org
|
||||
|
||||
* Copyright (c) 2007-Present. See LICENSE for more info.
|
||||
* See README for instructions on how to use Blueprint.
|
||||
* For credits and origins, see AUTHORS.
|
||||
* This is a compressed file. See the sources in the 'src' directory.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
/* print.css */
|
||||
body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
|
||||
.container {background:none;}
|
||||
hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
|
||||
hr.space {background:#fff;color:#fff;visibility:hidden;}
|
||||
h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
|
||||
code {font:.9em "Courier New", Monaco, Courier, monospace;}
|
||||
a img {border:none;}
|
||||
p img.top {margin-top:0;}
|
||||
blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
|
||||
.small {font-size:.9em;}
|
||||
.large {font-size:1.1em;}
|
||||
.quiet {color:#999;}
|
||||
.hide {display:none;}
|
||||
a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
|
||||
a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
|
||||
280
primefaces-showcase/src/main/webapp/styles/blueprint/screen.css
Executable file
@@ -0,0 +1,280 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
|
||||
|
||||
Blueprint CSS Framework 0.9
|
||||
http://blueprintcss.org
|
||||
|
||||
* Copyright (c) 2007-Present. See LICENSE for more info.
|
||||
* See README for instructions on how to use Blueprint.
|
||||
* For credits and origins, see AUTHORS.
|
||||
* This is a compressed file. See the sources in the 'src' directory.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
/* reset.css */
|
||||
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
|
||||
body {line-height:1.5;}
|
||||
table {border-collapse:separate;border-spacing:0;}
|
||||
caption, th, td {text-align:left;font-weight:normal;}
|
||||
table, td, th {vertical-align:middle;}
|
||||
blockquote:before, blockquote:after, q:before, q:after {content:"";}
|
||||
blockquote, q {quotes:"" "";}
|
||||
a img {border:none;}
|
||||
|
||||
/* typography.css */
|
||||
html {font-size:100.01%;}
|
||||
body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
|
||||
h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
|
||||
h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
|
||||
h2 {font-size:2em;margin-bottom:0.75em;}
|
||||
h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
|
||||
h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
|
||||
h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
|
||||
h6 {font-size:1em;font-weight:bold;}
|
||||
h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
|
||||
p {margin:0 0 1.5em;}
|
||||
p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
|
||||
p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
|
||||
a:focus, a:hover {color:#000;}
|
||||
a {color:#009;text-decoration:underline;}
|
||||
blockquote {margin:1.5em;color:#666;font-style:italic;}
|
||||
strong {font-weight:bold;}
|
||||
em, dfn {font-style:italic;}
|
||||
dfn {font-weight:bold;}
|
||||
sup, sub {line-height:0;}
|
||||
abbr, acronym {border-bottom:1px dotted #666;}
|
||||
address {margin:0 0 1.5em;font-style:italic;}
|
||||
del {color:#666;}
|
||||
pre {margin:1.5em 0;white-space:pre;}
|
||||
pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
|
||||
li ul, li ol {margin:0 1.5em;}
|
||||
ul, ol {margin:0 1.5em 1.5em 1.5em;}
|
||||
ul {list-style-type:disc;}
|
||||
ol {list-style-type:decimal;}
|
||||
dl {margin:0 0 1.5em 0;}
|
||||
dl dt {font-weight:bold;}
|
||||
dd {margin-left:1.5em;}
|
||||
table {margin-bottom:1.4em;width:100%;}
|
||||
th {font-weight:bold;}
|
||||
thead th {background:#c3d9ff;}
|
||||
th, td, caption {padding:4px 10px 4px 5px;}
|
||||
tr.even td {background:#e5ecf9;}
|
||||
tfoot {font-style:italic;}
|
||||
caption {background:#eee;}
|
||||
.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
|
||||
.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
|
||||
.hide {display:none;}
|
||||
.quiet {color:#666;}
|
||||
.loud {color:#000;}
|
||||
.highlight {background:#ff0;}
|
||||
.added {background:#060;color:#fff;}
|
||||
.removed {background:#900;color:#fff;}
|
||||
.first {margin-left:0;padding-left:0;}
|
||||
.last {margin-right:0;padding-right:0;}
|
||||
.top {margin-top:0;padding-top:0;}
|
||||
.bottom {margin-bottom:0;padding-bottom:0;}
|
||||
|
||||
/* forms.css */
|
||||
label {font-weight:bold;}
|
||||
fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
|
||||
legend {font-weight:bold;font-size:1.2em;}
|
||||
input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
|
||||
input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
|
||||
input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;}
|
||||
input.text, input.title {width:300px;padding:5px;}
|
||||
input.title {font-size:1.5em;}
|
||||
textarea {width:390px;height:250px;padding:5px;}
|
||||
input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
|
||||
form.inline {line-height:3;}
|
||||
form.inline p {margin-bottom:0;}
|
||||
.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
|
||||
.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
|
||||
.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
|
||||
.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
|
||||
.error a {color:#8a1f11;}
|
||||
.notice a {color:#514721;}
|
||||
.success a {color:#264409;}
|
||||
|
||||
/* grid.css */
|
||||
.container {width:950px;margin:0 auto;}
|
||||
.showgrid {background:url(src/grid.png);}
|
||||
.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
|
||||
.last, div.last {margin-right:0;}
|
||||
.span-1 {width:30px;}
|
||||
.span-2 {width:70px;}
|
||||
.span-3 {width:110px;}
|
||||
.span-4 {width:150px;}
|
||||
.span-5 {width:190px;}
|
||||
.span-6 {width:230px;}
|
||||
.span-7 {width:270px;}
|
||||
.span-8 {width:310px;}
|
||||
.span-9 {width:350px;}
|
||||
.span-10 {width:390px;}
|
||||
.span-11 {width:430px;}
|
||||
.span-12 {width:470px;}
|
||||
.span-13 {width:510px;}
|
||||
.span-14 {width:550px;}
|
||||
.span-15 {width:590px;}
|
||||
.span-16 {width:630px;}
|
||||
.span-17 {width:670px;}
|
||||
.span-18 {width:710px;}
|
||||
.span-19 {width:750px;}
|
||||
.span-20 {width:790px;}
|
||||
.span-21 {width:830px;}
|
||||
.span-22 {width:870px;}
|
||||
.span-23 {width:910px;}
|
||||
.span-24, div.span-24 {width:950px;margin-right:0;}
|
||||
input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;}
|
||||
input.span-1, textarea.span-1 {width:18px!important;}
|
||||
input.span-2, textarea.span-2 {width:58px!important;}
|
||||
input.span-3, textarea.span-3 {width:98px!important;}
|
||||
input.span-4, textarea.span-4 {width:138px!important;}
|
||||
input.span-5, textarea.span-5 {width:178px!important;}
|
||||
input.span-6, textarea.span-6 {width:218px!important;}
|
||||
input.span-7, textarea.span-7 {width:258px!important;}
|
||||
input.span-8, textarea.span-8 {width:298px!important;}
|
||||
input.span-9, textarea.span-9 {width:338px!important;}
|
||||
input.span-10, textarea.span-10 {width:378px!important;}
|
||||
input.span-11, textarea.span-11 {width:418px!important;}
|
||||
input.span-12, textarea.span-12 {width:458px!important;}
|
||||
input.span-13, textarea.span-13 {width:498px!important;}
|
||||
input.span-14, textarea.span-14 {width:538px!important;}
|
||||
input.span-15, textarea.span-15 {width:578px!important;}
|
||||
input.span-16, textarea.span-16 {width:618px!important;}
|
||||
input.span-17, textarea.span-17 {width:658px!important;}
|
||||
input.span-18, textarea.span-18 {width:698px!important;}
|
||||
input.span-19, textarea.span-19 {width:738px!important;}
|
||||
input.span-20, textarea.span-20 {width:778px!important;}
|
||||
input.span-21, textarea.span-21 {width:818px!important;}
|
||||
input.span-22, textarea.span-22 {width:858px!important;}
|
||||
input.span-23, textarea.span-23 {width:898px!important;}
|
||||
input.span-24, textarea.span-24 {width:938px!important;}
|
||||
.append-1 {padding-right:40px;}
|
||||
.append-2 {padding-right:80px;}
|
||||
.append-3 {padding-right:120px;}
|
||||
.append-4 {padding-right:160px;}
|
||||
.append-5 {padding-right:200px;}
|
||||
.append-6 {padding-right:240px;}
|
||||
.append-7 {padding-right:280px;}
|
||||
.append-8 {padding-right:320px;}
|
||||
.append-9 {padding-right:360px;}
|
||||
.append-10 {padding-right:400px;}
|
||||
.append-11 {padding-right:440px;}
|
||||
.append-12 {padding-right:480px;}
|
||||
.append-13 {padding-right:520px;}
|
||||
.append-14 {padding-right:560px;}
|
||||
.append-15 {padding-right:600px;}
|
||||
.append-16 {padding-right:640px;}
|
||||
.append-17 {padding-right:680px;}
|
||||
.append-18 {padding-right:720px;}
|
||||
.append-19 {padding-right:760px;}
|
||||
.append-20 {padding-right:800px;}
|
||||
.append-21 {padding-right:840px;}
|
||||
.append-22 {padding-right:880px;}
|
||||
.append-23 {padding-right:920px;}
|
||||
.prepend-1 {padding-left:40px;}
|
||||
.prepend-2 {padding-left:80px;}
|
||||
.prepend-3 {padding-left:120px;}
|
||||
.prepend-4 {padding-left:160px;}
|
||||
.prepend-5 {padding-left:200px;}
|
||||
.prepend-6 {padding-left:240px;}
|
||||
.prepend-7 {padding-left:280px;}
|
||||
.prepend-8 {padding-left:320px;}
|
||||
.prepend-9 {padding-left:360px;}
|
||||
.prepend-10 {padding-left:400px;}
|
||||
.prepend-11 {padding-left:440px;}
|
||||
.prepend-12 {padding-left:480px;}
|
||||
.prepend-13 {padding-left:520px;}
|
||||
.prepend-14 {padding-left:560px;}
|
||||
.prepend-15 {padding-left:600px;}
|
||||
.prepend-16 {padding-left:640px;}
|
||||
.prepend-17 {padding-left:680px;}
|
||||
.prepend-18 {padding-left:720px;}
|
||||
.prepend-19 {padding-left:760px;}
|
||||
.prepend-20 {padding-left:800px;}
|
||||
.prepend-21 {padding-left:840px;}
|
||||
.prepend-22 {padding-left:880px;}
|
||||
.prepend-23 {padding-left:920px;}
|
||||
div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
|
||||
div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
|
||||
.pull-1 {margin-left:-40px;}
|
||||
.pull-2 {margin-left:-80px;}
|
||||
.pull-3 {margin-left:-120px;}
|
||||
.pull-4 {margin-left:-160px;}
|
||||
.pull-5 {margin-left:-200px;}
|
||||
.pull-6 {margin-left:-240px;}
|
||||
.pull-7 {margin-left:-280px;}
|
||||
.pull-8 {margin-left:-320px;}
|
||||
.pull-9 {margin-left:-360px;}
|
||||
.pull-10 {margin-left:-400px;}
|
||||
.pull-11 {margin-left:-440px;}
|
||||
.pull-12 {margin-left:-480px;}
|
||||
.pull-13 {margin-left:-520px;}
|
||||
.pull-14 {margin-left:-560px;}
|
||||
.pull-15 {margin-left:-600px;}
|
||||
.pull-16 {margin-left:-640px;}
|
||||
.pull-17 {margin-left:-680px;}
|
||||
.pull-18 {margin-left:-720px;}
|
||||
.pull-19 {margin-left:-760px;}
|
||||
.pull-20 {margin-left:-800px;}
|
||||
.pull-21 {margin-left:-840px;}
|
||||
.pull-22 {margin-left:-880px;}
|
||||
.pull-23 {margin-left:-920px;}
|
||||
.pull-24 {margin-left:-960px;}
|
||||
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
|
||||
.push-1 {margin:0 -40px 1.5em 40px;}
|
||||
.push-2 {margin:0 -80px 1.5em 80px;}
|
||||
.push-3 {margin:0 -120px 1.5em 120px;}
|
||||
.push-4 {margin:0 -160px 1.5em 160px;}
|
||||
.push-5 {margin:0 -200px 1.5em 200px;}
|
||||
.push-6 {margin:0 -240px 1.5em 240px;}
|
||||
.push-7 {margin:0 -280px 1.5em 280px;}
|
||||
.push-8 {margin:0 -320px 1.5em 320px;}
|
||||
.push-9 {margin:0 -360px 1.5em 360px;}
|
||||
.push-10 {margin:0 -400px 1.5em 400px;}
|
||||
.push-11 {margin:0 -440px 1.5em 440px;}
|
||||
.push-12 {margin:0 -480px 1.5em 480px;}
|
||||
.push-13 {margin:0 -520px 1.5em 520px;}
|
||||
.push-14 {margin:0 -560px 1.5em 560px;}
|
||||
.push-15 {margin:0 -600px 1.5em 600px;}
|
||||
.push-16 {margin:0 -640px 1.5em 640px;}
|
||||
.push-17 {margin:0 -680px 1.5em 680px;}
|
||||
.push-18 {margin:0 -720px 1.5em 720px;}
|
||||
.push-19 {margin:0 -760px 1.5em 760px;}
|
||||
.push-20 {margin:0 -800px 1.5em 800px;}
|
||||
.push-21 {margin:0 -840px 1.5em 840px;}
|
||||
.push-22 {margin:0 -880px 1.5em 880px;}
|
||||
.push-23 {margin:0 -920px 1.5em 920px;}
|
||||
.push-24 {margin:0 -960px 1.5em 960px;}
|
||||
.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
|
||||
.prepend-top {margin-top:1.5em;}
|
||||
.append-bottom {margin-bottom:1.5em;}
|
||||
.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
|
||||
hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
|
||||
hr.space {background:#fff;color:#fff;visibility:hidden;}
|
||||
.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
|
||||
.clearfix, .container {display:block;}
|
||||
.clear {clear:both;}
|
||||
|
||||
/* fancy-type */
|
||||
p + p {text-indent:2em;margin-top:-1.5em;}
|
||||
form p + p {text-indent:0;}
|
||||
.alt {color:#666;font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;font-style:italic;font-weight:normal;}
|
||||
.dquo {margin-left:-.5em;}
|
||||
p.incr, .incr p {font-size:10px;line-height:1.44em;margin-bottom:1.5em;}
|
||||
.caps {font-variant:small-caps;letter-spacing:1px;text-transform:lowercase;font-size:1.2em;line-height:1%;font-weight:bold;padding:0 2px;}
|
||||
|
||||
/* buttons */
|
||||
a.button, button {display:block;float:left;margin:0.7em 0.5em 0.7em 0;padding:5px 10px 5px 7px;border:1px solid #dedede;border-top:1px solid #eee;border-left:1px solid #eee;background-color:#f5f5f5;font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;font-size:100%;line-height:130%;text-decoration:none;font-weight:bold;color:#565656;cursor:pointer;}
|
||||
button {width:auto;overflow:visible;padding:4px 10px 3px 7px;}
|
||||
button[type] {padding:4px 10px 4px 7px;line-height:17px;}
|
||||
*:first-child+html button[type] {padding:4px 10px 3px 7px;}
|
||||
button img, a.button img {margin:0 3px -3px 0 !important;padding:0;border:none;width:16px;height:16px;float:none;}
|
||||
button:hover, a.button:hover {background-color:#dff4ff;border:1px solid #c2e1ef;color:#336699;}
|
||||
a.button:active {background-color:#6299c5;border:1px solid #6299c5;color:#fff;}
|
||||
body .positive {color:#529214;}
|
||||
a.positive:hover, button.positive:hover {background-color:#E6EFC2;border:1px solid #C6D880;color:#529214;}
|
||||
a.positive:active {background-color:#529214;border:1px solid #529214;color:#fff;}
|
||||
body .negative {color:#d12f19;}
|
||||
a.negative:hover, button.negative:hover {background-color:#fbe3e4;border:1px solid #fbc2c4;color:#d12f19;}
|
||||
a.negative:active {background-color:#d12f19;border:1px solid #d12f19;color:#fff;}
|
||||
65
primefaces-showcase/src/main/webapp/styles/blueprint/src/forms.css
Executable file
@@ -0,0 +1,65 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
forms.css
|
||||
* Sets up some default styling for forms
|
||||
* Gives you classes to enhance your forms
|
||||
|
||||
Usage:
|
||||
* For text fields, use class .title or .text
|
||||
* For inline forms, use .inline (even when using columns)
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
label { font-weight: bold; }
|
||||
fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; }
|
||||
legend { font-weight: bold; font-size:1.2em; }
|
||||
|
||||
|
||||
/* Form fields
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
input[type=text], input[type=password],
|
||||
input.text, input.title,
|
||||
textarea, select {
|
||||
background-color:#fff;
|
||||
border:1px solid #bbb;
|
||||
}
|
||||
input[type=text]:focus, input[type=password]:focus,
|
||||
input.text:focus, input.title:focus,
|
||||
textarea:focus, select:focus {
|
||||
border-color:#666;
|
||||
}
|
||||
|
||||
input[type=text], input[type=password],
|
||||
input.text, input.title,
|
||||
textarea, select {
|
||||
margin:0.5em 0;
|
||||
}
|
||||
|
||||
input.text,
|
||||
input.title { width: 300px; padding:5px; }
|
||||
input.title { font-size:1.5em; }
|
||||
textarea { width: 390px; height: 250px; padding:5px; }
|
||||
|
||||
input[type=checkbox], input[type=radio],
|
||||
input.checkbox, input.radio {
|
||||
position:relative; top:.25em;
|
||||
}
|
||||
|
||||
form.inline { line-height:3; }
|
||||
form.inline p { margin-bottom:0; }
|
||||
|
||||
|
||||
/* Success, notice and error boxes
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
.error,
|
||||
.notice,
|
||||
.success { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; }
|
||||
|
||||
.error { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; }
|
||||
.notice { background: #FFF6BF; color: #514721; border-color: #FFD324; }
|
||||
.success { background: #E6EFC2; color: #264409; border-color: #C6D880; }
|
||||
.error a { color: #8a1f11; }
|
||||
.notice a { color: #514721; }
|
||||
.success a { color: #264409; }
|
||||
281
primefaces-showcase/src/main/webapp/styles/blueprint/src/grid.css
Executable file
@@ -0,0 +1,281 @@
|
||||
/* --------------------------------------------------------------
|
||||
grid.css
|
||||
* Sets up an easy-to-use grid of 24 columns.
|
||||
|
||||
By default, the grid is 950px wide, with 24 columns
|
||||
spanning 30px, and a 10px margin between columns.
|
||||
|
||||
If you need fewer or more columns, namespaces or semantic
|
||||
element names, use the compressor script (lib/compress.rb)
|
||||
|
||||
Note: Changes made in this file will not be applied when
|
||||
using the compressor: make changes in lib/blueprint/grid.css.rb
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* A container should group all your columns. */
|
||||
.container {
|
||||
width: 950px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Use this class on any div.span / container to see the grid. */
|
||||
.showgrid {
|
||||
background: url(src/grid.png);
|
||||
}
|
||||
|
||||
|
||||
/* Columns
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Sets up basic grid floating and margin. */
|
||||
.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* The last column in a row needs this class. */
|
||||
.last, div.last { margin-right: 0; }
|
||||
|
||||
/* Use these classes to set the width of a column. */
|
||||
.span-1 {width: 30px;}
|
||||
|
||||
.span-2 {width: 70px;}
|
||||
.span-3 {width: 110px;}
|
||||
.span-4 {width: 150px;}
|
||||
.span-5 {width: 190px;}
|
||||
.span-6 {width: 230px;}
|
||||
.span-7 {width: 270px;}
|
||||
.span-8 {width: 310px;}
|
||||
.span-9 {width: 350px;}
|
||||
.span-10 {width: 390px;}
|
||||
.span-11 {width: 430px;}
|
||||
.span-12 {width: 470px;}
|
||||
.span-13 {width: 510px;}
|
||||
.span-14 {width: 550px;}
|
||||
.span-15 {width: 590px;}
|
||||
.span-16 {width: 630px;}
|
||||
.span-17 {width: 670px;}
|
||||
.span-18 {width: 710px;}
|
||||
.span-19 {width: 750px;}
|
||||
.span-20 {width: 790px;}
|
||||
.span-21 {width: 830px;}
|
||||
.span-22 {width: 870px;}
|
||||
.span-23 {width: 910px;}
|
||||
.span-24, div.span-24 { width:950px; margin-right:0; }
|
||||
|
||||
/* Use these classes to set the width of an input. */
|
||||
input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {
|
||||
border-left-width: 1px!important;
|
||||
border-right-width: 1px!important;
|
||||
padding-left: 5px!important;
|
||||
padding-right: 5px!important;
|
||||
}
|
||||
|
||||
input.span-1, textarea.span-1 { width: 18px!important; }
|
||||
input.span-2, textarea.span-2 { width: 58px!important; }
|
||||
input.span-3, textarea.span-3 { width: 98px!important; }
|
||||
input.span-4, textarea.span-4 { width: 138px!important; }
|
||||
input.span-5, textarea.span-5 { width: 178px!important; }
|
||||
input.span-6, textarea.span-6 { width: 218px!important; }
|
||||
input.span-7, textarea.span-7 { width: 258px!important; }
|
||||
input.span-8, textarea.span-8 { width: 298px!important; }
|
||||
input.span-9, textarea.span-9 { width: 338px!important; }
|
||||
input.span-10, textarea.span-10 { width: 378px!important; }
|
||||
input.span-11, textarea.span-11 { width: 418px!important; }
|
||||
input.span-12, textarea.span-12 { width: 458px!important; }
|
||||
input.span-13, textarea.span-13 { width: 498px!important; }
|
||||
input.span-14, textarea.span-14 { width: 538px!important; }
|
||||
input.span-15, textarea.span-15 { width: 578px!important; }
|
||||
input.span-16, textarea.span-16 { width: 618px!important; }
|
||||
input.span-17, textarea.span-17 { width: 658px!important; }
|
||||
input.span-18, textarea.span-18 { width: 698px!important; }
|
||||
input.span-19, textarea.span-19 { width: 738px!important; }
|
||||
input.span-20, textarea.span-20 { width: 778px!important; }
|
||||
input.span-21, textarea.span-21 { width: 818px!important; }
|
||||
input.span-22, textarea.span-22 { width: 858px!important; }
|
||||
input.span-23, textarea.span-23 { width: 898px!important; }
|
||||
input.span-24, textarea.span-24 { width: 938px!important; }
|
||||
|
||||
/* Add these to a column to append empty cols. */
|
||||
|
||||
.append-1 { padding-right: 40px;}
|
||||
.append-2 { padding-right: 80px;}
|
||||
.append-3 { padding-right: 120px;}
|
||||
.append-4 { padding-right: 160px;}
|
||||
.append-5 { padding-right: 200px;}
|
||||
.append-6 { padding-right: 240px;}
|
||||
.append-7 { padding-right: 280px;}
|
||||
.append-8 { padding-right: 320px;}
|
||||
.append-9 { padding-right: 360px;}
|
||||
.append-10 { padding-right: 400px;}
|
||||
.append-11 { padding-right: 440px;}
|
||||
.append-12 { padding-right: 480px;}
|
||||
.append-13 { padding-right: 520px;}
|
||||
.append-14 { padding-right: 560px;}
|
||||
.append-15 { padding-right: 600px;}
|
||||
.append-16 { padding-right: 640px;}
|
||||
.append-17 { padding-right: 680px;}
|
||||
.append-18 { padding-right: 720px;}
|
||||
.append-19 { padding-right: 760px;}
|
||||
.append-20 { padding-right: 800px;}
|
||||
.append-21 { padding-right: 840px;}
|
||||
.append-22 { padding-right: 880px;}
|
||||
.append-23 { padding-right: 920px;}
|
||||
|
||||
/* Add these to a column to prepend empty cols. */
|
||||
|
||||
.prepend-1 { padding-left: 40px;}
|
||||
.prepend-2 { padding-left: 80px;}
|
||||
.prepend-3 { padding-left: 120px;}
|
||||
.prepend-4 { padding-left: 160px;}
|
||||
.prepend-5 { padding-left: 200px;}
|
||||
.prepend-6 { padding-left: 240px;}
|
||||
.prepend-7 { padding-left: 280px;}
|
||||
.prepend-8 { padding-left: 320px;}
|
||||
.prepend-9 { padding-left: 360px;}
|
||||
.prepend-10 { padding-left: 400px;}
|
||||
.prepend-11 { padding-left: 440px;}
|
||||
.prepend-12 { padding-left: 480px;}
|
||||
.prepend-13 { padding-left: 520px;}
|
||||
.prepend-14 { padding-left: 560px;}
|
||||
.prepend-15 { padding-left: 600px;}
|
||||
.prepend-16 { padding-left: 640px;}
|
||||
.prepend-17 { padding-left: 680px;}
|
||||
.prepend-18 { padding-left: 720px;}
|
||||
.prepend-19 { padding-left: 760px;}
|
||||
.prepend-20 { padding-left: 800px;}
|
||||
.prepend-21 { padding-left: 840px;}
|
||||
.prepend-22 { padding-left: 880px;}
|
||||
.prepend-23 { padding-left: 920px;}
|
||||
|
||||
|
||||
/* Border on right hand side of a column. */
|
||||
div.border {
|
||||
padding-right: 4px;
|
||||
margin-right: 5px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* Border with more whitespace, spans one column. */
|
||||
div.colborder {
|
||||
padding-right: 24px;
|
||||
margin-right: 25px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
|
||||
/* Use these classes on an element to push it into the
|
||||
next column, or to pull it into the previous column. */
|
||||
|
||||
|
||||
.pull-1 { margin-left: -40px; }
|
||||
.pull-2 { margin-left: -80px; }
|
||||
.pull-3 { margin-left: -120px; }
|
||||
.pull-4 { margin-left: -160px; }
|
||||
.pull-5 { margin-left: -200px; }
|
||||
.pull-6 { margin-left: -240px; }
|
||||
.pull-7 { margin-left: -280px; }
|
||||
.pull-8 { margin-left: -320px; }
|
||||
.pull-9 { margin-left: -360px; }
|
||||
.pull-10 { margin-left: -400px; }
|
||||
.pull-11 { margin-left: -440px; }
|
||||
.pull-12 { margin-left: -480px; }
|
||||
.pull-13 { margin-left: -520px; }
|
||||
.pull-14 { margin-left: -560px; }
|
||||
.pull-15 { margin-left: -600px; }
|
||||
.pull-16 { margin-left: -640px; }
|
||||
.pull-17 { margin-left: -680px; }
|
||||
.pull-18 { margin-left: -720px; }
|
||||
.pull-19 { margin-left: -760px; }
|
||||
.pull-20 { margin-left: -800px; }
|
||||
.pull-21 { margin-left: -840px; }
|
||||
.pull-22 { margin-left: -880px; }
|
||||
.pull-23 { margin-left: -920px; }
|
||||
.pull-24 { margin-left: -960px; }
|
||||
|
||||
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float: left; position:relative;}
|
||||
|
||||
|
||||
.push-1 { margin: 0 -40px 1.5em 40px; }
|
||||
.push-2 { margin: 0 -80px 1.5em 80px; }
|
||||
.push-3 { margin: 0 -120px 1.5em 120px; }
|
||||
.push-4 { margin: 0 -160px 1.5em 160px; }
|
||||
.push-5 { margin: 0 -200px 1.5em 200px; }
|
||||
.push-6 { margin: 0 -240px 1.5em 240px; }
|
||||
.push-7 { margin: 0 -280px 1.5em 280px; }
|
||||
.push-8 { margin: 0 -320px 1.5em 320px; }
|
||||
.push-9 { margin: 0 -360px 1.5em 360px; }
|
||||
.push-10 { margin: 0 -400px 1.5em 400px; }
|
||||
.push-11 { margin: 0 -440px 1.5em 440px; }
|
||||
.push-12 { margin: 0 -480px 1.5em 480px; }
|
||||
.push-13 { margin: 0 -520px 1.5em 520px; }
|
||||
.push-14 { margin: 0 -560px 1.5em 560px; }
|
||||
.push-15 { margin: 0 -600px 1.5em 600px; }
|
||||
.push-16 { margin: 0 -640px 1.5em 640px; }
|
||||
.push-17 { margin: 0 -680px 1.5em 680px; }
|
||||
.push-18 { margin: 0 -720px 1.5em 720px; }
|
||||
.push-19 { margin: 0 -760px 1.5em 760px; }
|
||||
.push-20 { margin: 0 -800px 1.5em 800px; }
|
||||
.push-21 { margin: 0 -840px 1.5em 840px; }
|
||||
.push-22 { margin: 0 -880px 1.5em 880px; }
|
||||
.push-23 { margin: 0 -920px 1.5em 920px; }
|
||||
.push-24 { margin: 0 -960px 1.5em 960px; }
|
||||
|
||||
.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float: right; position:relative;}
|
||||
|
||||
|
||||
/* Misc classes and elements
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* In case you need to add a gutter above/below an element */
|
||||
.prepend-top {
|
||||
margin-top:1.5em;
|
||||
}
|
||||
.append-bottom {
|
||||
margin-bottom:1.5em;
|
||||
}
|
||||
|
||||
/* Use a .box to create a padded box inside a column. */
|
||||
.box {
|
||||
padding: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
background: #E5ECF9;
|
||||
}
|
||||
|
||||
/* Use this to create a horizontal ruler across a column. */
|
||||
hr {
|
||||
background: #ddd;
|
||||
color: #ddd;
|
||||
clear: both;
|
||||
float: none;
|
||||
width: 100%;
|
||||
height: .1em;
|
||||
margin: 0 0 1.45em;
|
||||
border: none;
|
||||
}
|
||||
|
||||
hr.space {
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* Clearing floats without extra markup
|
||||
Based on How To Clear Floats Without Structural Markup by PiE
|
||||
[http://www.positioniseverything.net/easyclearing.html] */
|
||||
|
||||
.clearfix:after, .container:after {
|
||||
content: "\0020";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
overflow:hidden;
|
||||
}
|
||||
.clearfix, .container {display: block;}
|
||||
|
||||
/* Regular clearing
|
||||
apply to column that should drop below previous ones. */
|
||||
|
||||
.clear { clear:both; }
|
||||
BIN
primefaces-showcase/src/main/webapp/styles/blueprint/src/grid.png
Executable file
|
After Width: | Height: | Size: 161 B |
76
primefaces-showcase/src/main/webapp/styles/blueprint/src/ie.css
Executable file
@@ -0,0 +1,76 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
ie.css
|
||||
|
||||
Contains every hack for Internet Explorer,
|
||||
so that our core files stay sweet and nimble.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Make sure the layout is centered in IE5 */
|
||||
body { text-align: center; }
|
||||
.container { text-align: left; }
|
||||
|
||||
/* Fixes IE margin bugs */
|
||||
* html .column, * html div.span-1, * html div.span-2,
|
||||
* html div.span-3, * html div.span-4, * html div.span-5,
|
||||
* html div.span-6, * html div.span-7, * html div.span-8,
|
||||
* html div.span-9, * html div.span-10, * html div.span-11,
|
||||
* html div.span-12, * html div.span-13, * html div.span-14,
|
||||
* html div.span-15, * html div.span-16, * html div.span-17,
|
||||
* html div.span-18, * html div.span-19, * html div.span-20,
|
||||
* html div.span-21, * html div.span-22, * html div.span-23,
|
||||
* html div.span-24 { display:inline; overflow-x: hidden; }
|
||||
|
||||
|
||||
/* Elements
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Fixes incorrect styling of legend in IE6. */
|
||||
* html legend { margin:0px -8px 16px 0; padding:0; }
|
||||
|
||||
/* Fixes wrong line-height on sup/sub in IE. */
|
||||
sup { vertical-align:text-top; }
|
||||
sub { vertical-align:text-bottom; }
|
||||
|
||||
/* Fixes IE7 missing wrapping of code elements. */
|
||||
html>body p code { *white-space: normal; }
|
||||
|
||||
/* IE 6&7 has problems with setting proper <hr> margins. */
|
||||
hr { margin:-8px auto 11px; }
|
||||
|
||||
/* Explicitly set interpolation, allowing dynamically resized images to not look horrible */
|
||||
img { -ms-interpolation-mode:bicubic; }
|
||||
|
||||
/* Clearing
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Makes clearfix actually work in IE */
|
||||
.clearfix, .container { display:inline-block; }
|
||||
* html .clearfix,
|
||||
* html .container { height:1%; }
|
||||
|
||||
|
||||
/* Forms
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Fixes padding on fieldset */
|
||||
fieldset { padding-top:0; }
|
||||
|
||||
/* Makes classic textareas in IE 6 resemble other browsers */
|
||||
textarea { overflow:auto; }
|
||||
|
||||
/* Fixes rule that IE 6 ignores */
|
||||
input.text, input.title, textarea { background-color:#fff; border:1px solid #bbb; }
|
||||
input.text:focus, input.title:focus { border-color:#666; }
|
||||
input.text, input.title, textarea, select { margin:0.5em 0; }
|
||||
input.checkbox, input.radio { position:relative; top:.25em; }
|
||||
|
||||
/* Fixes alignment of inline form elements */
|
||||
form.inline div, form.inline p { vertical-align:middle; }
|
||||
form.inline label { position:relative;top:-0.25em; }
|
||||
form.inline input.checkbox, form.inline input.radio,
|
||||
form.inline input.button, form.inline button {
|
||||
margin:0.5em 0;
|
||||
}
|
||||
button, input.button { position:relative;top:0.25em; }
|
||||
85
primefaces-showcase/src/main/webapp/styles/blueprint/src/print.css
Executable file
@@ -0,0 +1,85 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
print.css
|
||||
* Gives you some sensible styles for printing pages.
|
||||
* See Readme file in this directory for further instructions.
|
||||
|
||||
Some additions you'll want to make, customized to your markup:
|
||||
#header, #footer, #navigation { display:none; }
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
body {
|
||||
line-height: 1.5;
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
color:#000;
|
||||
background: none;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
|
||||
/* Layout
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
.container {
|
||||
background: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
background:#ccc;
|
||||
color:#ccc;
|
||||
width:100%;
|
||||
height:2px;
|
||||
margin:2em 0;
|
||||
padding:0;
|
||||
border:none;
|
||||
}
|
||||
hr.space {
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* Text
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; }
|
||||
code { font:.9em "Courier New", Monaco, Courier, monospace; }
|
||||
|
||||
a img { border:none; }
|
||||
p img.top { margin-top: 0; }
|
||||
|
||||
blockquote {
|
||||
margin:1.5em;
|
||||
padding:1em;
|
||||
font-style:italic;
|
||||
font-size:.9em;
|
||||
}
|
||||
|
||||
.small { font-size: .9em; }
|
||||
.large { font-size: 1.1em; }
|
||||
.quiet { color: #999; }
|
||||
.hide { display:none; }
|
||||
|
||||
|
||||
/* Links
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
a:link, a:visited {
|
||||
background: transparent;
|
||||
font-weight:700;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:link:after, a:visited:after {
|
||||
content: " (" attr(href) ")";
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* If you're having trouble printing relative links, uncomment and customize this:
|
||||
(note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */
|
||||
|
||||
/* a[href^="/"]:after {
|
||||
content: " (http://www.yourdomain.com" attr(href) ") ";
|
||||
} */
|
||||
38
primefaces-showcase/src/main/webapp/styles/blueprint/src/reset.css
Executable file
@@ -0,0 +1,38 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
reset.css
|
||||
* Resets default browser CSS.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
html, body, div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, code,
|
||||
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
font-family: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Tables still need 'cellspacing="0"' in the markup. */
|
||||
table { border-collapse: separate; border-spacing: 0; }
|
||||
caption, th, td { text-align: left; font-weight: normal; }
|
||||
table, td, th { vertical-align: middle; }
|
||||
|
||||
/* Remove possible quote marks (") from <q>, <blockquote>. */
|
||||
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
|
||||
blockquote, q { quotes: "" ""; }
|
||||
|
||||
/* Remove annoying border on linked images. */
|
||||
a img { border: none; }
|
||||
106
primefaces-showcase/src/main/webapp/styles/blueprint/src/typography.css
Executable file
@@ -0,0 +1,106 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
typography.css
|
||||
* Sets up some sensible default typography.
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Default font settings.
|
||||
The font-size percentage is of 16px. (0.75 * 16px = 12px) */
|
||||
html { font-size:100.01%; }
|
||||
body {
|
||||
font-size: 75%;
|
||||
color: #222;
|
||||
background: #fff;
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
/* Headings
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; }
|
||||
|
||||
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
|
||||
h2 { font-size: 2em; margin-bottom: 0.75em; }
|
||||
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
|
||||
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
|
||||
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
|
||||
h6 { font-size: 1em; font-weight: bold; }
|
||||
|
||||
h1 img, h2 img, h3 img,
|
||||
h4 img, h5 img, h6 img {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Text elements
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
p { margin: 0 0 1.5em; }
|
||||
p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
|
||||
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }
|
||||
|
||||
a:focus,
|
||||
a:hover { color: #000; }
|
||||
a { color: #009; text-decoration: underline; }
|
||||
|
||||
blockquote { margin: 1.5em; color: #666; font-style: italic; }
|
||||
strong { font-weight: bold; }
|
||||
em,dfn { font-style: italic; }
|
||||
dfn { font-weight: bold; }
|
||||
sup, sub { line-height: 0; }
|
||||
|
||||
abbr,
|
||||
acronym { border-bottom: 1px dotted #666; }
|
||||
address { margin: 0 0 1.5em; font-style: italic; }
|
||||
del { color:#666; }
|
||||
|
||||
pre { margin: 1.5em 0; white-space: pre; }
|
||||
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
|
||||
|
||||
|
||||
/* Lists
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
li ul,
|
||||
li ol { margin: 0; }
|
||||
ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; }
|
||||
|
||||
ul { list-style-type: disc; }
|
||||
ol { list-style-type: decimal; }
|
||||
|
||||
dl { margin: 0 0 1.5em 0; }
|
||||
dl dt { font-weight: bold; }
|
||||
dd { margin-left: 1.5em;}
|
||||
|
||||
|
||||
/* Tables
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
table { margin-bottom: 1.4em; width:100%; }
|
||||
th { font-weight: bold; }
|
||||
thead th { background: #c3d9ff; }
|
||||
th,td,caption { padding: 4px 10px 4px 5px; }
|
||||
tr.even td { background: #e5ecf9; }
|
||||
tfoot { font-style: italic; }
|
||||
caption { background: #eee; }
|
||||
|
||||
|
||||
/* Misc classes
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
.small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
|
||||
.large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
|
||||
.hide { display: none; }
|
||||
|
||||
.quiet { color: #666; }
|
||||
.loud { color: #000; }
|
||||
.highlight { background:#ff0; }
|
||||
.added { background:#060; color: #fff; }
|
||||
.removed { background:#900; color: #fff; }
|
||||
|
||||
.first { margin-left:0; padding-left:0; }
|
||||
.last { margin-right:0; padding-right:0; }
|
||||
.top { margin-top:0; padding-top:0; }
|
||||
.bottom { margin-bottom:0; padding-bottom:0; }
|
||||