FileDocCategorySizeDatePackage
UsCustomerTag.javaAPI DocGlassfish v2 API4177Sat May 05 19:17:12 BST 2007org.apache.taglibs.standard.examples.taglib

UsCustomerTag

public class UsCustomerTag extends javax.servlet.jsp.jstl.core.ConditionalTagSupport

Tag handler for <usCustomer>

author
Pierre Delisle
version
$Revision: 1.3 $ $Date: 2007/05/06 02:17:12 $

Fields Summary
private org.apache.taglibs.standard.examples.beans.Customer
customer
Holds value of property customer.
Constructors Summary
public UsCustomerTag()

        super();
        init();
    
Methods Summary
protected booleancondition()

        try {
            if (customer == null) {
                throw new NullAttributeException("usCustomer", "test");
            } else {
                //System.out.println("country: " + customer.getAddress().getCountry());
                return (customer.getAddress().getCountry().equalsIgnoreCase("USA"));
            }
        } catch (JspException ex) {
            throw new JspTagException(ex.toString());
        }
    
public org.apache.taglibs.standard.examples.beans.CustomergetCustomer()
Getter for property customer.

return
Value of property customer.

        return customer;
    
private voidinit()

        customer = null;
    
public voidrelease()

        super.release();
        init();
    
public voidsetCustomer(org.apache.taglibs.standard.examples.beans.Customer customer)
Setter for property customer.

param
customer New value of property customer.

        this.customer = customer;