Plands.com Logo  Business Internet Services 
Main Menu
Home
Planetary CRM
  Benefits
  Features
  Demo
E-Mail Services
  E-mail Hosting
  Newsletters
  Discussion Lists
Web Hosting
Server Co-location
and Administration
Web Applications
Technical Support
Contact Us
DXP Samples
 
DxpHome  ||   Samples  ||   Details  ||   Docs  ||   Trees  ||   xml-xsl  ||   Links
// Cpa.java

The Cpa tag is used to provide a an array of constant values. Cpa stands for contstant parameter array and can be used in place of the Ap tag. The Ap tag supplies an array of dynamic runtime values. Both Cpa and Ap implement the ArrayParameter interface so they can be used by parent tag interchangeably to provide and array of values associated with a particular parameter name.

If the Cpa tag is run in standalone mode the exec() method is called and the array of values is stored in the request under the value of the Cpa name attribute. If the Cpa tag is used inside a parent tag, the parent can obtain the values by calling the Cpa tag's getValues(DxpRequest r) method which is a method from the ArrayParameter interface.

Values can be assigned in the values attribute using a comma delimited list. They can also be specified in the content section of the Cpa tag if you specify a delimieter. If you don't specify a delimiter when using the content section the entire content will become one value.

Storing a multiple values:

<dxp:Cpa name="users" values="Mark,Nick,Jakob,Ben"/>
Note: the value attribute uses a default delimiter (comma) to separate values - alternate form -
<dxp:Cpa name="stuff" delim="|">Here is blurb1|Here is blurb2</dxp:Cpa>
Note: an explicit delimiter is used to separate content items
 <dxp:Cpa name="stuff">Here is blurb1, which includes blurb2</dxp:Cpa>
Note: the content section does not have a specified delimiter so this is stored as one item.

The content form is useful if you need to write a large block of text or include quotation marks in the text.


@author Mark Ashworth
@version 0.2, 2001-06-04

Return to Index

Note: We have tried to test all of the code examples but they may contain errors. Any questions, comments, suggestions, or problems should be sent to info@plands.com.