API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.web.widget. JOTWidgetBase View Source
Author(s)
thibautc
Since
Version
Serial
Hierarchy
 Object
      JOTWidgetBase
Implements
 JOTAjaxProvider
Subclasses
Description
publicabstract abstract class JOTWidgetBase
  Widget Base (Ajax enabled).
See also:   
Constructors
public JOTWidgetBase ()
Methods
Hide/Show inherited methods
publicabstract void customizeProperties ()
Add/Update widget options to this in customizeProperties() Ex: properties.addProperty(PROP_BG_COLOR,new JOTWidgetProperty(JOTWidgetProperty.TYPE_TEXT,null,"#FF0000"));
publicstatic String decodeCommas (String value)
  Put the commas back after parsing the args.
public void dumpWidgetProperties ()
publicstatic String encodeCommas (String value)
  When passing arguments to a widget they are comma separated, do if an arg value contains a comma this causes problems, so use encodeCommas(argValue) to encode the commas in your args value.
public void executeAjaxCall (JOTFlowRequest request, HttpServletResponse response) throws Exception [Specified in JOTAjaxProvider]
publicabstract String getAjaxCallbackJavascript ()
  javascript code (without javascript tags) to be run when Ajax call returns.
public int getId ()
public String getJscriptCallbackFunctionName () [Specified in JOTAjaxProvider]
public String getJscriptFuncName () [Specified in JOTAjaxProvider]
protectedsynchronized int getNextUniqueId ()
  We want each widget in the "page" to have a unique id, to avoid issues with same widget several time in same page So we create a unique id in the request scope which shoudl provide what we wat here.
public JOTWidgetBaseProperties getProperties ()
publicabstract String getShortName ()
  Returns a shortname for your widget (<25 chars)
public void init (HttpServletRequest request, HttpServletResponse response)
  "Manual" constructor
public void init (JOTView view)
Standard widdget constructor, calls customizeProperties
public boolean isAjaxEnabled ()
  Can be ovveriden to disable ajax
protected Hashtable parseArgs (String args)
  Parse the args String
public void parseProperties (JOTFlowRequest request)
public void prepareViewData () throws Exception
  Will be called when the ajax call is made.
public String render (String args)
  Will be called by jot, when a widget is found in a view.
public String renderPropertiesScreen (int id)
publicabstract String renderWidget (Hashtable args)
  Renders the HTML code content for the widget
publicabstract Hashtable widgetAjaxCall (JOTFlowRequest request)
  Process the ajax call and return updated data (key/value) to be processed by the callbackJavacsript
Fields
Hide/Show inherited fields
protectedfinalstatic Pattern ARG_PATTERN
public JOTWidgetBaseProperties properties
public JOTFlowRequest request
public HttpServletResponse response
public HttpSession session
public int uniqueId
protected JOTView view
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar