public class ConfigToadlet extends Toadlet implements LinkEnabledCallback
http://.../config/
.HANDLE_METHOD_PREFIX
Constructor and Description |
---|
ConfigToadlet(HighLevelSimpleClient client,
Config conf,
SubConfig subConfig,
Node node,
NodeClientCore core) |
ConfigToadlet(HighLevelSimpleClient client,
Config conf,
SubConfig subConfig,
Node node,
NodeClientCore core,
FredPluginConfigurable plugin) |
ConfigToadlet(java.lang.String directoryBrowserPath,
HighLevelSimpleClient client,
Config conf,
SubConfig subConfig,
Node node,
NodeClientCore core) |
ConfigToadlet(java.lang.String directoryBrowserPath,
HighLevelSimpleClient client,
Config conf,
SubConfig subConfig,
Node node,
NodeClientCore core,
FredPluginConfigurable plugin) |
Modifier and Type | Method and Description |
---|---|
static HTMLNode |
addBooleanComboBox(boolean value,
java.lang.String fullName,
boolean disabled)
Generates a drop-down combobox for a true/false option suitable for
adding to an existing form.
|
static HTMLNode |
addComboBox(java.lang.String value,
EnumerableOptionCallback o,
java.lang.String fullName,
boolean disabled)
Generates a drop-down combobox for the given enumerable option suitable
for adding to an existing form.
|
static HTMLNode |
addTextBox(java.lang.String value,
java.lang.String fullName,
Option<?> o,
boolean disabled)
Generates a text box for the given setting suitable for adding to an
existing form.
|
void |
handleMethodGET(java.net.URI uri,
HTTPRequest req,
ToadletContext ctx)
Handle a GET request.
|
void |
handleMethodPOST(java.net.URI uri,
HTTPRequest request,
ToadletContext ctx) |
boolean |
isEnabled(ToadletContext ctx)
Whether to show the link?
|
java.lang.String |
path() |
addHomepageLink, allowPOSTWithoutPassword, findSupportedMethods, getClientImpl, sendErrorPage, sendErrorPage, sendErrorPage, showAsToadlet, showAsToadlet, writeHTMLReply, writeHTMLReply, writeHTMLReply, writeInternalError, writeReply, writeReply, writeReply, writeReply, writeReply, writeReply, writeTemporaryRedirect, writeTextReply, writeTextReply
public ConfigToadlet(java.lang.String directoryBrowserPath, HighLevelSimpleClient client, Config conf, SubConfig subConfig, Node node, NodeClientCore core)
public ConfigToadlet(HighLevelSimpleClient client, Config conf, SubConfig subConfig, Node node, NodeClientCore core)
public ConfigToadlet(java.lang.String directoryBrowserPath, HighLevelSimpleClient client, Config conf, SubConfig subConfig, Node node, NodeClientCore core, FredPluginConfigurable plugin)
public ConfigToadlet(HighLevelSimpleClient client, Config conf, SubConfig subConfig, Node node, NodeClientCore core, FredPluginConfigurable plugin)
public void handleMethodPOST(java.net.URI uri, HTTPRequest request, ToadletContext ctx) throws ToadletContextClosedException, java.io.IOException, RedirectException
ToadletContextClosedException
java.io.IOException
RedirectException
public void handleMethodGET(java.net.URI uri, HTTPRequest req, ToadletContext ctx) throws ToadletContextClosedException, java.io.IOException
Toadlet
handleMethodGET
in class Toadlet
uri
- The URI being fetched.req
- The original HTTPRequest, convenient for e.g. fetching ?blah=blah parameters.ctx
- The request context. Mainly used for sending a reply; this identifies which
request we are replying to. Also gives access to lots of important objects e.g. PageMaker.ToadletContextClosedException
java.io.IOException
public static HTMLNode addTextBox(java.lang.String value, java.lang.String fullName, Option<?> o, boolean disabled)
value
- The current value of the option. It is displayed in the text
box.fullName
- The full name of the option, used to name the text field.o
- The option, used to add the short description as an "alt"
attribute.disabled
- Whether the text box should be disabled.public static HTMLNode addComboBox(java.lang.String value, EnumerableOptionCallback o, java.lang.String fullName, boolean disabled)
value
- The currently applied value of the option.o
- The option, used to list all values.fullName
- The full name of the option, used to name the drop-down.disabled
- Whether the drop-down should be disabled.public static HTMLNode addBooleanComboBox(boolean value, java.lang.String fullName, boolean disabled)
value
- The current value of the option. This will be selected.fullName
- The full name of the option, used to name the drop-down.disabled
- Whether the drop-down should be disabled.public boolean isEnabled(ToadletContext ctx)
LinkEnabledCallback
isEnabled
in interface LinkEnabledCallback
ctx
- The request which is asking. Can be null.