com.pepper.script
Class Elements

java.lang.Object
  extended by com.pepper.script.Elements

public class Elements
extends Object

This class implements the pepper: namespace XSL extension elements.


Constructor Summary
Elements()
           
 
Method Summary
static Element checkbox(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
           
static String formatDate(String timestamp, int style)
          Format a timestamp in the current locale's preferred date/time format.
static Element initscriptbridge(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          initscriptbridge - Init script bridge page element.
static void pagebar(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          pagebar - pagebar extension element.
static void pagebarentry(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          pagebarentry - pagebarentry extension element.
static void pagebarnextpreventry(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          pagebarnextpreventry - pagebarentry next/prev buttons extension element.
static void pagebarspacer(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          pagebarspacer - pagebarspacer extension element.
static Element radiobutton(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          This supports radio buttons in xsl with the ability to automatically get/set values from the xml.
static String textString(String packageId, String key)
          Simple method call entry point
static String textString(String packageId, String key, String args)
          Looks up a string from a package's message catalog
static Node textString(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          TextString extension element Returns a text message from the message catalog Format package - the id for the package that owns the strings key - name of text key in catalog args - optional list of comma separated string args for the message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elements

public Elements()
Method Detail

initscriptbridge

public static Element initscriptbridge(org.apache.xalan.extensions.XSLProcessorContext context,
                                       org.apache.xalan.templates.ElemExtensionCall elem)
                                throws ParserConfigurationException,
                                       Exception
initscriptbridge - Init script bridge page element. NOTE: This element must be included on every page that uses any of the other pepper: extension elements. Format: package - Pepper Package ID string.

Throws:
ParserConfigurationException
Exception

checkbox

public static Element checkbox(org.apache.xalan.extensions.XSLProcessorContext context,
                               org.apache.xalan.templates.ElemExtensionCall elem)
                        throws ParserConfigurationException,
                               Exception
Throws:
ParserConfigurationException
Exception

radiobutton

public static Element radiobutton(org.apache.xalan.extensions.XSLProcessorContext context,
                                  org.apache.xalan.templates.ElemExtensionCall elem)
                           throws ParserConfigurationException,
                                  Exception
This supports radio buttons in xsl with the ability to automatically get/set values from the xml. This method will set the radio button to checked if the "storedvalue" attribute, which comes from the xml document, matches the "value" attribute which is set for the radio button. This also supports the "default" attribute, which specifies which radio button to select by default if "storedvalue" is null. Here is an example usage:
 New Window

New Tab
Existing Tab

Parameters:
context - a XSLProcessorContext value
elem - an ElemExtensionCall value
Returns:
an Element value
Throws:
ParserConfigurationException - if an error occurs
Exception - if an error occurs

pagebar

public static void pagebar(org.apache.xalan.extensions.XSLProcessorContext context,
                           org.apache.xalan.templates.ElemExtensionCall elem)
                    throws ParserConfigurationException,
                           Exception
pagebar - pagebar extension element. Format: : class - CSS class name of the pagebar. id - id of the pagebar. id is set to pagebar-'package'. this string is key for event processing package - the id of the package, optional, for use with message keys

Throws:
ParserConfigurationException
Exception

pagebarentry

public static void pagebarentry(org.apache.xalan.extensions.XSLProcessorContext context,
                                org.apache.xalan.templates.ElemExtensionCall elem)
                         throws ParserConfigurationException,
                                Exception
pagebarentry - pagebarentry extension element. Format: text - button text key - key into text message catalog (use either text or key, not both) OR image - button image file pathname OR systemimage - system button image file name (platformDir + "/resources/buttons" is assumed) OR args - optional list of comma separated string args for the text key action - action method to be called param - optional action method parameter OR paramnoquote - same but requests that it not be quoted, as in jscript script - optional script (use either action or script, not both) hardware - if this attr is present, its value must be returned from Hardware.capabilities() or the pagebarentry is not created This method does not return an element or output anything to the tree directly it relies on the pagebar extension to do this

Throws:
ParserConfigurationException
Exception

pagebarnextpreventry

public static void pagebarnextpreventry(org.apache.xalan.extensions.XSLProcessorContext context,
                                        org.apache.xalan.templates.ElemExtensionCall elem)
                                 throws ParserConfigurationException,
                                        Exception
pagebarnextpreventry - pagebarentry next/prev buttons extension element. Format: key - key into text message catalog args - optional list of comma separated string args for the text key This method does not return an element or output anything to the tree directly it relies on the pagebar extension to do this

Throws:
ParserConfigurationException
Exception

pagebarspacer

public static void pagebarspacer(org.apache.xalan.extensions.XSLProcessorContext context,
                                 org.apache.xalan.templates.ElemExtensionCall elem)
                          throws ParserConfigurationException,
                                 Exception
pagebarspacer - pagebarspacer extension element. Format:

Throws:
ParserConfigurationException
Exception

textString

public static Node textString(org.apache.xalan.extensions.XSLProcessorContext context,
                              org.apache.xalan.templates.ElemExtensionCall elem)
                       throws ParserConfigurationException,
                              Exception
TextString extension element Returns a text message from the message catalog Format package - the id for the package that owns the strings key - name of text key in catalog args - optional list of comma separated string args for the message

Throws:
ParserConfigurationException
Exception

textString

public static String textString(String packageId,
                                String key)
Simple method call entry point

Parameters:
packageId - String naming the package id
key - String representing the message key

textString

public static String textString(String packageId,
                                String key,
                                String args)
Looks up a string from a package's message catalog

Parameters:
packageId - String naming the package id
key - String representing the message key
args - Comma separated list of arguments for the message

formatDate

public static String formatDate(String timestamp,
                                int style)
Format a timestamp in the current locale's preferred date/time format.

Parameters:
timestamp - Java timestamp as a string
style - 0 for Date only, 1 for time only, 2 for date + time
Returns:
Timestamp formatted as a string


Copyright © 2006-2007 Pepper Computer, Inc. All Rights Reserved.