public class QueryMenuItem extends MenuItemWidget
The variable it resolves is
This widget is designed to be used in conjunction with the Queryable
converter, although implementations
can process the query parameters themselves if they wish to do so by using the RequestQuery.getSearchArgs()
method to retrieve the arguments and process the data themselves.
An example of this widget can be found in the PetStoreResource
in the examples that provides
search/view/sort capabilities against the collection of POJOs:
It renders the following popup-box:
Tooltips are provided by hovering over the field names.
When submitted, the form submits a GET request against the current URI with special GET search API query parameters.
(e.g.
The Queryable
class knows how to perform these filters against collections of POJOs.
Constructor and Description |
---|
QueryMenuItem() |
Modifier and Type | Method and Description |
---|---|
String |
getContent(RestRequest req)
The content of the popup.
|
String |
getLabel(RestRequest req)
The label for the menu item as it's rendered in the menu bar.
|
String |
getStyle(RestRequest req)
Returns CSS for the tooltips.
|
getHtml, getScript
getClasspathResourceAsString, getClasspathResourceAsString, getName, loadHtml, loadScript, loadStyle
public QueryMenuItem()
public String getStyle(RestRequest req) throws Exception
getStyle
in class MenuItemWidget
req
- The HTTP request object.Exception
public String getLabel(RestRequest req) throws Exception
MenuItemWidget
getLabel
in class MenuItemWidget
req
- The HTTP request object.Exception
public String getContent(RestRequest req) throws Exception
MenuItemWidget
getContent
in class MenuItemWidget
req
- The HTTP request object.Reader
- Serialized directly to the output.
CharSequence
- Serialized directly to the output.
HtmlSerializer.DEFAULT
.
org.apache.juneau.dto.html5
beans.
Exception
Copyright © 2018 Apache. All rights reserved.