Package com.groiss.gui
Class WebUtils
java.lang.Object
com.groiss.gui.WebUtils
Miscellanea data retrieval methods used in a Web tier.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JSONPage
can be used by ObjectSelect-widgets to query for agents (either roles or users)
possible parameters are: role,application,orgunit,noEmptyEntry,includeRoleToo
currently it's only possible to search for users and optionally include the given role toostatic JSONPage
genJSONPage
(Collection<? extends KeyValuePair<String, String>> p) static JSONPage
genJSONPage
(Collection<? extends KeyValuePair<String, String>> p, String id, String label, Boolean showNull) static JSONPage
getJSONObjectSelect
(Map<String, String> params) Returns holidays for the date picker in JSON format.static Page
Performs the search using the criteria, specified as request parameters, and returns the JSON-encoded page with the content of found entries.
-
Constructor Details
-
WebUtils
public WebUtils()
-
-
Method Details
-
jsonObjectSelect
Performs the search using the criteria, specified as request parameters, and returns the JSON-encoded page with the content of found entries.- Parameters:
req
- current request- Throws:
Exception
- in case of an error
-
jsonHolidays
Returns holidays for the date picker in JSON format.- Parameters:
req
- current request- Throws:
Exception
-
agentSelect
can be used by ObjectSelect-widgets to query for agents (either roles or users)
possible parameters are: role,application,orgunit,noEmptyEntry,includeRoleToo
currently it's only possible to search for users and optionally include the given role too- Parameters:
req
- the request- Throws:
Exception
-
genJSONPage
- Parameters:
p
- a list of elements. The key of the com.groiss.ds.Pair is the value of the option. The value of the Pair is the label of the option- Returns:
- a JSONPage filling the Dojo Select
- Throws:
JSONException
-
genJSONPage
public static JSONPage genJSONPage(Collection<? extends KeyValuePair<String, String>> p, String id, String label, Boolean showNull) -
getJSONObjectSelect
- Parameters:
params
- a map containing all configuration parameters for the dojo select- Returns:
- a JSONPage filling the dojo options
- Throws:
Exception
-