Package org.apache.juneau.html
Interface HtmlWidget
- All Known Implementing Classes:
- ContentTypeMenuItem,- MenuItemWidget,- PoweredByApache,- PoweredByJuneau,- QueryMenuItem,- ThemeMenuItem,- Widget
public interface HtmlWidget
Defines an interface for resolvers of "$W{...}"  string variables.
 
Widgets must provide one of the following public constructors:
- public Widget();
Widgets can be defined as inner classes of REST resource classes.
See Also:
- 
Method SummaryModifier and TypeMethodDescriptiongetHtml(VarResolverSession session) Resolves the HTML content for this widget.getName()The name for this widget.getScript(VarResolverSession session) Resolves any Javascript that should be added to the<head>/<script> element.getStyle(VarResolverSession session) Resolves any CSS styles that should be added to the<head>/<style> element.
- 
Method Details- 
getNameThe name for this widget.- Returns:
- A unique identifying name for this widget.
 
- 
getHtmlResolves the HTML content for this widget.A returned value of null will cause nothing to be added to the page.- Parameters:
- session- The current serializer session.
- Returns:
- The HTML content of this widget.
 
- 
getScriptResolves any Javascript that should be added to the<head>/<script> element.A returned value of null will cause nothing to be added to the page.- Parameters:
- session- The current serializer session.
- Returns:
- The Javascript needed by this widget.
 
- 
getStyleResolves any CSS styles that should be added to the<head>/<style> element.A returned value of null will cause nothing to be added to the page.- Parameters:
- session- The current serializer session.
- Returns:
- The CSS styles needed by this widget.
 
 
-