com.sun.j2ee.blueprints.ui.shopping
Class BuyNowComponent

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byjavax.faces.component.UICommand
              extended byjavax.faces.component.html.HtmlCommandButton
                  extended bycom.sun.j2ee.blueprints.ui.shopping.BuyNowComponent
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder

public class BuyNowComponent
extends javax.faces.component.html.HtmlCommandButton

BuyNowComponent allows you to sell individual items through PayPal.This component supports all the attributes that are commonly posted to PayPal to complete a transaction as properties on the component.Rest of the attributes can be specified through postData which is a value binding expression that resolves to a BuyNowPostData bean.


Field Summary
static java.lang.String COMPONENT_FAMILY
          The standard component family for this component.
static java.lang.String RENDERER_TYPE
          The standard renderer type for this component.
 
Fields inherited from class javax.faces.component.html.HtmlCommandButton
COMPONENT_TYPE
 
Constructor Summary
BuyNowComponent()
           
 
Method Summary
 java.math.BigDecimal getAmount()
           
 java.lang.String getBusiness()
          Returns the email address of the Seller's PayPal account PayPal Attribute Name: business
 java.lang.String getFamily()
          Return the component family for this component.
 java.lang.String getImage()
          Sets the image that will be displayed instead of the default PayPal BuyNow button Image.
 java.lang.String getImageUrl()
          Returns the value of URL of the 150x50-pixel image displayed as your logo in PayPal Page.
 java.lang.String getItemName()
          Returns the name of the item PayPal Attribute Name: item_name
 java.lang.String getPaymentCancelledUrl()
          Returns the URL to which customer's browser is returned if payment is cancelled.
 java.lang.String getPostBackUrl()
          Returns the value of url to which PayPal posts information about the transaction.
 BuyNowPostData getPostData()
          Returns the value of postData support bean through additional attributes for a particular transaction can be posted..
 int getQuantity()
          Returns the number of items.
 java.lang.String getReturnUrl()
          Returns the URL to which customer's browser will be returned after c completing payment.
 java.lang.String getStyle()
          CSS style(s) to be applied when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied when this component is rendered.
 java.lang.String getTarget()
          Returns the target window for the transaction.
 java.lang.String getType()
          Returns the type of PayPal button.
 boolean isTestMode()
          Returns the mode under which the transaction of being performed.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Return the state to be saved for this component.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Saves the state of this component.
 void setAmount(java.math.BigDecimal amount)
           
 void setBusiness(java.lang.String business)
          Sets the email address of the Seller's PayPal account PayPal Attribute Name: business
 void setImage(java.lang.String image)
          Sets the image that will be displayed instead of the default PayPal BuyNow button Image.
 void setImageUrl(java.lang.String imageUrl)
          Sets the value of URL of the 150x50-pixel image displayed as your logo in PayPal Page.
 void setItemName(java.lang.String itemName)
          Sets the name of the item PayPal Attribute Name: item_name
 void setPaymentCancelledUrl(java.lang.String paymentCancelledUrl)
          Sets the URL to which customer's browser is returned if payment is cancelled.
 void setPostBackUrl(java.lang.String postBackUrl)
          Sets the value of url to which PayPal posts information about the transaction.
 void setPostData(BuyNowPostData postData)
          Sets the value of postData support bean through additional attributes for a particular transaction can be posted..
 void setQuantity(int itemQuantity)
          Sets the number of items.
 void setReturnUrl(java.lang.String return_url)
          Sets the value of URL to which customer's browser will be returned after completing payment..
 void setStyle(java.lang.String style)
          CSS style(s) to be applied when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied when this component is rendered.
 void setTarget(java.lang.String target)
          Sets the target window for the transaction.
 void setTestMode(boolean mode)
          Sets the mode under which the transaction of being performed.
 void setType(java.lang.String type)
          Sets the target window for the transaction.
 
Methods inherited from class javax.faces.component.html.HtmlCommandButton
getAccesskey, getAlt, getDir, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getTabindex, getTitle, isDisabled, isReadonly, setAccesskey, setAlt, setDir, setDisabled, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setTabindex, setTitle
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getAction, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY

The standard component family for this component.

See Also:
Constant Field Values

RENDERER_TYPE

public static final java.lang.String RENDERER_TYPE

The standard renderer type for this component.

See Also:
Constant Field Values
Constructor Detail

BuyNowComponent

public BuyNowComponent()
Method Detail

getFamily

public java.lang.String getFamily()

Return the component family for this component.


getStyle

public java.lang.String getStyle()

CSS style(s) to be applied when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied when this component is rendered.

See Also:
getStyleClass()

getBusiness

public java.lang.String getBusiness()
Returns the email address of the Seller's PayPal account PayPal Attribute Name: business


setBusiness

public void setBusiness(java.lang.String business)
Sets the email address of the Seller's PayPal account PayPal Attribute Name: business


getPostBackUrl

public java.lang.String getPostBackUrl()
Returns the value of url to which PayPal posts information about the transaction. PayPal Attribute Name: notify_url


setPostBackUrl

public void setPostBackUrl(java.lang.String postBackUrl)
Sets the value of url to which PayPal posts information about the transaction. PayPal Attribute Name: notify_url


getAmount

public java.math.BigDecimal getAmount()

setAmount

public void setAmount(java.math.BigDecimal amount)

getItemName

public java.lang.String getItemName()
Returns the name of the item PayPal Attribute Name: item_name


setItemName

public void setItemName(java.lang.String itemName)
Sets the name of the item PayPal Attribute Name: item_name


getQuantity

public int getQuantity()
Returns the number of items. PayPal Attribute Name: quantity


setQuantity

public void setQuantity(int itemQuantity)
Sets the number of items. PayPal Attribute Name: quantity


getPaymentCancelledUrl

public java.lang.String getPaymentCancelledUrl()
Returns the URL to which customer's browser is returned if payment is cancelled. PayPal Attribute Name: cancel_return


setPaymentCancelledUrl

public void setPaymentCancelledUrl(java.lang.String paymentCancelledUrl)
Sets the URL to which customer's browser is returned if payment is cancelled. PayPal Attribute Name: cancel_return


getImageUrl

public java.lang.String getImageUrl()
Returns the value of URL of the 150x50-pixel image displayed as your logo in PayPal Page. PayPal Attribute Name: image_url


setImageUrl

public void setImageUrl(java.lang.String imageUrl)
Sets the value of URL of the 150x50-pixel image displayed as your logo in PayPal Page. PayPal Attribute Name: image_url


getReturnUrl

public java.lang.String getReturnUrl()
Returns the URL to which customer's browser will be returned after c completing payment. PayPal Attribute Name: return_url


setReturnUrl

public void setReturnUrl(java.lang.String return_url)
Sets the value of URL to which customer's browser will be returned after completing payment.. PayPal Attribute Name: return_url


getImage

public java.lang.String getImage()

Sets the image that will be displayed instead of the default PayPal BuyNow button Image.


setImage

public void setImage(java.lang.String image)

Sets the image that will be displayed instead of the default PayPal BuyNow button Image.


getPostData

public BuyNowPostData getPostData()

Returns the value of postData support bean through additional attributes for a particular transaction can be posted..


setPostData

public void setPostData(BuyNowPostData postData)

Sets the value of postData support bean through additional attributes for a particular transaction can be posted..


getTarget

public java.lang.String getTarget()

Returns the target window for the transaction. Possible values are: _self, _top, _blank, _parent


setTarget

public void setTarget(java.lang.String target)

Sets the target window for the transaction. Possible values are: _self, _top, _blank, _parent


getType

public java.lang.String getType()

Returns the type of PayPal button. Possible values are: BuyNow, Donation. Not case sensitive.


setType

public void setType(java.lang.String type)

Sets the target window for the transaction. Possible values are: _self, _top, _blank, _parent


isTestMode

public boolean isTestMode()
Returns the mode under which the transaction of being performed. By default the transaction will be posted to sandbox.


setTestMode

public void setTestMode(boolean mode)
Sets the mode under which the transaction of being performed. By default the transaction will be posted to sandbox.


saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)

Saves the state of this component.


restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)

Return the state to be saved for this component.