sgvizler.form Class
Handles all UI business for the HTML form for writing, issuing and drawing sgvizler queries.
Dependencies:
- sgvizler.util
- sgvizler.namespace
- sgvizler.registry
- sgvizler.Query
Item Index
Methods
Methods
createPage
-
[elementID=body]
-
UItype
Draws an intitially empty form on page. If elementID is provided only the form and container for chart is drawn; otherwise, a complete page, with header, logo and footer, is draw directly in the body element.
displayChartTypesMenu
()
private
Populates the drop-down menu of available chart types
with the registered chart types found in the
sgvizler.registry
, grouped by modules.
displayPrefixes
()
private
Displays the prefixes set in sgvizler.namespace
as
SPARQL prefix declarations in the designated container.
displayUI
()
private
Displays prefix information, query information and
selections in the form, using other displayX
methods.
displayUserInput
-
query
Displays query information in the form input fields, e.g., the query string, query format, chart dimensions, set in the input parameter.
Parameters:
-
query
sgvizler.Query
getUrlParams
-
[urlparams]
Parses the current URL for parameters. Permissible
parameters are, if present, those listed in the input
of this method, or in the array
permissible_urlparams
.
Parameters:
-
[urlparams]
Array optional
Returns:
A list of parameter--value pairs.
isElement
-
elementID
Tests if there really is an element with the give element id.
Parameters:
-
elementID
StringThe element Id
Returns:
Returns true iff the element with this element id exists.
setElementText
-
elementID
-
text
Set the text for a given element. Is used to set the
text contents of containers. Uses jQuery.text
.
setElementValue
-
elementID
-
value
Set a value for a given element. Is used to set the
value of form input fields. Uses jQuery.val
.
Parameters:
-
elementID
StringThe element id of the element to set value for.
-
value
PrimitiveThe value to set.