portlet sample updates

This commit is contained in:
Keith Donald
2008-04-24 16:29:32 +00:00
parent 3d031069d3
commit fc06fa0cbb
26 changed files with 109 additions and 482 deletions

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beansProjectDescription>
<version>1</version>
<pluginVersion><![CDATA[2.0.4.v200802202100]]></pluginVersion>
<pluginVersion><![CDATA[2.0.5.v200803132004]]></pluginVersion>
<configSuffixes>
<configSuffix><![CDATA[xml]]></configSuffix>
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/webapp/WEB-INF/web-application-config.xml</config>
</configs>
<configSets>
</configSets>

View File

@@ -15,7 +15,7 @@
<init-param>
<name>contextConfigLocation</name>
<value>
/WEB-INF/web-application-config.xml
/WEB-INF/config/hotelbooking-portlet-config.xml
</value>
</init-param>

View File

@@ -1,98 +0,0 @@
<?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:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">
<!-- Activates annotation-based bean configuration -->
<context:annotation-config />
<!-- Scans for application @Components to deploy -->
<context:component-scan base-package="org.springframework.webflow.samples.booking" />
<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
<property name="portletModeMap">
<map>
<entry key="view">
<bean class="org.springframework.webflow.samples.booking.ViewFlowHandler" />
</entry>
</map>
</property>
</bean>
<!-- Handles requests mapped to the Spring Web Flow system -->
<bean id="flowHandlerAdapter" class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter">
<constructor-arg ref="flowExecutor" />
</bean>
<!-- Maps logical view names to Facelet templates (e.g. 'search' to '/WEB-INF/search.xhtml') -->
<bean id="jsfViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".xhtml" />
</bean>
<!-- Executes flows: the central entry point into the Spring Web Flow system -->
<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
<webflow:flow-execution-attributes>
<webflow:always-redirect-on-pause value="false"/>
</webflow:flow-execution-attributes>
<webflow:flow-execution-listeners>
<webflow:listener ref="jpaFlowExecutionListener" />
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- The registry of executable flow definitions -->
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices">
<webflow:flow-location path="/WEB-INF/flows/view/view.xml" />
<webflow:flow-location path="/WEB-INF/flows/main/main.xml" />
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" />
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" />
<!-- Installs a listener that manages JPA persistence contexts for flows that require them -->
<bean id="jpaFlowExecutionListener" class="org.springframework.webflow.persistence.JpaFlowExecutionListener">
<constructor-arg ref="entityManagerFactory" />
<constructor-arg ref="transactionManager" />
</bean>
<!-- Instructs Spring to perfrom declarative transaction managemenet on annotated classes -->
<tx:annotation-driven />
<!-- Drives transactions using local JPA APIs -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<!-- Creates a EntityManagerFactory for use with the Hibernate JPA provider and a simple in-memory data source populated with test data -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
</property>
</bean>
<!-- Deploys a in-memory "booking" datasource populated -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:mem:booking" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
</beans>

View File

@@ -7,7 +7,7 @@
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/web-application-config.xml
/WEB-INF/config/application-config.xml
</param-value>
</context-param>

View File

@@ -0,0 +1,44 @@
<?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:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- Activates annotation-based bean configuration -->
<context:annotation-config />
<!-- Scans for application @Components to deploy -->
<context:component-scan base-package="org.springframework.webflow.samples.booking" />
<!-- Instructs Spring to perfrom declarative transaction managemenet on annotated classes -->
<tx:annotation-driven />
<!-- Drives transactions using local JPA APIs -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<!-- Creates a EntityManagerFactory for use with the Hibernate JPA provider and a simple in-memory data source populated with test data -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
</property>
</bean>
<!-- Deploys a in-memory "booking" datasource populated -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:mem:booking" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
</beans>

View File

@@ -0,0 +1,62 @@
<?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:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">
<!-- Maps portlet modes to handlers -->
<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
<property name="portletModeMap">
<map>
<entry key="view">
<bean class="org.springframework.webflow.samples.booking.ViewFlowHandler" />
</entry>
</map>
</property>
</bean>
<!-- Maps logical view names selected by the url filename controller to .jsp view templates within the /WEB-INF directory -->
<bean id="internalJspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- Enables FlowHandlers -->
<bean class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor"/>
</bean>
<!-- Executes flows: the central entry point into the Spring Web Flow system -->
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-attributes>
<webflow:always-redirect-on-pause value="false"/>
</webflow:flow-execution-attributes>
<webflow:flow-execution-listeners>
<webflow:listener ref="jpaFlowExecutionListener" />
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- The registry of executable flow definitions -->
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices">
<webflow:flow-location path="/WEB-INF/flows/view/view.xml" />
<webflow:flow-location path="/WEB-INF/flows/main/main.xml" />
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" />
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" />
<!-- Installs a listener that manages JPA persistence contexts for flows that require them -->
<bean id="jpaFlowExecutionListener" class="org.springframework.webflow.persistence.JpaFlowExecutionListener">
<constructor-arg ref="entityManagerFactory" />
<constructor-arg ref="transactionManager" />
</bean>
</beans>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -1,187 +0,0 @@
a, a:visited, a:link, a:active {
color: #59924B;
background-color: transparent;
text-decoration: none;
font-weight: bold;
}
a:hover {
color: white;
background-color: #65a242;
text-decoration: none;
font-weight: bold;
}
body.spring {
background-color: #9cac7c;
}
#header.spring {
margin: 0 0 1em 0;
padding: 0px 0px;
background-color : #414f23;
}
#branding.spring {
float: none;
width: 100%;
margin: 10px 0 0 0;
padding: 0 0 0 0;
text-align: none;
}
#welcome {
padding: 10px 10px;
}
#welcome div.left {
float: left;
}
#welcome div.right {
float: right;
}
#content.spring form div,
#content.spring form p {
padding: 0px;
margin: 0 0 .5em 0;
}
#content.spring {
width: 740px;
background: #fff url(../images/bg.gif) 0 0 repeat;
margin-bottom: 0px;
}
#content .section {
width: 505px;
float: left;
margin-bottom: 5px;
}
#content.spring input[type="submit"], input[type="button"], button {
font-weight: bold;
color: #fff;
height: 20px;
background: #fff url(../images/btn.bg.gif) 0 0 repeat-x;
border-style: none;
vertical-align: middle;
}
#content.spring button
{
font-size: 1em;
font-family: arial,helvetica,verdana,sans-serif;
margin-top: 0pt;
margin-right: 0pt;
margin-bottom: 0pt;
margin-left: 0pt;
padding-top: 2px;
padding-right: 2px;
padding-bottom: 2px;
padding-left: 2px;
}
#content.spring button
{
vertical-align: middle;
}
.errors {
font-weight: bold;
text-align: left;
color: #600;
}
.errors ul {
list-style: none;
}
#content .field {
float:left;
}
#content .field .label {
float: left;
padding-top: 5px;
padding-right: 5px;
font-weight: bold;
width: 150px;
text-align: right;
}
#content .field .output {
float: left;
width: 250px;
padding-top: 5px;
text-align: left;
}
#content .field .input {
float: left;
width: 250px;
text-align: left;
}
#content .searchGroup {
width: 35%;
}
#content .buttonGroup {
clear: both;
text-align: right;
}
#content .buttonGroup input[type="submit"], .buttonGroup input[type="button"] {
margin-right: 5px;
}
#content .previous {
float: right;
}
#content .next {
float: right;
}
#content .next a {
margin-left: 20px;
}
#content .summary {
width: 100%;
border: 1px solid #414f23;
border-collapse: collapse;
}
#content .summary thead th {
border-left: 1px solid #414f23;
background: #fff url(../images/th.bg.gif) 0 100% repeat-x;
border-bottom: 1px solid #414f23;
padding: 6px;
text-align: left;
font-size: small;
}
#content .summary tbody td {
border-left: 1px solid #9cac7c;
padding: 4px;
border-bottom: 1px solid #9cac7c;
font-size: 8pt;
}
#local.spring{
width: 215px;
}
#footer.spring {
padding: 25px 0;
background-color : white;
border-top: 1px solid #C3BBB6;
}
#footer.spring img {
float: right;
padding-right: 20px;
}

View File

@@ -1,193 +0,0 @@
a, a:visited, a:link, a:active {
color: #59924B;
background-color: transparent;
text-decoration: none;
font-weight: bold;
}
a:hover {
color: white;
background-color: #65a242;
text-decoration: none;
font-weight: bold;
}
body.spring {
background-color: #9cac7c;
}
#header.spring {
margin: 0 0 1em 0;
padding: 0px 0px;
background-color : #414f23;
}
#branding.spring {
float: none;
width: 100%;
margin: 10px 0 0 0;
padding: 0 0 0 0;
text-align: none;
}
#welcome {
padding: 10px 10px;
}
#welcome div.left {
float: left;
}
#welcome div.right {
float: right;
}
#content.spring form div,
#content.spring form p {
padding: 0px;
margin: 0 0 .5em 0;
}
#content.spring {
width: 740px;
background: #fff url(../images/bg.gif) 0 0 repeat;
margin-bottom: 0px;
}
#content .section {
width: 505px;
float: left;
margin-bottom: 5px;
}
#content.spring input[type="submit"], input[type="button"], button {
font-weight: bold;
color: #fff;
height: 20px;
background: #fff url(../images/btn.bg.gif) 0 0 repeat-x;
border-style: none;
vertical-align: middle;
}
#content.spring button
{
font-size: 1em;
font-family: arial,helvetica,verdana,sans-serif;
margin-top: 0pt;
margin-right: 0pt;
margin-bottom: 0pt;
margin-left: 0pt;
padding-top: 2px;
padding-right: 2px;
padding-bottom: 2px;
padding-left: 2px;
}
#content.spring button
{
vertical-align: middle;
}
.errors {
font-weight: bold;
text-align: left;
color: #600;
}
.errors ul {
list-style: none;
}
#content .field {
float:left;
}
#content .field .label {
float: left;
padding-top: 5px;
padding-right: 5px;
font-weight: bold;
width: 150px;
text-align: right;
}
#content .field .output {
float: left;
width: 250px;
padding-top: 5px;
text-align: left;
}
#content .field .input {
float: left;
width: 250px;
text-align: left;
}
#content .searchGroup {
width: 35%;
text-align: right;
}
#content .buttonGroup {
clear: both;
text-align: right;
}
#content .buttonGroup input[type="submit"], .buttonGroup input[type="button"] {
margin-right: 5px;
}
#content .previous {
float: right;
}
#content .next {
float: right;
}
#content .next a {
margin-left: 20px;
}
#content .summary {
width: 100%;
border: 1px solid #414f23;
border-collapse: collapse;
}
#content .summary thead th {
border-left: 1px solid #414f23;
background: #fff url(../images/th.bg.gif) 0 100% repeat-x;
border-bottom: 1px solid #414f23;
padding: 6px;
text-align: left;
font-size: small;
}
#content .summary tbody td {
border-left: 1px solid #9cac7c;
padding: 4px;
border-bottom: 1px solid #9cac7c;
font-size: 8pt;
}
#local.spring{
width: 215px;
}
#footer.spring {
padding: 25px 0;
background-color : white;
border-top: 1px solid #C3BBB6;
}
#footer.spring img {
float: right;
padding-right: 20px;
}
div#header a {
color: inherit;
background-color: inherit;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB