public class AddOrderMenuItem extends MenuItemWidget
Constructor and Description |
---|
AddOrderMenuItem() |
Modifier and Type | Method and Description |
---|---|
String |
getBeforeShowScript(RestRequest req,
RestResponse res)
Optional Javascript to execute immediately before a menu item is shown.
|
Object |
getContent(RestRequest req,
RestResponse res)
The content of the popup.
|
String |
getLabel(RestRequest req,
RestResponse res)
The label for the menu item as it's rendered in the menu bar.
|
getAfterShowScript, getHtml, getScript, getStyle
getClasspathResourceAsString, getClasspathResourceAsString, getHtml, getHtml, getName, getScript, getScript, getStyle, getStyle, loadHtml, loadHtmlWithVars, loadScript, loadScriptWithVars, loadStyle, loadStyleWithVars
public AddOrderMenuItem()
public String getLabel(RestRequest req, RestResponse res) throws Exception
MenuItemWidget
getLabel
in class MenuItemWidget
req
- The HTTP request object.res
- The HTTP response object.Exception
- Error occurred.public String getBeforeShowScript(RestRequest req, RestResponse res) throws Exception
MenuItemWidget
For example, the following shows how the method could be used to make an AJAX call back to the REST interface to populate a SELECT element in the contents of the popup dialog:
Note that it's often easier (and cleaner) to use the Widget.loadScript(String)
method and read the Javascript from
your classpath:
getBeforeShowScript
in class MenuItemWidget
req
- The HTTP request object.res
- The HTTP response object.Exception
- Error occurred.public Object getContent(RestRequest req, RestResponse res) throws Exception
MenuItemWidget
getContent
in class MenuItemWidget
req
- The HTTP request object.res
- The HTTP response object.Reader
- Serialized directly to the output.
CharSequence
- Serialized directly to the output.
HtmlSerializer.DEFAULT
.
org.apache.juneau.dto.html5
beans.
Exception
- Error occurred.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.