initial mvc message display
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
|
||||
<wb-resource deploy-path="/WEB-INF/lib" source-path="/target/war-expanded/WEB-INF/lib"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
|
||||
<property name="java-output-path" value="target/classes"/>
|
||||
<property name="context-root" value="/swf-booking-faces"/>
|
||||
</wb-module>
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="swf-booking-mvc">
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
|
||||
<wb-resource deploy-path="/WEB-INF/lib" source-path="/lib/global"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/lib" source-path="/target/war-expanded/WEB-INF/lib"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
|
||||
<property name="java-output-path" value="target/classes"/>
|
||||
<property name="context-root" value="/swf-booking-mvc"/>
|
||||
</wb-module>
|
||||
|
||||
@@ -63,7 +63,11 @@ public class Booking implements Serializable {
|
||||
|
||||
@Transient
|
||||
public int getNights() {
|
||||
return (int) (checkoutDate.getTime() - checkinDate.getTime()) / 1000 / 60 / 60 / 24;
|
||||
if (checkinDate == null || checkoutDate == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return (int) (checkoutDate.getTime() - checkinDate.getTime()) / 1000 / 60 / 60 / 24;
|
||||
}
|
||||
}
|
||||
|
||||
@Id
|
||||
|
||||
Reference in New Issue
Block a user