svn commit: r698351 [3/5] - in /ofbiz/trunk/specialpurpose: ./ webpos/ webpos/build/ webpos/config/ webpos/data/ webpos/entitydef/ webpos/script/ webpos/script/org/ webpos/script/org/ofbiz/ webpos/script/org/ofbiz/webpos/ webpos/script/org/ofbiz/webpos...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r698351 [3/5] - in /ofbiz/trunk/specialpurpose: ./ webpos/ webpos/build/ webpos/config/ webpos/data/ webpos/entitydef/ webpos/script/ webpos/script/org/ webpos/script/org/ofbiz/ webpos/script/org/ofbiz/webpos/ webpos/script/org/ofbiz/webpos...

mrisaliti
Added: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java (added)
+++ ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java Tue Sep 23 14:09:28 2008
@@ -0,0 +1,509 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.ofbiz.webpos.transaction;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javolution.util.FastMap;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilFormatOut;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.order.shoppingcart.CheckOutHelper;
+import org.ofbiz.order.shoppingcart.ShoppingCart;
+import org.ofbiz.order.shoppingcart.ShoppingCartItem;
+import org.ofbiz.product.store.ProductStoreWorker;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
+import org.ofbiz.webpos.session.WebPosSession;
+
+public class WebPosTransaction {
+    
+    public static final String resource = "WebPosUiLabels";
+    public static final String module = WebPosTransaction.class.getName();
+    public static final int NO_PAYMENT = 0;
+    public static final int INTERNAL_PAYMENT = 1;
+    public static final int EXTERNAL_PAYMENT = 2;
+    
+    private CheckOutHelper ch = null;
+    private GenericValue txLog = null;
+    private String transactionId = null;
+    private String orderId = null;
+    private String partyId = null;
+    private boolean isOpen = false;
+    private int drawerIdx = 0;
+    private GenericValue shipAddress = null;
+    private WebPosSession webPosSession = null;
+    
+    public WebPosTransaction(WebPosSession session) {
+        this.webPosSession = session;
+        this.partyId = "_NA_";
+        GenericDelegator delegator = session.getDelegator();
+        ShoppingCart cart = session.getCart();
+        this.ch = new CheckOutHelper(session.getDispatcher(), delegator, cart);
+        cart.setChannelType("POS_SALES_CHANNEL");
+        cart.setFacilityId(session.getFacilityId());
+        cart.setTerminalId(session.getId());
+        
+        if (session.getUserLogin() != null) {
+            cart.addAdditionalPartyRole(session.getUserLogin().getString("partyId"), "SALES_REP");
+        }
+        
+        // setup the TX log
+        this.transactionId = delegator.getNextSeqId("PosTerminalLog");
+        txLog = delegator.makeValue("PosTerminalLog");
+        txLog.set("posTerminalLogId", this.transactionId);
+        txLog.set("posTerminalId", session.getId());
+        txLog.set("transactionId", transactionId);
+        txLog.set("userLoginId", session.getUserLoginId());
+        txLog.set("statusId", "POSTX_ACTIVE");
+        txLog.set("logStartDateTime", UtilDateTime.nowTimestamp());
+        try {
+            txLog.create();
+            cart.setTransactionId(transactionId);
+        } catch (GenericEntityException e) {
+            Debug.logError(e, "Unable to create TX log - not fatal", module);
+        }
+        
+        Debug.logInfo("Created WebPosTransaction [" + this.transactionId + "]", module);
+    }
+    
+    public String getUserLoginId() {
+        return webPosSession.getUserLoginId();
+    }
+    
+    public int getDrawerNumber() {
+        return drawerIdx + 1;
+    }
+    
+    public String getTransactionId() {
+        return this.transactionId;
+    }
+    
+    public String getTerminalId() {
+        return webPosSession.getId();
+    }
+    
+    public String getFacilityId() {
+        return webPosSession.getFacilityId();
+    }
+    
+    public String getTerminalLogId() {
+        return txLog.getString("posTerminalLogId");
+    }
+    
+    public boolean isOpen() {
+        GenericValue terminalState = this.getTerminalState();
+        if (terminalState != null) {
+            this.isOpen = true;
+        } else {
+            this.isOpen = false;
+        }
+        return this.isOpen;
+    }
+    
+    public GenericValue getTerminalState() {
+        GenericDelegator delegator = webPosSession.getDelegator();
+        List<GenericValue> states = null;
+        try {
+            states = delegator.findList("PosTerminalState", EntityCondition.makeCondition(UtilMisc.toMap("posTerminalId", webPosSession.getId(), "startingTxId", getTransactionId())), null, null, null, false);
+        } catch (GenericEntityException e) {
+            Debug.logError(e, module);
+        }
+        states = EntityUtil.filterByDate(states, UtilDateTime.nowTimestamp(), "openedDate", "closedDate", true);
+        return EntityUtil.getFirst(states);
+    }
+    
+    public void closeTx() {
+        if (UtilValidate.isNotEmpty(txLog)) {
+            txLog.set("statusId", "POSTX_CLOSED");
+            txLog.set("itemCount", new Long(getCart().size()));
+            txLog.set("logEndDateTime", UtilDateTime.nowTimestamp());
+            try {
+                txLog.store();
+            } catch (GenericEntityException e) {
+                Debug.logError(e, "Unable to store TX log - not fatal", module);
+            }
+            getCart().clear();
+            Debug.logInfo("Transaction closed", module);
+        }
+    }
+    
+    public void paidInOut(String type) {
+        if (UtilValidate.isNotEmpty(txLog)) {
+            txLog.set("statusId", "POSTX_PAID_" + type);
+            txLog.set("logEndDateTime", UtilDateTime.nowTimestamp());
+            try {
+                txLog.store();
+            } catch (GenericEntityException e) {
+                Debug.logError(e, "Unable to store TX log - not fatal", module);
+            }
+            webPosSession.setCurrentTransaction(null);
+            Debug.logInfo("Paid "+ type, module);
+        }
+    }
+    
+    public void modifyPrice(String productId, double price) {
+        Debug.logInfo("Modify item price " + productId + "/" + price, module);
+        ShoppingCartItem item = getCart().findCartItem(productId, null, null, null, 0.00);
+        if (UtilValidate.isNotEmpty(item)) {
+            item.setBasePrice(price);
+        } else {
+            Debug.logInfo("Item not found " + productId, module);
+        }
+    }
+    
+    public void calcTax() {
+        try {
+            ch.calcAndAddTax(this.getStoreOrgAddress());
+        } catch (GeneralException e) {
+            Debug.logError(e, module);
+        }
+    }
+    
+    public double processSale() throws GeneralException {
+        //TODO insert check if not enough funds
+        Debug.log("process sale", module);
+        double grandTotal = this.getGrandTotal();
+        double paymentAmt = this.getPaymentTotal();
+        if (grandTotal > paymentAmt) {
+            throw new IllegalStateException();
+        }
+        
+        // attach the party ID to the cart
+        getCart().setOrderPartyId(partyId);
+        
+        // validate payment methods
+        Debug.log("Validating payment methods", module);
+        Map<String, ? extends Object> valRes = ch.validatePaymentMethods();
+        if (valRes != null && ServiceUtil.isError(valRes)) {
+            throw new GeneralException(ServiceUtil.getErrorMessage(valRes));
+        }
+        
+        // store the "order"
+        Debug.log("Store order", module);
+        Map<String, ? extends Object> orderRes = ch.createOrder(webPosSession.getUserLogin());
+        
+        if (orderRes != null && ServiceUtil.isError(orderRes)) {
+            throw new GeneralException(ServiceUtil.getErrorMessage(orderRes));
+        } else if (orderRes != null) {
+            this.orderId = (String) orderRes.get("orderId");
+        }
+        
+        // process the payment(s)
+        Debug.log("Processing the payment(s)", module);
+        Map<String, ? extends Object> payRes = null;
+        try {
+            payRes = ch.processPayment(ProductStoreWorker.getProductStore(webPosSession.getProductStoreId(), webPosSession.getDelegator()), webPosSession.getUserLogin(), true);
+        } catch (GeneralException e) {
+            Debug.logError(e, module);
+            throw e;
+        }
+        
+        if (payRes != null && ServiceUtil.isError(payRes)) {
+            throw new GeneralException(ServiceUtil.getErrorMessage(payRes));
+        }
+        
+        // get the change due
+        double change = (grandTotal - paymentAmt);
+        
+        // notify the change due
+        //output.print(UtilProperties.getMessage(PosTransaction.resource,"CHANGE",defaultLocale) + " " + UtilFormatOut.formatPrice(this.getTotalDue() * -1));
+        
+        // threaded drawer/receipt printing
+        // TODO open the drawer
+        // TODO print the receipt
+        
+        // save the TX Log
+        txLog.set("statusId", "POSTX_SOLD");
+        txLog.set("orderId", orderId);
+        txLog.set("itemCount", new Long(getCart().size()));
+        txLog.set("logEndDateTime", UtilDateTime.nowTimestamp());
+        try {
+            txLog.store();
+        } catch (GenericEntityException e) {
+            Debug.logError(e, "Unable to store TX log - not fatal", module);
+        }
+        
+        return change;
+    }
+    
+    private synchronized GenericValue getStoreOrgAddress() {
+        if (UtilValidate.isEmpty(this.shipAddress)) {
+            // locate the store's physical address - use this for tax
+            GenericValue facility = null;
+            try {
+                facility = webPosSession.getDelegator().findOne("Facility", UtilMisc.toMap("facilityId", webPosSession.getFacilityId()), false);
+            } catch (GenericEntityException e) {
+                Debug.logError(e, module);
+            }
+            if (UtilValidate.isEmpty(facility)) {
+                return null;
+            }
+            
+            List<GenericValue> fcp = null;
+            try {
+                fcp = facility.getRelatedByAnd("FacilityContactMechPurpose", UtilMisc.toMap("contactMechPurposeTypeId", "SHIP_ORIG_LOCATION"));
+            } catch (GenericEntityException e) {
+                Debug.logError(e, module);
+            }
+            fcp = EntityUtil.filterByDate(fcp);
+            GenericValue purp = EntityUtil.getFirst(fcp);
+            if (UtilValidate.isNotEmpty(purp)) {
+                try {
+                    this.shipAddress = webPosSession.getDelegator().findOne("PostalAddress",
+                            UtilMisc.toMap("contactMechId", purp.getString("contactMechId")), false);
+                } catch (GenericEntityException e) {
+                    Debug.logError(e, module);
+                }
+            }
+        }
+        return this.shipAddress;
+    }
+    
+    public void clearPayments() {
+        Debug.logInfo("all payments cleared from sale", module);
+        getCart().clearPayments();
+    }
+    
+    public void clearPayment(int index) {
+        Debug.logInfo("removing payment " + index, module);
+        getCart().clearPayment(index);
+    }
+    
+    public void clearPayment(String id) {
+        Debug.logInfo("removing payment " + id, module);
+        getCart().clearPayment(id);
+    }
+    
+    public int checkPaymentMethodType(String paymentMethodTypeId) {
+        Map<String, ? extends Object> fields = UtilMisc.toMap("paymentMethodTypeId", paymentMethodTypeId, "productStoreId", webPosSession.getProductStoreId());
+        List<GenericValue> values = null;
+        try {
+            values = webPosSession.getDelegator().findList("ProductStorePaymentSetting", EntityCondition.makeCondition(fields), null, null, null, true);
+        } catch (GenericEntityException e) {
+            Debug.logError(e, module);
+        }
+        
+        final String externalCode = "PRDS_PAY_EXTERNAL";
+        if (UtilValidate.isEmpty(values)) {
+            return NO_PAYMENT;
+        } else {
+            boolean isExternal = true;
+            Iterator<GenericValue> i = values.iterator();
+            while (i.hasNext() && isExternal) {
+                GenericValue v = (GenericValue) i.next();
+                //Debug.log("Testing [" + paymentMethodTypeId + "] - " + v, module);
+                if (!externalCode.equals(v.getString("paymentServiceTypeEnumId"))) {
+                    isExternal = false;
+                }
+            }
+            
+            if (isExternal) {
+                return EXTERNAL_PAYMENT;
+            } else {
+                return INTERNAL_PAYMENT;
+            }
+        }
+    }
+    
+    public static int getNoPaymentCode() {
+        return NO_PAYMENT;
+    }
+    
+    public static int getExternalPaymentCode() {
+        return EXTERNAL_PAYMENT;
+    }
+    
+    public static int getInternalPaymentCode() {
+        return INTERNAL_PAYMENT;
+    }
+    
+    public double addPayment(String id, double amount) {
+        return this.addPayment(id, amount, null, null);
+    }
+    
+    public double addPayment(String id, double amount, String refNum, String authCode) {
+        Debug.logInfo("Added payment " + id + "/" + amount, module);
+        if ("CASH".equals(id)) {
+            // clear cash payments first; so there is only one
+            getCart().clearPayment(id);
+        }
+        getCart().addPaymentAmount(id, new Double(amount), refNum, authCode, true, true, false);
+        return this.getTotalDue();
+    }
+    
+    public double processAmount(String amtStr) throws GeneralException {
+        double amount;
+        if (UtilValidate.isNotEmpty(amtStr)) {
+            try {
+                amount = Double.parseDouble(amtStr);
+            } catch (NumberFormatException e) {
+                Debug.logError("Invalid number for amount : " + amtStr, module);
+                throw new GeneralException();
+            }
+        } else {
+            Debug.log("Amount is empty; assumption is full amount : " + this.getTotalDue(), module);
+            amount = this.getTotalDue();
+            if (amount <= 0) {
+                throw new GeneralException();
+            }
+        }
+        return amount;
+    }
+    
+    public synchronized void processNoPayment(String paymentMethodTypeId) {
+        try {
+            double amount = processAmount(null);
+            Debug.log("Processing [" + paymentMethodTypeId + "] Amount : " + amount, module);
+            
+            // add the payment
+            addPayment(paymentMethodTypeId, amount, null, null);
+        } catch (GeneralException e) {
+            // errors handled
+        }
+    }
+    
+    public synchronized void processExternalPayment(String paymentMethodTypeId, String amountStr, String refNum) {
+        if (refNum == null) {
+            //TODO handle error message
+            return;
+        }
+        
+        try {
+            double amount = processAmount(amountStr);
+            Debug.log("Processing [" + paymentMethodTypeId + "] Amount : " + amount, module);
+            
+            // add the payment
+            addPayment(paymentMethodTypeId, amount, refNum, null);
+        } catch (GeneralException e) {
+            // errors handled
+        }
+    }
+    
+    public String makeCreditCardVo(String cardNumber, String expDate, String firstName, String lastName) {
+        LocalDispatcher dispatcher = webPosSession.getDispatcher();
+        String expMonth = expDate.substring(0, 2);
+        String expYear = expDate.substring(2);
+        // two digit year check -- may want to re-think this
+        if (expYear.length() == 2) {
+            expYear = "20" + expYear;
+        }
+        
+        Map<String, Object> svcCtx = FastMap.newInstance();
+        svcCtx.put("userLogin", webPosSession.getUserLogin());
+        svcCtx.put("partyId", partyId);
+        svcCtx.put("cardNumber", cardNumber);
+        svcCtx.put("firstNameOnCard", firstName == null ? "" : firstName);
+        svcCtx.put("lastNameOnCard", lastName == null ? "" : lastName);
+        svcCtx.put("expMonth", expMonth);
+        svcCtx.put("expYear", expYear);
+        svcCtx.put("cardType", UtilValidate.getCardType(cardNumber));
+        
+        Map<String, Object> svcRes = null;
+        try {
+            svcRes = dispatcher.runSync("createCreditCard", svcCtx);
+        } catch (GenericServiceException e) {
+            Debug.logError(e, module);
+            return null;
+        }
+        if (ServiceUtil.isError(svcRes)) {
+            Debug.logError(ServiceUtil.getErrorMessage(svcRes) + " - " + svcRes, module);
+            return null;
+        } else {
+            return (String) svcRes.get("paymentMethodId");
+        }
+    }
+    
+    public void setPaymentRefNum(int paymentIndex, String refNum, String authCode) {
+        Debug.log("setting payment index reference number " + paymentIndex + " / " + refNum + " / " + authCode, module);
+        ShoppingCart.CartPaymentInfo inf = getCart().getPaymentInfo(paymentIndex);
+        inf.refNum[0] = refNum;
+        inf.refNum[1] = authCode;
+    }
+    
+    /* CVV2 code should be entered when a card can't be swiped */
+    public void setPaymentSecurityCode(String paymentId, String refNum, String securityCode) {
+        Debug.log("setting payment security code " + paymentId, module);
+        int paymentIndex = getCart().getPaymentInfoIndex(paymentId, refNum);
+        ShoppingCart.CartPaymentInfo inf = getCart().getPaymentInfo(paymentIndex);
+        inf.securityCode = securityCode;
+        inf.isSwiped = false;
+    }
+    
+    /* Track2 data should be sent to processor when a card is swiped. */
+    public void setPaymentTrack2(String paymentId, String refNum, String securityCode) {
+        Debug.log("setting payment security code " + paymentId, module);
+        int paymentIndex = getCart().getPaymentInfoIndex(paymentId, refNum);
+        ShoppingCart.CartPaymentInfo inf = getCart().getPaymentInfo(paymentIndex);
+        inf.securityCode = securityCode;
+        inf.isSwiped = true;
+    }
+    
+    /* Postal code should be entered when a card can't be swiped */
+    public void setPaymentPostalCode(String paymentId, String refNum, String postalCode) {
+        Debug.log("setting payment security code " + paymentId, module);
+        int paymentIndex = getCart().getPaymentInfoIndex(paymentId, refNum);
+        ShoppingCart.CartPaymentInfo inf = getCart().getPaymentInfo(paymentIndex);
+        inf.postalCode = postalCode;
+    }
+    
+    public double getTaxTotal() {
+        return getCart().getTotalSalesTax();
+    }
+    
+    public double getGrandTotal() {
+        return UtilFormatOut.formatPriceNumber(getCart().getGrandTotal()).doubleValue();
+    }
+    
+    public int getNumberOfPayments() {
+        return getCart().selectedPayments();
+    }
+    
+    public double getPaymentTotal() {
+        return UtilFormatOut.formatPriceNumber(getCart().getPaymentTotal()).doubleValue();
+    }
+    
+    public double getTotalDue() {
+        double grandTotal = this.getGrandTotal();
+        double paymentAmt = this.getPaymentTotal();
+        return (grandTotal - paymentAmt);
+    }
+    
+    public String addProductPromoCode(String code) {
+        String result = getCart().addProductPromoCode(code, webPosSession.getDispatcher());
+        calcTax();
+        return result;
+    }
+    
+    public ShoppingCart getCart() {
+        return webPosSession.getCart();
+    }
+}
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl Tue Sep 23 14:09:28 2008
@@ -0,0 +1,70 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#if requestAttributes.uiLabelMap?exists>
+  <#assign uiLabelMap = requestAttributes.uiLabelMap>
+</#if>
+
+<#assign previousParams = sessionAttributes._PREVIOUS_PARAMS_?if_exists>
+<#if previousParams?has_content>
+  <#assign previousParams = "?" + previousParams>
+</#if>
+
+<#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))>
+<#if username != "">
+  <#assign focusName = false>
+<#else>
+  <#assign focusName = true>
+</#if>
+<center>
+  <div class="screenlet login-screenlet">
+    <div class="screenlet-title-bar">
+      <h3>${uiLabelMap.CommonRegistered}</h3>
+    </div>
+    <div class="screenlet-body">
+      <form method="post" action="<@ofbizUrl>Login${previousParams?if_exists}</@ofbizUrl>" name="loginform">
+        <table class="basic-table" cellspacing="0">
+          <tr>
+            <td class="label">${uiLabelMap.CommonUsername}</td>
+            <td><input type="text" name="USERNAME" value="${username}" size="20"/></td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.CommonPassword}</td>
+            <td><input type="password" name="PASSWORD" value="" size="20"/></td>
+          </tr>
+          <tr>
+            <td colspan="2" align="center">
+              <input type="submit" value="${uiLabelMap.CommonLogin}"/>
+            </td>
+          </tr>
+        </table>
+        <input type="hidden" name="JavaScriptEnabled" value="N"/>
+      </form>
+    </div>
+  </div>
+</center>
+
+<script language="JavaScript" type="text/javascript">
+  document.loginform.JavaScriptEnabled.value = "Y";
+  <#if focusName>
+    document.loginform.USERNAME.focus();
+  <#else>
+    document.loginform.PASSWORD.focus();
+  </#if>
+</script>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/Login.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl Tue Sep 23 14:09:28 2008
@@ -0,0 +1,66 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#assign username = ""/>
+<#if requestParameters.USERNAME?has_content>
+  <#assign username = requestParameters.USERNAME/>
+<#elseif autoUserLogin?has_content>
+  <#assign username = autoUserLogin.userLoginId/>
+</#if>
+
+<h1>${uiLabelMap.CommonLogin}</h1>
+<br/>
+
+<div style="float: center; width: 49%; margin-right: 5px; text-align: center;" class="screenlet">
+    <div class="screenlet-title-bar">${uiLabelMap.CommonPasswordChange}</div>
+    <div class="screenlet-body" style="text-align: center;">
+      <form method="post" action="<@ofbizUrl>login${previousParams}</@ofbizUrl>" name="loginform">
+          <input type="hidden" name="requirePasswordChange" value="Y"/>
+          <input type="hidden" name="USERNAME" value="${username}"/>
+          <div>
+              ${uiLabelMap.CommonUsername}:&nbsp;${username}
+          </div>
+          <#if autoUserLogin?has_content>
+              <div>
+                  (${uiLabelMap.CommonNot}&nbsp;${autoUserLogin.userLoginId}?&nbsp;<a href="<@ofbizUrl>${autoLogoutUrl}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonClickHere}</a>)
+              </div>
+          </#if>
+          <div class="tabletext">
+              ${uiLabelMap.CommonPassword}:&nbsp;
+              <input type="password" name="PASSWORD" value="" size="20"/>
+          </div>
+          <div class="tabletext">
+              ${uiLabelMap.CommonNewPassword}:&nbsp;
+              <input type="password" name="newPassword" value="" size="20"/>
+          </div>
+          <div class="tabletext">
+              ${uiLabelMap.CommonNewPasswordVerify}:&nbsp;
+              <input type="password" name="newPasswordVerify" value="" size="20"/>
+          </div>
+          <div class="tabletext">
+              <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonLogin}"/>
+          </div>
+      </form>
+    </div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+  <#if autoUserLogin?has_content>document.loginform.PASSWORD.focus();</#if>
+  <#if !autoUserLogin?has_content>document.loginform.USERNAME.focus();</#if>
+</script>

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/RequirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy Tue Sep 23 14:09:28 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.base.util.*;
+import org.ofbiz.common.CommonWorkers;
+import org.ofbiz.webapp.control.*;
+
+context.autoUserLogin = session.getAttribute("autoUserLogin");
+context.autoLogoutUrl = LoginWorker.makeLoginUrl(request, "autoLogout");
+
+previousParams = session.getAttribute("_PREVIOUS_PARAMS_");
+if (previousParams) {
+    previousParams = UtilHttp.stripNamedParamsFromQueryString(previousParams, ['USERNAME', 'PASSWORD']);
+    previousParams = "?" + previousParams;
+} else {
+    previousParams = "";
+}
+context.previousParams = previousParams;
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy Tue Sep 23 14:09:28 2008
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.webpos.WebPosEvents;
+import org.ofbiz.webpos.session.WebPosSession;
+import org.ofbiz.webpos.transaction.WebPosTransaction;
+
+webPosSession = WebPosEvents.getWebPosSession(request);
+if (webPosSession) {
+    context.shoppingCartSize = webPosSession.getCart().size();
+    context.isManagerLoggedIn = webPosSession.isManagerLoggedIn();
+    webPosTransaction = webPosSession.getCurrentTransaction();
+    
+    if (webPosTransaction) {
+        context.isOpen = webPosTransaction.isOpen();
+    }
+} else {
+    context.shoppingCartSize = 0;
+}
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Main.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy Tue Sep 23 14:09:28 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.webpos.WebPosEvents;
+import org.ofbiz.webpos.session.WebPosSession;
+
+webPosSession = WebPosEvents.getWebPosSession(request);
+if (webPosSession) {
+    context.cart = webPosSession.getCart();
+    
+    if (context.cart) {
+        context.shoppingCartSize = context.cart.size();
+    }
+    
+    context.totalDue = webPosSession.getCurrentTransaction().getTotalDue();
+}
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/buttons/Payment.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy Tue Sep 23 14:09:28 2008
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.webpos.WebPosEvents;
+import org.ofbiz.webpos.session.WebPosSession;
+import org.ofbiz.webpos.transaction.WebPosTransaction;
+import java.text.SimpleDateFormat;
+
+webPosSession = WebPosEvents.getWebPosSession(request);
+if (webPosSession) {
+    shoppingCart = webPosSession.getCart();
+    context.transactionId = webPosSession.getCurrentTransaction().getTransactionId();
+    context.userLoginId = webPosSession.getUserLoginId();
+    context.drawerNumber = webPosSession.getCurrentTransaction().getDrawerNumber();
+    sdf = new SimpleDateFormat(UtilProperties.getMessage(WebPosTransaction.resource, "WebPosTransactionDateFormat", Locale.getDefault()));
+    context.transactionDate = sdf.format(new Date());
+    context.totalDue = webPosSession.getCurrentTransaction().getTotalDue();
+}
+
+// Get the Cart and Prepare Size
+if (shoppingCart) {
+    context.shoppingCartSize = shoppingCart.size();
+    payments = shoppingCart.selectedPayments();
+    for (i = 0; i < payments; i++) {
+        paymentInfo = shoppingCart.getPaymentInfo(i);
+        if (paymentInfo.amount != null) {
+            amount = paymentInfo.amount.doubleValue();
+            if (paymentInfo.paymentMethodTypeId != null) {
+                if ("CASH".equals(paymentInfo.paymentMethodTypeId)) {
+                    context.cashAmount =  (context.cashAmount) ? context.cashAmount + amount : amount;
+                }
+                else if ("PERSONAL_CHECK".equals(paymentInfo.paymentMethodTypeId)) {
+                    context.checkAmount = (context.checkAmount) ? context.checkAmount + amount : amount;
+                }
+                else if ("GIFT_CARD".equals(paymentInfo.paymentMethodTypeId)) {
+                    context.giftAmount = (context.giftAmount) ? context.giftAmount + amount : amount;
+                }
+                else if ("CREDIT_CARD".equals(paymentInfo.paymentMethodTypeId)) {
+                    context.creditAmount = (context.creditAmount) ? context.creditAmount + amount : amount;
+                }
+            }
+        }
+    }
+} else {
+    context.shoppingCartSize = 0;
+}
+context.shoppingCart = shoppingCart;
+
+context.paymentCash   = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "CASH"], true);
+context.paymentCheck  = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "PERSONAL_CHECK"], true);
+context.paymentGift   = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "GIFT_CARD"], true);
+context.paymentCredit = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "CREDIT_CARD"], true);
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy Tue Sep 23 14:09:28 2008
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.webpos.WebPosEvents;
+import org.ofbiz.webpos.session.WebPosSession;
+
+webPosSession = WebPosEvents.getWebPosSession(request);
+if (webPosSession) {
+    shoppingCart = webPosSession.getCart();
+}
+
+// Get the Cart and Prepare Size
+if (shoppingCart) {
+    context.shoppingCartSize = shoppingCart.size();
+} else {
+    context.shoppingCartSize = 0;
+}
+context.shoppingCart = shoppingCart;
+
+//check if a parameter is passed
+if (request.getAttribute("add_product_id") != "") {
+    add_product_id = request.getParameter("add_product_id");
+    product = delegator.findOne("Product", [productId : add_product_id], true);
+    context.product = product;
+}
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy Tue Sep 23 14:09:28 2008
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.entity.condition.*;
+
+context.paidReasonIn  = delegator.findList("Enumeration", EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "POS_PAID_REASON_IN") , null, ["sequenceId"], null, false);
+context.paidReasonOut = delegator.findList("Enumeration", EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "POS_PAID_REASON_OUT"), null, ["sequenceId"], null, false);
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml Tue Sep 23 14:09:28 2008
@@ -0,0 +1,392 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
+    <description>Web Pos Component Site Configuration File</description>
+    <owner>Copyright 2001-2008 The Apache Software Foundation</owner>
+    <errorpage>/error/error.jsp</errorpage>
+    
+    <handler name="java" type="request" class="org.ofbiz.webapp.event.JavaEventHandler"/>
+    <handler name="bsf" type="request" class="org.ofbiz.webapp.event.BsfEventHandler"/>
+    <handler name="soap" type="request" class="org.ofbiz.webapp.event.SOAPEventHandler"/>
+    <handler name="service" type="request" class="org.ofbiz.webapp.event.ServiceEventHandler"/>
+    <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/>
+    <handler name="simple" type="request" class="org.ofbiz.webapp.event.SimpleEventHandler"/>
+    <handler name="rome" type="request" class="org.ofbiz.webapp.event.RomeEventHandler"/>
+    
+    <handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/>
+    <handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/>
+    <handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
+    <handler name="simplecontent" type="view" class="org.ofbiz.content.view.SimpleContentViewHandler"/>
+    <handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopViewHandler"/>
+    <handler name="jsonservice" type="request" class="org.ofbiz.webapp.event.JSONServiceEventHandler"/>
+    
+    <!-- Events run from here for the first hit in a visit -->
+    <firstvisit>
+        <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="autoLoginCheck"/>
+        <event type="java" path="org.ofbiz.marketing.tracking.TrackingCodeEvents" invoke="checkTrackingCodeCookies"/>
+        <event type="java" path="org.ofbiz.product.product.ProductEvents" invoke="setDefaultStoreSettings"/>
+    </firstvisit>
+    
+    <!-- Events to run on every request before security (chains exempt) -->
+    <preprocessor>
+        <!-- This event allows affilate/distributor entry on any page -->
+        <event type="java" path="org.ofbiz.ecommerce.misc.ThirdPartyEvents" invoke="setAssociationId"/>
+        <event type="java" path="org.ofbiz.marketing.tracking.TrackingCodeEvents" invoke="checkTrackingCodeUrlParam"/>
+        <event type="java" path="org.ofbiz.marketing.tracking.TrackingCodeEvents" invoke="checkPartnerTrackingCodeUrlParam"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="keepCartUpdated"/>
+        <event type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="restoreAutoSaveList"/>
+    </preprocessor>
+    
+    <after-login>
+        <event type="java" path="org.ofbiz.ecommerce.misc.ThirdPartyEvents" invoke="updateAssociatedDistributor"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="keepCartUpdated"/>
+        <!-- after login, get everything from the auto-save list -->
+        <event type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="restoreAutoSaveList"/>
+        <!-- after login and restoring from the auto-save list, save everything to the auto-save list to handle anything that may have already been in the cart before login -->
+        <event type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="saveCartToAutoSaveList"/>
+    </after-login>
+    
+    <!-- Security Mappings -->
+    <request-map uri="checkLogin" edit="false">
+        <description>Verify a user is logged in.</description>
+        <security https="true" auth="false"/>
+        <event type="java" path="org.ofbiz.securityext.login.LoginEvents" invoke="storeCheckLogin"/>
+        <response name="success" type="view" value="main"/>
+        <response name="error" type="view" value="login"/>
+    </request-map>
+
+    <request-map uri="login">
+        <security https="true" auth="false"/>
+        <event type="java" path="org.ofbiz.webpos.WebPosEvents" invoke="posLogin"/>
+        <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
+        <response name="error" type="view" value="Login"/>
+    </request-map>
+
+    <request-map uri="logout">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="logout"/>
+        <response name="success" type="request-redirect" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+
+    <request-map uri="autoLogout">
+        <security https="true" auth="false"/>
+        <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="autoLoginRemove"/>
+        <response name="success" type="request-redirect" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+    <!-- End of Security Mappings -->
+
+    <!-- Request Mappings  -->
+    <request-map uri="view">
+        <security https="true" auth="false"/>
+        <response name="success" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="authview">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="main">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="Login">
+        <security https="true" auth="false"/>
+        <event type="java" path="org.ofbiz.webpos.WebPosEvents" invoke="posLogin"/>
+        <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
+        <response name="error" type="view" value="Login"/>
+    </request-map>
+    
+    <request-map uri="Logout">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="logout"/>
+        <response name="success" type="request-redirect" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="Manager">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="Manager"/>
+    </request-map>
+    
+    <request-map uri="Payment">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="Payment"/>
+    </request-map>
+    
+    <request-map uri="Promo">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="Promo"/>
+    </request-map>
+    
+    <request-map uri="SearchProducts">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SearchProducts"/>
+    </request-map>
+    
+    <request-map uri="FindProducts">
+        <security https="true" auth="true"/>
+        <event type="jsonservice" invoke="FindProducts"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+    
+    <request-map uri="FindProductsByIdentification">
+        <security https="true" auth="true"/>
+        <event type="jsonservice" invoke="FindProductsByIdentification"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+    
+    <request-map uri="ShowCart">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ShowCart"/>
+    </request-map>
+
+    <request-map uri="ModifyCart">
+        <security https="false" auth="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="modifyCart"/>
+        <response name="success" type="view" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="EmptyCart">
+        <security https="false" auth="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="clearCart"/>
+        <response name="success" type="view" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="AddItem">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="addToCart"/>
+        <response name="success" type="view" value="main"/>
+        <response name="survey" type="view" value="survey"/>
+        <response name="product" type="view" value="product"/>
+        <response name="viewcart" type="request-redirect" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="ManagerOpenTerminal">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ManagerOpenTerminal"/>
+        <response name="error" type="view" value="ManagerOpenTerminal"/>
+    </request-map>
+    
+    <request-map uri="OpenTerminal">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/ManagerEvents.xml" invoke="openTerminal"/>
+        <response name="success" type="view" value="Manager"/>
+        <response name="error" type="view" value="ManagerOpenTerminal"/>
+    </request-map>
+    
+    <request-map uri="ManagerCloseTerminal">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ManagerCloseTerminal"/>
+        <response name="error" type="view" value="ManagerCloseTerminal"/>
+    </request-map>
+    
+    <request-map uri="CloseTerminal">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/ManagerEvents.xml" invoke="closeTerminal"/>
+        <response name="success" type="view" value="Manager"/>
+        <response name="error" type="view" value="ManagerCloseTerminal"/>
+    </request-map>
+    
+    <request-map uri="ManagerVoidOrder">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ManagerVoidOrder"/>
+        <response name="error" type="view" value="ManagerVoidOrder"/>
+    </request-map>
+    
+    <request-map uri="VoidOrder">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/ManagerEvents.xml" invoke="voidOrder"/>
+        <response name="success" type="view" value="Manager"/>
+        <response name="error" type="view" value="ManagerVoidOrder"/>
+    </request-map>
+    
+    <request-map uri="Shutdown">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/ManagerEvents.xml" invoke="shutdown"/>
+        <response name="success" type="request" value="Logout"/>
+        <response name="error" type="view" value="Login"/>
+    </request-map>
+    
+    <request-map uri="ManagerPaidOutAndIn">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ManagerPaidOutAndIn"/>
+        <response name="error" type="view" value="ManagerPaidOutAndIn"/>
+    </request-map>
+    
+    <request-map uri="PaidOutAndIn">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/ManagerEvents.xml" invoke="paidOutAndIn"/>
+        <response name="success" type="view" value="Manager"/>
+        <response name="error" type="view" value="ManagerPaidOutAndIn"/>
+    </request-map>
+    
+    <request-map uri="ManagerModifyPrice">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ManagerModifyPrice"/>
+        <response name="error" type="view" value="ManagerModifyPrice"/>
+    </request-map>
+    
+    <request-map uri="ModifyPrice">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/ManagerEvents.xml" invoke="modifyPrice"/>
+        <response name="success" type="view" value="Manager"/>
+        <response name="error" type="view" value="ManagerModifyPrice"/>
+    </request-map>
+    
+    <request-map uri="AddPayCash">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="AddPayCash"/>
+        <response name="error" type="view" value="AddPayCash"/>
+    </request-map>
+    
+    <request-map uri="PayCash">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="payCash"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="AddPayCash"/>
+    </request-map>
+    
+    <request-map uri="AddPayCheck">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="AddPayCheck"/>
+        <response name="error" type="view" value="AddPayCheck"/>
+    </request-map>
+    
+    <request-map uri="PayCheck">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="payCheck"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="AddPayCheck"/>
+    </request-map>
+    
+    <request-map uri="AddPayGiftCard">
+        <security https="false" auth="true"/>
+        <response name="success" type="view" value="AddPayGiftCard"/>
+        <response name="error" type="view" value="AddPayGiftCard"/>
+    </request-map>
+    
+    <request-map uri="PayGiftCard">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="payGiftCard"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="AddPayGiftCard"/>
+    </request-map>
+    
+    <request-map uri="AddPayCreditCard">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="AddPayCreditCard"/>
+        <response name="error" type="view" value="AddPayCreditCard"/>
+    </request-map>
+    
+    <request-map uri="PayCreditCard">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="payCredit"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="AddPayCreditCard"/>
+    </request-map>
+    
+    <request-map uri="PayFinish">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.webpos.WebPosEvents" invoke="completeSale"/>
+        <response name="success" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="AddPaySetRef">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="AddPaySetRef"/>
+        <response name="error" type="view" value="AddPaySetRef"/>
+    </request-map>
+    
+    <request-map uri="PaySetRef">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="setRefNum"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="AddPaySetRef"/>
+    </request-map>
+    
+    <request-map uri="PayClear">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="clearPayment"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="Payment"/>
+    </request-map>
+    
+    <request-map uri="PayClearAll">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PaymentEvents.xml" invoke="clearAllPayments"/>
+        <response name="success" type="view" value="Payment"/>
+        <response name="error" type="view" value="Payment"/>
+    </request-map>
+    
+    <request-map uri="AddPromoCode">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="AddPromoCode"/>
+        <response name="error" type="view" value="AddPromoCode"/>
+    </request-map>
+    
+    <request-map uri="PromoCode">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/webpos/event/PromoEvents.xml" invoke="addPromoCode"/>
+        <response name="success" type="view" value="Promo"/>
+        <response name="error" type="view" value="AddPromoCode"/>
+    </request-map>    
+
+    <!-- View Mappings -->
+    <view-map name="error" page="/error/error.jsp"/>
+    <view-map name="main" type="screen" page="component://webpos/widget/WebPosScreens.xml#Main"/>
+    <view-map name="login" type="screen" page="component://webpos/widget/CommonScreens.xml#Login"/>
+    <view-map name="Login" type="screen" page="component://webpos/widget/CommonScreens.xml#Login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://webpos/widget/CommonScreens.xml#RequirePasswordChange"/>    
+    <view-map name="Manager" type="screen" page="component://webpos/widget/WebPosScreens.xml#Manager"/>
+    <view-map name="Payment" type="screen" page="component://webpos/widget/WebPosScreens.xml#Payment"/>
+    <view-map name="Promo" type="screen" page="component://webpos/widget/WebPosScreens.xml#Promo"/>
+    <view-map name="SearchProducts" type="screen" page="component://webpos/widget/WebPosScreens.xml#SearchProducts"/>
+    <view-map name="ShowCart" type="screen" page="component://webpos/widget/WebPosScreens.xml#ShowCart"/>
+    
+    <!-- Manager view mappings -->
+    <view-map name="ManagerOpenTerminal" type="screen" page="component://webpos/widget/ManagerScreens.xml#OpenTerminal"/>
+    <view-map name="ManagerCloseTerminal" type="screen" page="component://webpos/widget/ManagerScreens.xml#CloseTerminal"/>
+    <view-map name="ManagerVoidOrder" type="screen" page="component://webpos/widget/ManagerScreens.xml#VoidOrder"/>
+    <view-map name="ManagerPaidOutAndIn" type="screen" page="component://webpos/widget/ManagerScreens.xml#PaidOutAndIn"/>
+    <view-map name="ManagerModifyPrice" type="screen" page="component://webpos/widget/ManagerScreens.xml#ModifyPrice"/>
+    
+    <!-- Payment view mappings -->
+    <view-map name="AddPayCash" type="screen" page="component://webpos/widget/PaymentScreens.xml#PayCash"/>
+    <view-map name="AddPayCheck" type="screen" page="component://webpos/widget/PaymentScreens.xml#PayCheck"/>
+    <view-map name="AddPayGiftCard" type="screen" page="component://webpos/widget/PaymentScreens.xml#PayGiftCard"/>
+    <view-map name="AddPayCreditCard" type="screen" page="component://webpos/widget/PaymentScreens.xml#PayCreditCard"/>
+    <view-map name="AddPaySetRef" type="screen" page="component://webpos/widget/PaymentScreens.xml#PaySetRef"/>
+    
+    <!-- Promo view mappings -->
+    <view-map name="AddPromoCode" type="screen" page="component://webpos/widget/PromoScreens.xml#PromoCode"/>
+    <!-- End of View Mappings -->
+</site-conf>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml Tue Sep 23 14:09:28 2008
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<web-app>
+    <display-name>Open For Business - Web Pos</display-name>
+    <description>Web Pos component of the Open For Business Project</description>
+    
+    <context-param>
+        <param-name>webSiteId</param-name>
+        <param-value>WebStorePos</param-value>
+        <description>A unique ID used to look up the WebSite entity to get information about catalogs, etc.</description>
+    </context-param>
+    <context-param>
+        <param-name>localDispatcherName</param-name>
+        <param-value>webpos</param-value>
+        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
+    </context-param>
+    <context-param>
+        <param-name>serviceReaderUrls</param-name>
+        <param-value>/WEB-INF/services.xml</param-value>
+        <description>Configuration File(s) For The Service Dispatcher</description>
+    </context-param>
+    <context-param>
+        <param-name>entityDelegatorName</param-name>
+        <param-value>default</param-value>
+        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
+    </context-param>
+    <context-param>
+        <param-name>mainDecoratorLocation</param-name>
+        <param-value>component://webpos/widget/CommonScreens.xml</param-value>
+        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
+    </context-param>
+    
+    <filter>
+        <filter-name>ContextFilter</filter-name>
+        <display-name>ContextFilter</display-name>
+        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
+        <init-param>
+            <param-name>disableContextSecurity</param-name>
+            <param-value>N</param-value>
+        </init-param>
+        <init-param>
+            <param-name>allowedPaths</param-name>
+            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images</param-value>
+        </init-param>
+        <init-param>
+            <param-name>errorCode</param-name>
+            <param-value>403</param-value>
+        </init-param>
+        <init-param>
+            <param-name>redirectPath</param-name>
+            <param-value>/control/main</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>ContextFilter</filter-name>
+            <url-pattern>/*</url-pattern>
+    </filter-mapping>
+    
+    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
+    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
+    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
+    
+    <!-- this listener will save any abandoned cart info -->
+    <listener><listener-class>org.ofbiz.order.shoppingcart.CartEventListener</listener-class></listener>
+    <!-- this listener will clean up info -->
+    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+    
+    <servlet>
+        <servlet-name>ControlServlet</servlet-name>
+        <display-name>ControlServlet</display-name>
+        <description>Main Control Servlet</description>
+        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>ControlServlet</servlet-name>
+        <url-pattern>/control/*</url-pattern>
+    </servlet-mapping>
+    <session-config>
+        <session-timeout>60</session-timeout>
+    </session-config>
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+    </welcome-file-list>
+</web-app>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl Tue Sep 23 14:09:28 2008
@@ -0,0 +1,122 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<table class="tableButtons" cellspacing="5">
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonMain}</a>
+        </td>
+        <td>
+            &nbsp;
+        </td>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true>
+                <a href="<@ofbizUrl>Manager</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonManager}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonManager}</span>
+            </#if>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>Promo</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonPromo}</a>
+        </td>
+        <td>
+            &nbsp;
+        </td>
+        <td>
+            <#if (shoppingCartSize > 0)>
+                <a href="<@ofbizUrl>Payment</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonPayment}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonPayment}</span>
+            </#if>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <#if (shoppingCartSize > 0)>
+                <a href="javascript:document.cartform.submit();" class="posButton">${uiLabelMap.WebPosRecalculateCart}</a>                
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosRecalculateCart}</span>
+            </#if>
+        </td>
+        <td>
+            <#if (shoppingCartSize > 0)>
+                <a href="<@ofbizUrl>EmptyCart</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosEmptyCart}</a>                
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosEmptyCart}</span>
+            </#if>
+        </td>
+        <td>
+            <#if (shoppingCartSize > 0)>
+                <a href="javascript:removeSelected();" class="posButton">${uiLabelMap.WebPosRemoveSelected}</a>
+            <#else>                
+                <span class="disabled">${uiLabelMap.WebPosRemoveSelected}</span>
+            </#if>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-1001&quantity=1</@ofbizUrl>" class="posButton">NAN GIZMO</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-5005&quantity=1</@ofbizUrl>" class="posButton">PURPLE GIZMO</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-2644&quantity=1</@ofbizUrl>" class="posButton">ROUND GIZMO</a>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-2002&quantity=1</@ofbizUrl>" class="posButton">SQUARE GIZMO</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-7000&quantity=1</@ofbizUrl>" class="posButton">MASSIVE GIZMO</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=WG-5569&quantity=1</@ofbizUrl>" class="posButton">TINY WIDGET</a>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-1004&quantity=1</@ofbizUrl>" class="posButton">RAINBOW GIZMO</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-1005&quantity=1</@ofbizUrl>" class="posButton">NIT GIZMO</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=GZ-8544&quantity=1</@ofbizUrl>" class="posButton">BIG GIZMO</a>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>AddItem?add_product_id=WG-1111&quantity=1</@ofbizUrl>" class="posButton">MICRO WIDGET</a>
+        </td>
+        <td>
+            &nbsp;
+        </td>
+        <td>
+            <#if userLogin?has_content && userLogin.userLoginId != "anonymous">
+                <a href="<@ofbizUrl>Logout</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonLogout}</a>
+            <#else/>
+                <a href="<@ofbizUrl>${checkLoginUrl}</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonLogin}</a>
+            </#if>
+        </td>
+    </tr>
+</table>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Main.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl Tue Sep 23 14:09:28 2008
@@ -0,0 +1,78 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<table class="tableButtons" cellspacing="5">
+    <tr>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true && isOpen?default(false) == false>
+                <a href="<@ofbizUrl>ManagerOpenTerminal</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonOpenTerminal}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonOpenTerminal}</span>
+            </#if>
+        </td>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true && isOpen?default(false) == true>
+                <a href="<@ofbizUrl>ManagerCloseTerminal</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonCloseTerminal}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonCloseTerminal}</span>
+            </#if>
+        </td>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true && isOpen?default(false) == true>
+                <a href="<@ofbizUrl>ManagerVoidOrder</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonVoidOrder}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonVoidOrder}</span>
+            </#if>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true>
+                <a href="<@ofbizUrl>Shutdown</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonShutdown}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonShutdown}</span>
+            </#if>
+        </td>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true && isOpen?default(false) == true>
+                <a href="<@ofbizUrl>ManagerPaidOutAndIn?type=IN</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonPaidIn}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonPaidIn}</span>
+            </#if>
+        </td>
+        <td>
+            <#if isManagerLoggedIn?default(false) == true && isOpen?default(false) == true>
+                <a href="<@ofbizUrl>ManagerPaidOutAndIn?type=OUT</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonPaidOut}</a>
+            <#else>
+                <span class="disabled">${uiLabelMap.WebPosButtonPaidOut}</span>
+            </#if>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <a href="<@ofbizUrl>ManagerModifyPrice</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonModifyPrice}</a>
+        </td>
+        <td>
+            <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonMain}</a>
+        </td>
+        <td>
+            &nbsp;
+        </td>
+    </tr>
+</table>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl
------------------------------------------------------------------------------
    svn:executable = *

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Manager.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Numbers.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Numbers.ftl?rev=698351&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Numbers.ftl (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/buttons/Numbers.ftl Tue Sep 23 14:09:28 2008
@@ -0,0 +1,64 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div class="screenlet-body">
+    <table class="tableButtons" cellspacing="5">
+        <tr>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">1</a>
+            </td>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">2</a>
+            </td>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">3</a>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">4</a>
+            </td>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">5</a>
+            </td>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">6</a>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">7</a>
+            </td>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">8</a>
+            </td>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">9</a>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">0</a>
+            </td>
+            <td colspan="2">
+                <a href="<@ofbizUrl>main</@ofbizUrl>" class="posButton">${uiLabelMap.WebPosButtonReturn}</a>
+            </td>
+        </tr>
+    </table>
+</div>