org.ceryle.wiki.form
Class FormSelect

java.lang.Object
  extended by com.ecyrd.jspwiki.forms.FormElement
      extended by com.ecyrd.jspwiki.forms.FormSelect
          extended by org.ceryle.wiki.form.FormSelect
All Implemented Interfaces:
WikiPlugin

public class FormSelect
extends FormSelect

Adds the ability populate the select list from a Search (query='foo*'), a Query (pages='TO [Foo]') and by explicitly specifying a value list (value='A;*B;C'). (One or more of these can be used together and the result is their union.)

   [{FormSelect values='Argh;*Bah;Cough' query='foo*' max=10 pages='TO [Foo]'
        selected='FooBaz' sorted='true'}]
 

Additionally adds params 'sort' and 'selected'. If (sort='true') the resulting value list will be sorted alphabetically; if not set, then the explicit values are first, then the Query results, then the Search results.

If a selected value (selected='Foobaz') is given, it is looked for in the resulting values list and marked as the default selected value. This allows for a default selection when either the Query or Search form the basis of the value list. (Yes in the example above it was pointless to have 'Bah' lead with a '*'.)

Also, users can specify 'max' (max=10) to limit how many items are added to the list by a Search (But not by a Query, don't ask why, I just didn't do it okay!)

Author:
Murray Altheim, John Volkar (john.volkar at gmail.com)

Field Summary
 
Fields inherited from class com.ecyrd.jspwiki.forms.FormElement
FORM_VALUES_CARRIER, HANDLERPARAM_PREFIX, HIDE_SUCCESS, PARAM_ELEMENT, PARAM_FORM, PARAM_FORMNAMEHIDDEN, PARAM_HANDLER, PARAM_HIDEFORM, PARAM_INPUTNAME, PARAM_POPULATE, PARAM_SUBMITHANDLER, PARAM_VALUE
 
Fields inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin
CORE_PLUGINS_RESOURCEBUNDLE
 
Constructor Summary
FormSelect()
           
 
Method Summary
 String execute(WikiContext context, Map params)
           
 
Methods inherited from class com.ecyrd.jspwiki.forms.FormElement
getFormInfo, storeFormInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormSelect

public FormSelect()
Method Detail

execute

public String execute(WikiContext context,
                      Map params)
               throws PluginException
Specified by:
execute in interface WikiPlugin
Overrides:
execute in class FormSelect
Throws:
PluginException


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.