combobox.param {AnalysisPageServer} | R Documentation

## combobox.param

### Description

Build a combobox AnalysisPageParam

### Usage

    combobox.param(name, ..., uri, dependent.params, prompt = "Enter search term",
      n.param = NULL, allow.multiple = FALSE, response.type = "simple",
      persistent = NULL, extra.persistent.dependencies = NULL, delay.ms = 0)

### Arguments

`name` | Name of form element
`...` | Passed through to `simple.param`. This includes at least "name", optionally "label", "description" and "value", but not "type".
`uri` | URI, possibly with :-prefixed parameter names. For example "/get?x=:x;y=:y" has parameters "x" and "y". (See `dependent.params` next)
`dependent.params` | A character vector whose names are parameters from the uri, and whose values are the names of other form elements.
`prompt` | A prompt to display in disabled style before user starts typing (for self-dependent comboboxes only). Default is "Enter search term".
`n.param` | The name of a parameter that controls the maximum number of search hits, if the URL has such a parameter. Default is NULL, which means it does not have a parameter. If it does have such a parameter, then 0 means to return all hits, and otherwise a positive integer will limit the number of hits returned.
`allow.multiple` | If TRUE then render search hits as checkbox group and allow multiple selections. (The function will be provided a vector of all selected values.) If the search term changes then the old values are still accumulated. If other dependent parameter changes then they are reset. Default: FALSE
`response.type` | A string. "simple" means that the response will be a simple array of strings. The "id-long_name-reason" type is a special type for search hits, where an array of hashes is returned, each hash having "id", "long_name" and "reason" components.
`persistent` | Character or NULL. If non-NULL then it is passed to the front-end. It names a variable in persistent storage that should be used to initialize the value of the parameter. The front end will provide some mechanism to change the persistent value, but until the user does so the param will be initialized from the value in the persistent space.
`extra.persistent.dependencies` | Character vector specifying names of other parameters on which this one is conditionally persistent. See arg `persistent.dependencies` in `simple.param`. Whatever is provided in `extra.persistent.dependencies` is taken in addition to with `unname(dependent.params)`. This is because if a combobox is persistent then it must be so conditional on its dependent parameters. It is an error to specify this for a non-persistent parameter.
`delay.ms` | Delay, in milliseconds, that the front-end should wait after keystrokes or paste before submitting queries. Default, 0, means no delay.

### Details

Build a combobox AnalysisPageParam. This is a widget with both text and drop-down. However, the values in the drop-down depend on an AJAX query whose URI is built from current form element values, possibly including the current widget (namely the text typed so far). The drop-down values should be updated whenever one of the depenedent elements changes.

### Value

An AnalysisPageParam

### Author(s)

Brad Friedman

### Examples

      ## Note the :query parameter is dependent on the same gene element. This makes it a type-ahead query.
      gene <- combobox.param(name="gene", uri="/find_gene_id/:genome/:query/", dependent.params=c(genome="genome", query="gene"), response.type="id-long_name-reason")

[Package AnalysisPageServer version 1.18.1 Index]