Creates a Drop Select field for use in web forms.
Parameters
Usage:
[{DropSelect options='A,B,C' name='testValue' action='' value='B'}]
Alternative Usage:
[{DropSelect options='/OpenForum/Extensions/DropSelect/ExampleListPage' name='testValue' action=''}]
renderer.sjs options = extension.getAttributeValueByName("options");
name = extension.getAttributeValueByName("name");
action = extension.getAttributeValueByName("action");
value = extension.getAttributeValueByName("value");
if(value==null)
{
value="&"+name+";";
}
if(action==null)
{
action="";
}
//cast to JS strings
value = new String(value);
options = new String(options);
reference = null;
if(options.charAt(0)=='/')
{
reference = options;
optionsArray = wiki.getPageAsList(options);
// cast Java Strings to JS Strings
options = new Array();
for(loop=0;loop";
for(loop=0;loop"+options[loop]+"\n";
}
else
{
data += " \n";
}
}
data += "\n";
if(reference!=null)
{
data += " \n";
}
data += "\n"
return data;by NikCross on 21/04/2008 at 10:08 PM |
|