You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by gv...@apache.org on 2007/01/14 22:01:09 UTC

svn commit: r496148 [2/2] - in /shale/sandbox/maven: ./ archetypes/ archetypes/shale-clay-starter-archetype/ archetypes/shale-clay-starter-archetype/src/ archetypes/shale-clay-starter-archetype/src/main/ archetypes/shale-clay-starter-archetype/src/main...

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/validator-rules.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/validator-rules.xml?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/validator-rules.xml (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/validator-rules.xml Sun Jan 14 13:01:07 2007
@@ -0,0 +1,896 @@
+<!DOCTYPE form-validation PUBLIC
+          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
+          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
+<form-validation>
+
+   <global>
+
+      <validator name="required"
+            classname="org.apache.shale.validator.CommonsValidator"
+               method="isSupplied"
+         methodParams="java.lang.String"
+                  msg="errors.required">
+
+         <javascript><![CDATA[
+            function validateRequired(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oRequired = new required();
+                for (x in oRequired) {
+                   var field = form[oRequired[x][0]];
+                   
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'file' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio' ||
+                        field.type == 'password') {
+                        
+                        var value = '';
+                  // get field's value
+                  if (field.type == "select-one") {
+                     var si = field.selectedIndex;
+                     if (si >= 0) {
+                        value = field.options[si].value;
+                     }
+                  } else {
+                     value = field.value;
+                  }
+                        
+                        if (trim(value).length == 0) {
+                        
+                           if (i == 0) {
+                               focusField = field;
+                           }
+                           fields[i++] = oRequired[x][1];
+                           isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }
+            
+            // Trim whitespace from left and right sides of s.
+            function trim(s) {
+                return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
+            }
+            
+            ]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="minlength"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="minLength"
+         methodParams="java.lang.String,int"
+              depends=""
+                  msg="errors.minlength">
+
+         <javascript><![CDATA[
+            function validateMinLength(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oMinLength = new minlength();
+                for (x in oMinLength) {
+                    var field = form[oMinLength[x][0]];
+                    
+                    if (field.type == 'text' ||
+                        field.type == 'textarea') {
+                        
+                        var iMin = parseInt(oMinLength[x][2]("minlength"));
+                        if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oMinLength[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="maxlength"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="maxLength"
+         methodParams="java.lang.String,int"
+              depends=""
+                  msg="errors.maxlength">
+
+         <javascript><![CDATA[
+            function validateMaxLength(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oMaxLength = new maxlength();
+                for (x in oMaxLength) {
+                    var field = form[oMaxLength[x][0]];
+                    
+                    if (field.type == 'text' ||
+                        field.type == 'textarea') {
+                        
+                        var iMax = parseInt(oMaxLength[x][2]("maxlength"));
+                        if (field.value.length > iMax) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oMaxLength[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="mask"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="matchRegexp"
+         methodParams="java.lang.String,java.lang.String"
+              depends=""
+                  msg="errors.invalid">
+
+         <javascript><![CDATA[
+            function validateMask(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oMasked = new mask();
+                for (x in oMasked) {
+                    var field = form[oMasked[x][0]];
+                    
+                    if ((field.type == 'text' || 
+                         field.type == 'textarea') && 
+                         (field.value.length > 0)) {
+                        
+                        if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oMasked[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }
+
+            function matchPattern(value, mask) {
+               return mask.exec(value);
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="byte"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isByte"
+         methodParams="java.lang.String"
+              depends=""
+                  msg="errors.byte"
+       jsFunctionName="ByteValidations">
+
+         <javascript><![CDATA[
+            function validateByte(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oByte = new ByteValidations();
+                for (x in oByte) {
+                   var field = form[oByte[x][0]];
+                   
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                  field.type == 'radio') {
+
+                  var value = '';
+                  // get field's value
+                  if (field.type == "select-one") {
+                     var si = field.selectedIndex;
+                     if (si >= 0) {
+                        value = field.options[si].value;
+                     }
+                  } else {
+                     value = field.value;
+                  }
+                        
+                        if (value.length > 0) {
+                            if (!isAllDigits(value)) {
+                                bValid = false;
+                                if (i == 0) {
+                                    focusField = field;
+                                }
+                                fields[i++] = oByte[x][1];
+
+                            } else {
+
+                               var iValue = parseInt(value);
+                               if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
+                                   if (i == 0) {
+                                       focusField = field;
+                                   }
+                                   fields[i++] = oByte[x][1];
+                                   bValid = false;
+                               }
+                            }
+                  }
+                  
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="short"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isShort"
+         methodParams="java.lang.String"
+              depends=""
+                  msg="errors.short"
+       jsFunctionName="ShortValidations">
+
+         <javascript><![CDATA[
+            function validateShort(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oShort = new ShortValidations();
+                for (x in oShort) {
+                   var field = form[oShort[x][0]];
+                   
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio') {
+                        
+                        var value = '';
+                  // get field's value
+                  if (field.type == "select-one") {
+                     var si = field.selectedIndex;
+                     if (si >= 0) {
+                        value = field.options[si].value;
+                     }
+                  } else {
+                     value = field.value;
+                  }
+                        
+                        if (value.length > 0) {
+                            if (!isAllDigits(value)) {
+                                bValid = false;
+                                if (i == 0) {
+                                    focusField = field;
+                                }
+                                fields[i++] = oShort[x][1];
+
+                            } else {
+                        
+                               var iValue = parseInt(value);
+                               if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
+                                   if (i == 0) {
+                                       focusField = field;
+                                   }
+                                   fields[i++] = oShort[x][1];
+                                   bValid = false;
+                               }
+                          }
+                       }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="integer"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isInt"
+         methodParams="java.lang.String"
+              depends=""
+                  msg="errors.integer"
+       jsFunctionName="IntegerValidations">
+
+         <javascript><![CDATA[
+            function validateInteger(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oInteger = new IntegerValidations();
+                for (x in oInteger) {
+                   var field = form[oInteger[x][0]];
+
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio') {
+                        
+                        var value = '';
+                  // get field's value
+                  if (field.type == "select-one") {
+                     var si = field.selectedIndex;
+                      if (si >= 0) {
+                         value = field.options[si].value;
+                      }
+                  } else {
+                     value = field.value;
+                  }
+                        
+                        if (value.length > 0) {
+                        
+                            if (!isAllDigits(value)) {
+                                bValid = false;
+                                if (i == 0) {
+                                   focusField = field;
+                               }
+                          fields[i++] = oInteger[x][1];
+                          
+                            } else {
+                               var iValue = parseInt(value);
+                               if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
+                                   if (i == 0) {
+                                       focusField = field;
+                                   }
+                                   fields[i++] = oInteger[x][1];
+                                   bValid = false;
+                              }
+                           }
+                       }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }
+
+            function isAllDigits(argvalue) {
+                argvalue = argvalue.toString();
+                var validChars = "0123456789";
+                var startFrom = 0;
+                if (argvalue.substring(0, 2) == "0x") {
+                   validChars = "0123456789abcdefABCDEF";
+                   startFrom = 2;
+                } else if (argvalue.charAt(0) == "0") {
+                   validChars = "01234567";
+                   startFrom = 1;
+                } else if (argvalue.charAt(0) == "-") {
+                    startFrom = 1;
+                }
+                
+                for (var n = startFrom; n < argvalue.length; n++) {
+                    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
+                }
+                return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="float"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isDouble"
+         methodParams="double"
+              depends=""
+                  msg="errors.float"
+       jsFunctionName="FloatValidations">
+
+         <javascript><![CDATA[
+            function validateFloat(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oFloat = new FloatValidations();
+                for (x in oFloat) {
+                   var field = form[oFloat[x][0]];
+                   
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio') {
+                        
+                       var value = '';
+                  // get field's value
+                  if (field.type == "select-one") {
+                     var si = field.selectedIndex;
+                     if (si >= 0) {
+                         value = field.options[si].value;
+                     }
+                  } else {
+                     value = field.value;
+                  }
+                        
+                        if (value.length > 0) {
+                            // remove '.' before checking digits
+                            var tempArray = value.split('.');
+                            var joinedString= tempArray.join('');
+
+                            if (!isAllDigits(joinedString)) {
+                                bValid = false;
+                                if (i == 0) {
+                                    focusField = field;
+                                }
+                                fields[i++] = oFloat[x][1];
+
+                            } else {
+                               var iValue = parseFloat(value);
+                               if (isNaN(iValue)) {
+                                   if (i == 0) {
+                                       focusField = field;
+                                   }
+                                   fields[i++] = oFloat[x][1];
+                                   bValid = false;
+                               }
+                            }
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="date"
+            classname="org.apache.shale.validator.CommonsValidator"
+               method="isDate"
+         methodParams="java.lang.String,java.lang.String"
+              depends=""
+                  msg="errors.date"
+       jsFunctionName="DateValidations">
+
+         <javascript><![CDATA[
+            function validateDate(form) {
+               var bValid = true;
+               var focusField = null;
+               var i = 0;
+               var fields = new Array();
+               oDate = new DateValidations();
+               for (x in oDate) {
+                   var value = form[oDate[x][0]].value;
+                   var datePattern = oDate[x][2]("datePatternStrict");
+                   if ((form[oDate[x][0]].type == 'text' ||
+                        form[oDate[x][0]].type == 'textarea') &&
+                       (value.length > 0) &&
+                       (datePattern.length > 0)) {
+                     var MONTH = "MM";
+                     var DAY = "dd";
+                     var YEAR = "yyyy";
+                     var orderMonth = datePattern.indexOf(MONTH);
+                     var orderDay = datePattern.indexOf(DAY);
+                     var orderYear = datePattern.indexOf(YEAR);
+                     if ((orderDay < orderYear && orderDay > orderMonth)) {
+                         var iDelim1 = orderMonth + MONTH.length;
+                         var iDelim2 = orderDay + DAY.length;
+                         var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
+                         var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
+                         if (iDelim1 == orderDay && iDelim2 == orderYear) {
+                            dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
+                         } else if (iDelim1 == orderDay) {
+                            dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
+                         } else if (iDelim2 == orderYear) {
+                            dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
+                         } else {
+                            dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
+                         }
+                         var matched = dateRegexp.exec(value);
+                         if(matched != null) {
+                            if (!isValidDate(matched[2], matched[1], matched[3])) {
+                               if (i == 0) {
+                                   focusField = form[oDate[x][0]];
+                               }
+                               fields[i++] = oDate[x][1];
+                               bValid =  false;
+                            }
+                         } else {
+                            if (i == 0) {
+                                focusField = form[oDate[x][0]];
+                            }
+                            fields[i++] = oDate[x][1];
+                            bValid =  false;
+                         }
+                     } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
+                         var iDelim1 = orderDay + DAY.length;
+                         var iDelim2 = orderMonth + MONTH.length;
+                         var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
+                         var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
+                         if (iDelim1 == orderMonth && iDelim2 == orderYear) {
+                             dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
+                         } else if (iDelim1 == orderMonth) {
+                             dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
+                         } else if (iDelim2 == orderYear) {
+                             dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
+                         } else {
+                             dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
+                         }
+                         var matched = dateRegexp.exec(value);
+                         if(matched != null) {
+                             if (!isValidDate(matched[1], matched[2], matched[3])) {
+                                 if (i == 0) {
+                                     focusField = form[oDate[x][0]];
+                                 }
+                                 fields[i++] = oDate[x][1];
+                                 bValid =  false;
+                              }
+                         } else {
+                             if (i == 0) {
+                                 focusField = form[oDate[x][0]];
+                             }
+                             fields[i++] = oDate[x][1];
+                             bValid =  false;
+                         }
+                     } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
+                         var iDelim1 = orderYear + YEAR.length;
+                         var iDelim2 = orderMonth + MONTH.length;
+                         var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
+                         var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
+                         if (iDelim1 == orderMonth && iDelim2 == orderDay) {
+                             dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
+                         } else if (iDelim1 == orderMonth) {
+                             dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
+                         } else if (iDelim2 == orderDay) {
+                             dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
+                         } else {
+                             dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
+                         }
+                         var matched = dateRegexp.exec(value);
+                         if(matched != null) {
+                             if (!isValidDate(matched[3], matched[2], matched[1])) {
+                                 if (i == 0) {
+                                     focusField = form[oDate[x][0]];
+                                  }
+                                  fields[i++] = oDate[x][1];
+                                  bValid =  false;
+                              }
+                          } else {
+                              if (i == 0) {
+                                  focusField = form[oDate[x][0]];
+                              }
+                              fields[i++] = oDate[x][1];
+                              bValid =  false;
+                          }
+                     } else {
+                         if (i == 0) {
+                             focusField = form[oDate[x][0]];
+                         }
+                         fields[i++] = oDate[x][1];
+                         bValid =  false;
+                     }
+                  }
+               }
+               if (fields.length > 0) {
+                  focusField.focus();
+                  alert(fields.join('\n'));
+               }
+               return bValid;
+            }
+
+       function isValidDate(day, month, year) {
+           if (month < 1 || month > 12) {
+                    return false;
+                }
+                if (day < 1 || day > 31) {
+                    return false;
+                }
+                if ((month == 4 || month == 6 || month == 9 || month == 11) &&
+                    (day == 31)) {
+                    return false;
+                }
+                if (month == 2) {
+                    var leap = (year % 4 == 0 &&
+                               (year % 100 != 0 || year % 400 == 0));
+                    if (day>29 || (day == 29 && !leap)) {
+                        return false;
+                    }
+                }
+                return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="intRange"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isInRange"
+         methodParams="int,int,int"
+              depends="integer"
+                  msg="errors.range">
+
+         <javascript><![CDATA[
+            function validateIntRange(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oRange = new intRange();
+                for (x in oRange) {
+                    var field = form[oRange[x][0]];
+                    
+                    if ((field.type == 'text' ||
+                         field.type == 'textarea') &&
+                        (field.value.length > 0)) {
+                        
+                        var iMin = parseInt(oRange[x][2]("min"));
+                        var iMax = parseInt(oRange[x][2]("max"));
+                        var iValue = parseInt(field.value);
+                        if (!(iValue >= iMin && iValue <= iMax)) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oRange[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="floatRange"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isInRange"
+         methodParams="double,double,double"
+              depends="float"
+                  msg="errors.range">
+
+         <javascript><![CDATA[
+            function validateFloatRange(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oRange = new floatRange();
+                for (x in oRange) {
+                    var field = form[oRange[x][0]];
+                    
+                    if ((field.type == 'text' ||
+                         field.type == 'textarea') &&
+                        (field.value.length > 0)) {
+                        
+                        var fMin = parseFloat(oRange[x][2]("min"));
+                        var fMax = parseFloat(oRange[x][2]("max"));
+                        var fValue = parseFloat(field.value);
+                        if (!(fValue >= fMin && fValue <= fMax)) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oRange[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="creditCard"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isCreditCard"
+         methodParams="java.lang.String"
+              depends=""
+                  msg="errors.creditcard">
+
+         <javascript><![CDATA[
+            function validateCreditCard(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oCreditCard = new creditCard();
+                for (x in oCreditCard) {
+                    if ((form[oCreditCard[x][0]].type == 'text' ||
+                         form[oCreditCard[x][0]].type == 'textarea') &&
+                        (form[oCreditCard[x][0]].value.length > 0)) {
+                        if (!luhnCheck(form[oCreditCard[x][0]].value)) {
+                            if (i == 0) {
+                                focusField = form[oCreditCard[x][0]];
+                            }
+                            fields[i++] = oCreditCard[x][1];
+                            bValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return bValid;
+            }
+
+            /**
+             * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
+             */
+            function luhnCheck(cardNumber) {
+                if (isLuhnNum(cardNumber)) {
+                    var no_digit = cardNumber.length;
+                    var oddoeven = no_digit & 1;
+                    var sum = 0;
+                    for (var count = 0; count < no_digit; count++) {
+                        var digit = parseInt(cardNumber.charAt(count));
+                        if (!((count & 1) ^ oddoeven)) {
+                            digit *= 2;
+                            if (digit > 9) digit -= 9;
+                        };
+                        sum += digit;
+                    };
+                    if (sum == 0) return false;
+                    if (sum % 10 == 0) return true;
+                };
+                return false;
+            }
+
+            function isLuhnNum(argvalue) {
+                argvalue = argvalue.toString();
+                if (argvalue.length == 0) {
+                    return false;
+                }
+                for (var n = 0; n < argvalue.length; n++) {
+                    if ((argvalue.substring(n, n+1) < "0") ||
+                        (argvalue.substring(n,n+1) > "9")) {
+                        return false;
+                    }
+                }
+                return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="email"
+            classname="org.apache.commons.validator.GenericValidator"
+               method="isEmail"
+         methodParams="java.lang.String"
+              depends=""
+                  msg="errors.email">
+
+         <javascript><![CDATA[
+            function validateEmail(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oEmail = new email();
+                for (x in oEmail) {
+                    if ((form[oEmail[x][0]].type == 'text' ||
+                         form[oEmail[x][0]].type == 'textarea') &&
+                        (form[oEmail[x][0]].value.length > 0)) {
+                        if (!checkEmail(form[oEmail[x][0]].value)) {
+                            if (i == 0) {
+                                focusField = form[oEmail[x][0]];
+                            }
+                            fields[i++] = oEmail[x][1];
+                            bValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return bValid;
+            }
+
+            /**
+             * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
+             * http://javascript.internet.com
+             */
+            function checkEmail(emailStr) {
+               if (emailStr.length == 0) {
+                   return true;
+               }
+               var emailPat=/^(.+)@(.+)$/;
+               var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
+               var validChars="\[^\\s" + specialChars + "\]";
+               var quotedUser="(\"[^\"]*\")";
+               var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
+               var atom=validChars + '+';
+               var word="(" + atom + "|" + quotedUser + ")";
+               var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
+               var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
+               var matchArray=emailStr.match(emailPat);
+               if (matchArray == null) {
+                   return false;
+               }
+               var user=matchArray[1];
+               var domain=matchArray[2];
+               if (user.match(userPat) == null) {
+                   return false;
+               }
+               var IPArray = domain.match(ipDomainPat);
+               if (IPArray != null) {
+                   for (var i = 1; i <= 4; i++) {
+                      if (IPArray[i] > 255) {
+                         return false;
+                      }
+                   }
+                   return true;
+               }
+               var domainArray=domain.match(domainPat);
+               if (domainArray == null) {
+                   return false;
+               }
+               var atomPat=new RegExp(atom,"g");
+               var domArr=domain.match(atomPat);
+               var len=domArr.length;
+               if ((domArr[domArr.length-1].length < 2) ||
+                   (domArr[domArr.length-1].length > 3)) {
+                   return false;
+               }
+               if (len < 2) {
+                   return false;
+               }
+               return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+   </global>
+
+</form-validation>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/validator-rules.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml Sun Jan 14 13:01:07 2007
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee                      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+	<display-name>Clay template application</display-name>
+
+	<!-- Select JSF State Saving Mode -->
+	<context-param>
+		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+		<param-value>client</param-value>
+	</context-param>
+
+	<!-- Commons Chain Configuration Resources -->
+	<context-param>
+		<param-name>
+			org.apache.commons.chain.CONFIG_WEB_RESOURCE
+		</param-name>
+		<param-value>/WEB-INF/chain-config.xml</param-value>
+	</context-param>
+
+	<!-- Clay Configuration Resources -->
+	<context-param>
+		<param-name>
+			org.apache.shale.clay.COMMON_CONFIG_FILES
+		</param-name>
+		<param-value>/WEB-INF/clay-config.xml</param-value>
+	</context-param>
+
+	<!-- Clay Configuration Full XML view Resources -->
+	<context-param>
+		<param-name>
+			org.apache.shale.clay.FULLXML_CONFIG_FILES
+		</param-name>
+		<param-value>/WEB-INF/clay-views-config.xml</param-value>
+	</context-param>
+	
+	<context-param>
+		<description>
+			Whether or not to create pretty HTML code
+		</description>
+		<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
+		<param-value>true</param-value>
+	</context-param>
+	
+	<context-param>
+		<description>Whether or not to allow javascript</description>
+		<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
+		<param-value>true</param-value>
+	</context-param>
+	
+	<context-param>
+		<description></description>
+		<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
+		<param-value>false</param-value>
+	</context-param>
+	
+	<context-param>
+		<description></description>
+		<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
+		<param-value>false</param-value>
+	</context-param>
+	
+	<context-param>
+		<description></description>
+		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+		<param-value>.xml</param-value>
+	</context-param>
+
+	<context-param>
+		<description>
+			A very common problem in configuring
+			MyFaces-web-applications is that the Extensions-Filter is
+			not configured at all or improperly configured. This
+			parameter will check for a properly configured
+			Extensions-Filter if it is needed by the web-app. In most
+			cases this check will work just fine, there might be cases
+			where an internal forward will bypass the Extensions-Filter
+			and the check will not work. If this is the case, you can
+			disable the check by setting this parameter to false.
+		</description>
+		<param-name>
+			org.apache.myfaces.CHECK_EXTENSIONS_FILTER
+		</param-name>
+		<param-value>true</param-value>
+	</context-param>
+
+	<context-param>
+		<description>
+			Change the url-pattern from the ExtensionsFilter Default is
+			"/faces/myFacesExtensionResource" Note: The filter-mapping
+			for ExtensionsFilter, the url-pattern is this value + "/*",
+			else there comes a exception
+		</description>
+		<param-name>
+			org.apache.myfaces.RESOURCE_VIRTUAL_PATH
+		</param-name>
+		<param-value>/faces/extensionResource</param-value>
+	</context-param>
+
+	<!-- Shale Application Controller Filter -->
+	<filter>
+		<filter-name>shale</filter-name>
+		<filter-class>
+			org.apache.shale.application.faces.ShaleApplicationFilter
+		</filter-class>
+	</filter>
+
+	<!-- Shale Application Controller Filter Mapping -->
+	<filter-mapping>
+		<filter-name>shale</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<!-- Commons Chain Configuration Listener -->
+	<listener>
+		<listener-class>
+			org.apache.commons.chain.web.ChainListener
+		</listener-class>
+	</listener>
+
+	<!-- JavaServer Faces Servlet Configuration -->
+	<servlet>
+		<servlet-name>faces</servlet-name>
+		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<!-- JavaServer Faces Servlet Mapping -->
+	<servlet-mapping>
+		<servlet-name>faces</servlet-name>
+		<url-pattern>*.faces</url-pattern>
+	</servlet-mapping>
+
+	<!-- JavaServer Faces Servlet Mapping for Clay HTML Full View -->
+	<servlet-mapping>
+		<servlet-name>faces</servlet-name>
+		<url-pattern>*.html</url-pattern>
+	</servlet-mapping>
+
+	<!-- JavaServer Faces Servlet Mapping for Clay XML Full View -->
+	<servlet-mapping>
+		<servlet-name>faces</servlet-name>
+		<url-pattern>*.xml</url-pattern>
+	</servlet-mapping>
+
+	<!-- Make sure that the xml extetion is treated the right way -->
+	<mime-mapping>
+		<extension>xml</extension>
+		<mime-type>text/html</mime-type>
+	</mime-mapping>
+
+	<!-- Welcome File List -->
+	<welcome-file-list>
+		<welcome-file>index.jsp</welcome-file>
+	</welcome-file-list>
+
+</web-app>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/corner.jpg
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/corner.jpg?view=auto&rev=496148
==============================================================================
Binary file - no diff available.

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/corner.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/hlayer.png
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/hlayer.png?view=auto&rev=496148
==============================================================================
Binary file - no diff available.

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/hlayer.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/menybg.png
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/menybg.png?view=auto&rev=496148
==============================================================================
Binary file - no diff available.

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/menybg.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/tools.png
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/tools.png?view=auto&rev=496148
==============================================================================
Binary file - no diff available.

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/tools.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/vlayer.png
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/vlayer.png?view=auto&rev=496148
==============================================================================
Binary file - no diff available.

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/images/vlayer.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp Sun Jan 14 13:01:07 2007
@@ -0,0 +1,4 @@
+<%
+        String redirectURL = "./page1.xml";
+        response.sendRedirect(redirectURL);
+%>
\ No newline at end of file

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    native = 

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultBody.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultBody.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultBody.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultBody.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1,2 @@
+<h3>Standard frontpage</h3>
+<p>This is standard frontpage content</p>
\ No newline at end of file

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultBody.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultFooter.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultFooter.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultFooter.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultFooter.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1 @@
+<p><span jsfid="outputText" value="#{messages['application.footer']}" allowBody="false">Clay template application footer</span></p>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultFooter.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultHeader.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultHeader.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultHeader.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultHeader.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1 @@
+<h1><span jsfid="outputText" value="#{messages['application.title']}" allowBody="false">Clay template header</span></h1>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultHeader.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultLeftNav.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultLeftNav.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultLeftNav.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultLeftNav.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1,12 @@
+<div id="menu">
+<div id="button" class="button"><span jsfid="form">
+<p class="menu"><span jsfid="outputText" value="#{messages['menu']}" allowBody="false">Menu</span></p>
+<ul>
+	<li><a jsfid="commandLink" action="home" allowBody="true" immediate="true"><span jsfid="outputText" value="#{messages['menu.item1']}" allowBody="false">Home</span></a></li>
+	<li><a jsfid="commandLink" action="page2" allowBody="true" immediate="true"><span jsfid="outputText" value="#{messages['menu.item2']}" allowBody="false">Page 2</span></a></li>
+	<li><a jsfid="commandLink" action="page3" allowBody="true" immediate="true"><span jsfid="outputText" value="#{messages['menu.item3']}" allowBody="false">Page 3</span></a></li>
+</ul>
+</span>
+</div>
+
+</div>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/defaultLeftNav.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page1Body.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page1Body.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page1Body.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page1Body.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1,2 @@
+<h3><span jsfid="outputText" value="#{messages['content.title.page1']}" allowBody="false">Clay template application - Page 1</span></h3>
+<p><span jsfid="outputText" value="#{messages['content.message.page1']}" allowBody="false">This is Page 1 content</span></p>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page1Body.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page2Body.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page2Body.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page2Body.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page2Body.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1,20 @@
+<h3><span jsfid="outputText"
+	value="#{messages['content.title.page2']}" allowBody="false">Clay
+template application - Page 2</span></h3>
+<p><span jsfid="outputText"
+	value="#{messages['content.message.page2']}" allowBody="false">This
+is Page 2 content</span></p>
+<span jsfid="form">
+<table>
+	<tbody>
+		<tr>
+			<th><span jsfid="outputText"
+	value="#{messages['name.label']}" allowBody="false">Please enter your name</span></th>
+			<td><input id="name" type="text" size="40" maxlength="50" value="#{@managed-bean-name.person.name}"/></td>
+		</tr>
+		<tr>
+			<td colspan="2"><input type="submit" action="#{@managed-bean-name.sayHello}" value="#{messages['page2.button.label']}"></td>
+		</tr>
+		</tbody>
+</table>
+</span>
\ No newline at end of file

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page2Body.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page3Body.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page3Body.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page3Body.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page3Body.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1,9 @@
+<h3><span jsfid="outputText"
+	value="#{messages['content.title.page3']}" allowBody="false">Clay
+template application - Page 3</span></h3>
+<p><span jsfid="outputText"
+	value="#{messages['content.message.page3']}" allowBody="false">This
+is Page 3 content</span></p>
+<p><span jsfid="outputText" value="#{messages['hello']}"
+	allowBody="false">Hello</span> <span jsfid="outputText" value="#{person.name}"
+	allowBody="false">World</span></p>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/pages/page3Body.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/templates/standard.html
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/templates/standard.html?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/templates/standard.html (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/templates/standard.html Sun Jan 14 13:01:07 2007
@@ -0,0 +1,29 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title><span jsfid="outputText" value="@title"></span></title>
+<!-- ### clay:remove ### -->
+<link href="../theme/styles.css" rel="stylesheet" type="text/css" />
+<!-- ### /clay:remove ### -->
+<link href="theme/styles.css" rel="stylesheet" type="text/css" />
+<style type="text/css">
+   /*<![CDATA[*/ 
+html {overflow-x:auto; overflow-y:hidden;}
+   /*]]>*/
+   </style>
+</head>
+<body>
+<div id="head"><span jsfid="clay" clayjsfid="@headerContent"
+	allowbody="false">Header Content</span></div>
+<div id='logo'>&nbsp;</div>
+<div id="left">&nbsp;</div>
+<div id="menu"><span jsfid="clay" clayjsfid="@leftContent"
+	allowbody="false">Left Content</span></div>
+<div id="pad1">&nbsp;</div>
+<div id='content'><span jsfid="clay" clayjsfid="@bodyContent"
+	allowbody="false">Body Content</span></div>
+<div id="pad1">&nbsp;</div>
+<div id="footer"><span jsfid="clay" clayjsfid="@footerContent"
+	allowbody="false">Footer Content</span></div>
+</body>
+</html>

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/templates/standard.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/theme/styles.css
URL: http://svn.apache.org/viewvc/shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/theme/styles.css?view=auto&rev=496148
==============================================================================
--- shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/theme/styles.css (added)
+++ shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/theme/styles.css Sun Jan 14 13:01:07 2007
@@ -0,0 +1,541 @@
+@CHARSET "ISO-8859-1";
+
+html {
+	height: 90%;
+	max-height: 100%;
+	padding: 0;
+	margin: 0;
+	border: 0;
+	padding-bottom: 20px;
+	border: 0;
+	font-size: 75%;
+	font-family: trebuchet ms, tahoma, verdana, arial, sans-serif;
+	background: white;
+	color: navy;
+}
+
+body {
+	height: 100%;
+	min-width: 650px;
+	padding: 0;
+	margin: 0;
+	border: none;
+	/* hide overflow:hidden from IE5/Mac */ /* \*/
+	overflow-y: auto;
+	overflow-x: hidden;
+	color: navy;
+}
+
+form TD, TH{
+	color: maroon;
+}
+
+.menu{
+ color: white;
+ font-size: 11pt;
+ font-weight: bolder;
+}
+
+span.firstLetter {
+      color:rgb(236,158,0); 
+      font-weight:bold;
+      font-size: 1.5em;
+  }
+
+/*for Opera*/
+html>body {
+	overflow-y: auto;
+	overflow-x: hidden;
+}
+
+#head {
+	position: fixed;
+	display: block;
+	padding: 0;
+	top: 0;
+	left: 1%;
+	width: 98%;
+	/*right: 1%;*/
+	width: 96%;
+	height: 98px;
+	background: url("../images/hlayer.png") repeat-x;
+	z-index: 1;
+	/*border: 1px solid black;*/
+}
+
+#head H1 {
+	vertical-align : top;
+	font-size: 4em;
+	text-align: center;
+	color: white;
+}
+
+div#head H1 {
+	vertical-align : top;
+	font-size: 4em;
+	text-align: center;
+	color: white;
+}
+
+#logo {
+	position: fixed;
+	display: block;
+	margin-top: 0;
+	margin-left: 1%;
+	top: 0;
+	left: 0;
+	padding: 0px;
+	height: 99px;
+	width: 99px;
+	background: url("../images/tools.png") no-repeat top left;
+	z-index: 5;
+}
+
+#footer {
+	bottom: 0;
+	padding: 0;
+	position: fixed;
+	text-align: center;
+	margin: 0px 2% 20px 1%;
+	left: 1%;
+	right: 2%;
+	display: block;
+	width: 97%;
+	height: 20px;
+	font-size: 1em;
+	z-index: 4;
+}
+
+#left {
+	position: fixed;
+	left: 1%;
+	top: 95px;
+	height: 90%;
+	width: 100px;
+	background: url("../images/vlayer.png") repeat-y 0px 0px transparent;
+	font-size: 1em;
+	color: navy;
+	z-index: 1;
+	/*border: 1px solid black;*/
+}
+
+#menu {
+	clear: both;
+	position: fixed;
+	left: 3px;
+	top: 150px;
+	width: 100px;
+	display: block;
+	z-index: 4;
+	/*border: 1px solid black;*/
+}
+
+.box {
+	position: relative;
+	border: none;
+}
+
+#menu a,#menu a:visited {
+	text-decoration: none;
+	background-color: transparent;
+	color: maroon;
+	display: block;
+	width: 88px;
+	height: 16px;
+	font-size: 14px;
+	border: none;
+	padding: 5px;
+}
+
+* html #menu a,* html #menu a:visited {
+	width: 100px;
+	height: 28px;
+	width: 88px;
+	height: 16px;
+}
+
+#menu a span {
+	display: none;
+}
+
+#menu a:hover {
+	border: 1px solid #000;
+}
+
+#menu a:hover span.left,#menu a:hover span.right {
+	display: block;
+	position: absolute;
+	height: 0;
+	width: 0;
+	/* hide overflow:hidden from IE5/Mac */ /* \*/
+	overflow: hidden;
+	/* */ 
+	border-top: 8px solid #fff;
+	border-bottom: 8px solid #fff;
+	z-index: 7;
+}
+
+/*for Opera*/
+html>body a:hover span.left,#menu a:hover span.right {
+	overflow: hidden;
+}
+
+#menu a:hover span.left {
+	left: 5px;
+	top: 5px;
+	border-left: 8px solid #c00;
+}
+
+#menu a:hover span.right {
+	left: 87px;
+	top: 5px;
+	border-right: 8px solid #c00;
+}
+
+* html #menu a:hover span.left,* html #menu a:hover span.right {
+	width: 8px;
+	height: 16px;
+	width: 0;
+	height: 0;
+}
+
+#menu a:hover span.lk {
+	display: block;
+	position: absolute;
+	left: 120px;
+	top: 0;
+	padding: 5px;
+	width: 100px;
+	background-color: #ffff80;
+	color: #000;
+	border: 1px solid #234;
+	z-index: 5;
+}
+
+#content {
+	float: left;
+	position: relativ;
+	margin-top: 110px;
+	margin-left: 110px;
+	display: inline;
+	width: 70%;
+	height: 70%;
+	font-size: 1em;
+	color: maroon;
+	z-index: 1;
+}
+
+#content a{
+	background: transparent;
+	color: inherit;
+	}
+	
+#stdcontent {
+	position: relativ;
+	margin: 0;
+	vertical-align: middle;
+	margin-bottom: 5px;
+	display: block;
+	border: solid 1px black;
+	z-index: 1;
+}
+
+p:first-letter {
+	font-size: 1.5em;
+}
+
+#stdcontent div.corner {
+	position: relativ;
+	margin: -1px 0px 0px -1px;
+	width: 20px;
+	height: 20px;
+	padding: 0px 0px 0px 20px;
+	background: url("../images/corner.jpg") no-repeat;
+	z-index: 2;
+}
+
+* html #head,* html #footer,* html #left,* html #logo,* html #menu {
+	position: absolute;
+}
+
+#pad1 {
+	display: block;
+	width: 18px;
+	height: 100px;
+	float: left;
+}
+
+#pad3 {
+	display: block;
+	width: 18px;
+	height: 50px;
+	float: left;
+}
+
+.pad2 {
+	display: block;
+	height: 100px;
+}
+
+#content p {
+	padding: 5px;
+}
+
+.bold {
+	font-size: 1.2em;
+	font-weight: bold;
+}
+
+#wordsleft {
+	float: left;
+	top: 100px;
+	left: 150px;
+	height: 200px;
+	width: 150px;
+	background: #efd;
+	border: 1px solid #000;
+	margin: 5px;
+	padding: 5px;
+}
+
+#wordsright {
+	float: right;
+	top: 100px;
+	right: 150px;
+	height: 200px;
+	width: 150px;
+	background: #def;
+	border: 1px solid #000;
+	margin: 5px;
+	padding: 5px;
+}
+
+#wordsabsolute {
+	position: absolute;
+	top: 280px;
+	left: 400px;
+	background: #eee;
+	border: 1px solid #000;
+	margin: 5px;
+	padding: 5px;
+	font-size: 2em;
+	color: #c00;
+}
+
+#wordsrelative {
+	position: relative;
+	top: 10px;
+	left: 30px;
+	background: #ddd;
+	border: 1px solid #000;
+	margin: 5px;
+	padding: 5px;
+	font-size: 2em;
+	color: #c00;
+	width: 200px;
+}
+
+#wordsstatic {
+	position: static;
+	top: 10px;
+	left: 30px;
+	background: #ddd;
+	border: 1px solid #000;
+	margin: 5px;
+	padding: 5px;
+	font-size: 2em;
+	color: #c00;
+	width: 200px;
+}
+
+#button {
+	position: relative;
+	float: left;
+	width: 100%;
+	padding: 0 0 1em 0;
+	margin: 0;
+	text-align: center;
+	font-family: 'Trebuchet MS', 'Lucida Grande',
+	  Verdana, Lucida, Geneva, Helvetica, 
+	  Arial, sans-serif;
+	}
+	
+#button ul {
+		width: 100%;
+		list-style: none;
+		margin: 0;
+		padding: 0;
+		border: none;
+}
+		
+#button li {
+		margin: 0;
+		margin-bottom: 3px;
+}	
+
+#button li a, a:visited {
+		display: block;
+		padding: 5px 5px 5px 0.5em;
+		background: white url("../images/menybg.png") no-repeat top left;
+		color: maroon;
+		text-decoration: none;
+		width: 100%;
+		}
+
+/*for Opera*/
+html>body #button li a {
+		width: auto;
+}
+
+#button li a:hover {
+		border: 0;
+		font-weight: bold;
+}
+
+LABEL {
+	text-align: right;
+	color: #99CC66;
+}
+
+
+div.popup {
+	position: relative;
+	margin: 0;
+	clear: both;
+	float: left;
+    background-color: white;
+    color: black;
+    border: 1px solid #CCCCCC;
+    font-size:smaller;
+    padding: 5px;
+}
+
+div.popup table {
+    font-size:smaller;
+}
+
+div.popup a {
+	background: transparent;
+	text-decoration: underline;
+	}
+
+.crudform {
+	border-color: black;
+	border-style: groove;
+	visibility: visible;
+	padding: 0px;
+	position: relative;
+	border-width: thin;
+	clear: left;
+	bottom: 0px;
+	z-index: auto
+}
+
+#foot {
+	color: navy;
+	text-align: center;
+}
+
+TABLE.webpager {
+	background-color: white;
+	width: 100%;
+	border: 0;
+	margin: 0;
+	padding: 0;
+	font-size: 0.9em;
+	line-height: 0.9em;
+}
+
+TABLE.properties {
+	/*border: 1px solid black;*/
+	border: 0;
+	margin: 10px 0 0 0;
+	padding: 0;
+	font-size: 1em;
+	line-height: 1em;
+}
+
+TH.propertyheader {
+	border-bottom: 1px solid black;
+	background-color: activecaption;
+	color: captiontext;
+}
+
+TR.propertyRow1 {
+	background-color: white;
+}
+
+TR.propertyRow2 {
+	background-color: #FF3;
+}
+
+#filer {
+	position: relative;
+	margin: 120px 0 0 120px;
+}
+
+TABLE.editform TH, TD, LABEL{
+	color: black;
+	text-align: left;
+	font-size: 0.9em;
+	border: 0;
+}
+
+TABLE.editform INPUT {
+	color: navy;
+	text-align: left;
+	font-size: 0.9em;
+	padding: 2px;
+	border: 2px inset black;
+}
+
+span.prosjektbody {
+	background-color: silver;
+}
+
+.content2 {
+	float: right;
+	position: relativ;
+	margin-top: 10px;
+	margin-right: 1%;
+	display: inline;
+	width: 98%;
+	height: 70%;
+	font-size: 1em;
+	color: black;
+	z-index: 1;
+	background: url("../images/bg2col.png") repeat-y 30% 0;
+}
+
+#container {
+	margin: 100px 3% 0px 120px;
+	padding-top: 20px;
+	padding-left: 200px;   /* LC width */
+	padding-right: 150px;  /* RC width */
+}
+
+#container .column {
+	position: relative;
+	float: left;
+}
+
+#centercol {
+	width: 99%;
+	width: 100%;
+}
+
+#leftcol {
+	width: 200px;          /* LC width */
+	right: 200px;          /* LC width */
+	margin-left: -100%;
+}
+
+#rightcol {
+	width: 150px;          /* RC width */
+	margin-right: -150px;  /* RC width */
+	background-color: navy;
+}
+
+#leftcol a a:visited a:hover {
+	background-color: transparent;
+}
\ No newline at end of file

Propchange: shale/sandbox/maven/archetypes/shale-clay-starter-archetype/src/main/resources/archetype-resources/src/main/webapp/theme/styles.css
------------------------------------------------------------------------------
    svn:eol-style = native