New RemoteMethod.returns() annotation.
Allows you to specify whether the remote method returns the HTTP body or status code.
Fixed bugs with BEAN_includeProperties and BEAN_excludeProperties settings.
New/modified settings in HtmlDocSerializerContext:
HTMLDOC_script
HTMLDOC_style - Was HTMLDOC_css.
HTMLDOC_stylesheet - Was HTMLDOC_cssUrl. Now an array.
New ResourceFinder utility class.
Allows you to search for resources up the parent hierarchy chain.
Also allows you to search for localized resources.
Eliminated the following properties from HtmlDocSerializerContext:
HTMLDOC_title, HTMLDOC_description, HTMLDOC_description See below on changes to simplify HTML headers.
{@link oaj.svl.Var} implementations can now throw exceptions and will be converted to
""{exceptionMessage}" values.
org.apache.juneau.rest
New 'light' stylesheet:
Compared with previous 'devops':
For those nolstalgic for old times, there's also 'original':
Simplified the stylesheets and HTML code.
For example, the nav links are now an ordered list of elements which makes rendering as as side-bar
(for example) easier to do in CSS.
Modifications to the following @HtmlDoc annotations:
{@link oajr.annotation.HtmlDoc#navlinks() navlinks()} - Now an array of strings instead of a JSON object. Simplified syntax.
For example:
Previous syntax will still work, but you're encouraged to use the simplified syntax.
Several annotations are now arrays of strings instead of simple strings.
Values are simply concatenated with newlines which makes multi-line values cleaner.
{@link oajr.annotation.HtmlDoc#header() header()}
{@link oajr.annotation.HtmlDoc#nav() nav()}
{@link oajr.annotation.HtmlDoc#aside() aside()}
{@link oajr.annotation.HtmlDoc#footer() footer()}
{@link oajr.annotation.HtmlDoc#script() script()}
{@link oajr.annotation.HtmlDoc#style() style()}
Additionally, the "INHERIT" string literal can be used to combine the value with
the value defined on the servlet or parent class. Links can also be inserted at specific
index positions.
Improvements made to the {@link oajr.widget.Widget} API.
You can now add arbitrary CSS and Javascript along with your widgets through new methods:
Widget#getHtml(RestRequest)
Widget#getScript(RestRequest)
Widget#getStyle(RestRequest)
Declaration of widgets moved to {@link oajr.annotation.HtmlDoc#widgets() @HtmlDoc(widgets)}
instead of separately on @RestResource and @RestMethod annotations.
{@link oajr.widget.Widget#getName()} now defaults to the simple class name.
So now you can just refer to the class name: "$W{ContentTypeMenuItem}".
Renamed widgets:
PoweredByApacheWidget -> PoweredByApache
PoweredByJuneauWidget -> PoweredByJuneau
New {@link oajr.widget.MenuItemWidget} can be used as a starting point for creatint pull-down menu items.
New {@link oajr.widget.ContentTypeMenuItem} widget that provides a pull-down menu
with hyperlinks for all supported languages for that page:
Improved {@link oajr.widget.QueryMenuItem} widget that provides a pull-down menu
of a search/view/order-by/page form:
Fields are now pre-filled with current query parameters.
New {@link oajr.widget.ThemeMenuItem} widget that provides a pull-down menu
with hyperlinks to show the content in the default stylesheets:
New/modified annotations on {@link oajr.annotation.HtmlDoc @HtmlDoc}:
{@link oajr.annotation.HtmlDoc#style() style()} - Renamed from css().
{@link oajr.annotation.HtmlDoc#stylesheet() stylesheet()} - Renamed from cssUrl().
Can now be a comma-delimited list of URLs.
{@link oajr.annotation.HtmlDoc#script() script()} - Add arbitrary Javascript to page header.
Bug fix with {@link oajr.annotation.HtmlDoc#nowrap() @HtmlDoc(nowrap)} so that the setting only applies
to the data contents, not the whole page.
Two convenience methods added to {@link oajr.RestRequest}:
Note that the subtitle first tries using the method summary and then the servlet description.
New {@link oajr.vars.FileVar $F} variable resolver for resolving the contents of
files in the classpath.
The DockerRegistryResource examples shows how it can be used to pull in a localized
file from the classpath to populate the aside section of a page.
htmldoc=@HtmlDoc(
// Pull in aside contents from file.
aside="$F{resources/DockerRegistryResourceAside.html}"
)
New ReaderResource.toCommentStrippedString() method.
The bpIncludes() and bpExcludes() annotations on @RestMethod
has been replaced with the following:
{@link oajr.annotation.RestMethod#bpi() bpi()} - Now an array of simplified values instead of LAX JSON.
{@link oajr.annotation.RestMethod#bpx() bpx()} - Now an array of simplified values instead of LAX JSON.
Two new variables added to $R variable: "$R{servletClass}", "$R{servletClassSimple}"
org.apache.juneau.rest.examples
Added CONTENT-TYPE and STYLES menu items to most pages.