public class AddOrderMenuItem extends MenuItemWidget
Constructor and Description |
---|
AddOrderMenuItem() |
Modifier and Type | Method and Description |
---|---|
String |
getBeforeShowScript(RestRequest req)
Optional Javascript to execute immediately before a menu item is shown.
|
Object |
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.
|
getAfterShowScript, getHtml, getScript, getStyle
getClasspathResourceAsString, getClasspathResourceAsString, getName, loadHtml, loadHtmlWithVars, loadScript, loadScriptWithVars, loadStyle, loadStyleWithVars
public AddOrderMenuItem()
public String getLabel(RestRequest req) throws Exception
MenuItemWidget
getLabel
in class MenuItemWidget
req
- The HTTP request object.Exception
public String getBeforeShowScript(RestRequest req) 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 current request.Exception
public Object 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.