http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html b/content/site/apidocs/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html index 1b41e8f..eef1d82 100644 --- a/content/site/apidocs/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html +++ b/content/site/apidocs/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html @@ -49,7 +49,7 @@ var activeTableTab = "activeTableTab"; <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/apache/juneau/rest/widget/PoweredByApacheWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> -<li><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> +<li><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" target="_top">Frames</a></li> @@ -113,12 +113,31 @@ var activeTableTab = "activeTableTab"; <li class="blockList"> <hr> <br> -<pre>public class <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.23">PoweredByJuneauWidget</a> +<pre>public class <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.43">PoweredByJuneauWidget</a> extends <a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></pre> <div class="block">Widget that places a powered-by-Juneau message on the page. <p> - The variable it resolves is <js>"$W{poweredByJuneau}"</js>.</div> + The variable it resolves is <js>"$W{poweredByJuneau}"</js>. + + <p> + It produces a simple Apache Juneau icon floating on the right. + Typically it's used in the footer of the page, as shown below in the <code>AddressBookResource</code> from the examples: + + <p class='bcode'> + <ja>@RestResource</ja>( + path=<js>"/addressBook"</js>, + widgets={ + PoweredByJuneauWidget.<jk>class</jk> + }, + htmldoc=<ja>@HtmlDoc</ja>( + footer=<js>"$W{poweredByJuneau}"</js> + ) + </p> + + <p> + It renders the following image: + <img class='bordered' src='doc-files/PoweredByJuneauWidget.png'></div> </li> </ul> </div> @@ -156,18 +175,25 @@ extends <a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#getName--">getName</a></span>()</code> -<div class="block">The widget key (i.e.</div> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#getHtml-org.apache.juneau.rest.RestRequest-">getHtml</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> +<div class="block">Returns an Apache Juneau image tag hyperlinked to <js>"http://juneau.apache.org"</js></div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#resolve-org.apache.juneau.rest.RestRequest-">resolve</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> -<div class="block">Resolves the value for the variable.</div> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#getName--">getName</a></span>()</code> +<div class="block">Returns <js>"poweredByJuneau"</js>.</div> </td> </tr> </table> <ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.rest.widget.Widget"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.juneau.rest.widget.<a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></h3> +<code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-">getResourceAsString</a>, <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-java.util.Locale-">getResourceAsString</a>, <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getScript-org.apache.juneau.rest.RestRequest-">getScript</a>, <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getStyle-org.apache.juneau.rest.RestRequest-">getStyle</a></code></li> +</ul> +<ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> @@ -194,7 +220,7 @@ extends <a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title <ul class="blockListLast"> <li class="blockList"> <h4>PoweredByJuneauWidget</h4> -<pre>public <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.23">PoweredByJuneauWidget</a>()</pre> +<pre>public <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.43">PoweredByJuneauWidget</a>()</pre> </li> </ul> </li> @@ -211,35 +237,32 @@ extends <a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title <ul class="blockList"> <li class="blockList"> <h4>getName</h4> -<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.26">getName</a>()</pre> -<div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">Widget</a></code></span></div> -<div class="block">The widget key (i.e. The contents of the <js>"$W{...}"</js> variable).</div> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.49">getName</a>()</pre> +<div class="block">Returns <js>"poweredByJuneau"</js>.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">getName</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> <dt><span class="returnLabel">Returns:</span></dt> -<dd>The widget key. - Must not be <jk>null</jk>.</dd> +<dd>The widget key.</dd> </dl> </li> </ul> -<a name="resolve-org.apache.juneau.rest.RestRequest-"> +<a name="getHtml-org.apache.juneau.rest.RestRequest-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> -<h4>resolve</h4> -<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.31">resolve</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) +<h4>getHtml</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/PoweredByJuneauWidget.html#line.57">getHtml</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> -<div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#resolve-org.apache.juneau.rest.RestRequest-">Widget</a></code></span></div> -<div class="block">Resolves the value for the variable.</div> +<div class="block">Returns an Apache Juneau image tag hyperlinked to <js>"http://juneau.apache.org"</js></div> <dl> -<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> -<dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#resolve-org.apache.juneau.rest.RestRequest-">resolve</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getHtml-org.apache.juneau.rest.RestRequest-">getHtml</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>req</code> - The HTTP request object.</dd> <dt><span class="returnLabel">Returns:</span></dt> -<dd>The resolved value.</dd> +<dd>The HTML content of this widget.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> </dl> @@ -273,7 +296,7 @@ extends <a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/apache/juneau/rest/widget/PoweredByApacheWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> -<li><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> +<li><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" target="_top">Frames</a></li>
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/QueryMenuItem.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/QueryMenuItem.html b/content/site/apidocs/org/apache/juneau/rest/widget/QueryMenuItem.html new file mode 100644 index 0000000..6d5b5da --- /dev/null +++ b/content/site/apidocs/org/apache/juneau/rest/widget/QueryMenuItem.html @@ -0,0 +1,397 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>QueryMenuItem (Apache Juneau (incubating) 6.3.1-incubating-SNAPSHOT)</title> +<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="QueryMenuItem (Apache Juneau (incubating) 6.3.1-incubating-SNAPSHOT)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/juneau/rest/widget/QueryMenuItem.html" target="_top">Frames</a></li> +<li><a href="QueryMenuItem.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.juneau.rest.widget</div> +<h2 title="Class QueryMenuItem" class="title">Class QueryMenuItem</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">org.apache.juneau.rest.widget.Widget</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html" title="class in org.apache.juneau.rest.widget">org.apache.juneau.rest.widget.MenuItemWidget</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.juneau.rest.widget.QueryMenuItem</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryMenuItem.html#line.60">QueryMenuItem</a> +extends <a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html" title="class in org.apache.juneau.rest.widget">MenuItemWidget</a></pre> +<div class="block">Widget that returns a menu-item drop-down form for entering search/view/sort arguments. + + <p> + The variable it resolves is <js>"$W{queryMenuItem}"</js>. + + <p> + This widget is designed to be used in conjunction with the <a href="../../../../../org/apache/juneau/rest/converters/Queryable.html" title="class in org.apache.juneau.rest.converters"><code>Queryable</code></a> converter, although implementations + can process the query parameters themselves if they wish to do so by using the <a href="../../../../../org/apache/juneau/rest/RequestQuery.html#getSearchArgs--"><code>RequestQuery.getSearchArgs()</code></a> + method to retrieve the arguments and process the data themselves. + + <p> + An example of this widget can be found in the <code>PetStoreResource</code> in the examples that provides + search/view/sort capabilities against the collection of POJOs: + <p class='bcode'> + <ja>@RestMethod</ja>( + name=<js>"GET"</js>, + path=<js>"/"</js>, + widgets={ + QueryMenuItem.<jk>class</jk>, + }, + htmldoc=<ja>@HtmlDoc</ja>( + links=<js>"{up:'...',options:'...',query:'$W{queryMenuItem}',contentTypes:'...',source:'...'}"</js> + ), + converters=Queryable.<jk>class</jk> + ) + <jk>public</jk> Collection<Pet> getPets() { + </p> + + <p> + It renders the following popup-box: + <br><img class='bordered' src='doc-files/QueryMenuItem_1.png'> + + <p> + Tooltips are provided by hovering over the field names. + <br><img class='bordered' src='doc-files/QueryMenuItem_2.png'> + + <p> + When submitted, the form submits a GET request against the current URI with special GET search API query parameters. + <br>(e.g. <js>"?s=column1=Foo*&v=column1,column2&o=column1,column2-&p=100&l=100"</js>). + <br>The <a href="../../../../../org/apache/juneau/rest/converters/Queryable.html" title="class in org.apache.juneau.rest.converters"><code>Queryable</code></a> class knows how to perform these filters against collections of POJOs.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html#QueryMenuItem--">QueryMenuItem</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html#getHtml-org.apache.juneau.rest.RestRequest-">getHtml</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> +<div class="block">Returns the HTML for rendering the query form and tooltips.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html#getName--">getName</a></span>()</code> +<div class="block">Returns <js>"queryMenuItem"</js>.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html#getStyle-org.apache.juneau.rest.RestRequest-">getStyle</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> +<div class="block">Returns CSS for the tooltips.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.rest.widget.MenuItemWidget"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.juneau.rest.widget.<a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html" title="class in org.apache.juneau.rest.widget">MenuItemWidget</a></h3> +<code><a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html#getScript-org.apache.juneau.rest.RestRequest-">getScript</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.rest.widget.Widget"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.juneau.rest.widget.<a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></h3> +<code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-">getResourceAsString</a>, <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-java.util.Locale-">getResourceAsString</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang /Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="QueryMenuItem--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>QueryMenuItem</h4> +<pre>public <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryMenuItem.html#line.60">QueryMenuItem</a>()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getName--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getName</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryMenuItem.html#line.66">getName</a>()</pre> +<div class="block">Returns <js>"queryMenuItem"</js>.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">getName</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The widget key.</dd> +</dl> +</li> +</ul> +<a name="getStyle-org.apache.juneau.rest.RestRequest-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getStyle</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryMenuItem.html#line.74">getStyle</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Returns CSS for the tooltips.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html#getStyle-org.apache.juneau.rest.RestRequest-">getStyle</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html" title="class in org.apache.juneau.rest.widget">MenuItemWidget</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>req</code> - The HTTP request object.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The CSS styles needed by this widget.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> +</dl> +</li> +</ul> +<a name="getHtml-org.apache.juneau.rest.RestRequest-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getHtml</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryMenuItem.html#line.84">getHtml</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Returns the HTML for rendering the query form and tooltips.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getHtml-org.apache.juneau.rest.RestRequest-">getHtml</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>req</code> - The HTTP request object.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The HTML content of this widget.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/juneau/rest/widget/QueryMenuItem.html" target="_top">Frames</a></li> +<li><a href="QueryMenuItem.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2017 <a href="http://www.apache.org/">Apache</a>. All rights reserved.</small></p> +</body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/QueryWidget.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/QueryWidget.html b/content/site/apidocs/org/apache/juneau/rest/widget/QueryWidget.html deleted file mode 100644 index 805a400..0000000 --- a/content/site/apidocs/org/apache/juneau/rest/widget/QueryWidget.html +++ /dev/null @@ -1,415 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!-- NewPage --> -<html lang="en"> -<head> -<!-- Generated by javadoc --> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>QueryWidget (Apache Juneau (incubating) 6.3.1-incubating-SNAPSHOT)</title> -<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style"> -<script type="text/javascript" src="../../../../../script.js"></script> -</head> -<body> -<script type="text/javascript"><!-- - try { - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="QueryWidget (Apache Juneau (incubating) 6.3.1-incubating-SNAPSHOT)"; - } - } - catch(err) { - } -//--> -var methods = {"i0":10,"i1":10}; -var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; -var altColor = "altColor"; -var rowColor = "rowColor"; -var tableTab = "tableTab"; -var activeTableTab = "activeTableTab"; -</script> -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<!-- ========= START OF TOP NAVBAR ======= --> -<div class="topNav"><a name="navbar.top"> -<!-- --> -</a> -<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> -<a name="navbar.top.firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../overview-summary.html">Overview</a></li> -<li><a href="package-summary.html">Package</a></li> -<li class="navBarCell1Rev">Class</li> -<li><a href="package-tree.html">Tree</a></li> -<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../help-doc.html">Help</a></li> -</ul> -</div> -<div class="subNav"> -<ul class="navList"> -<li><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> -<li><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../index.html?org/apache/juneau/rest/widget/QueryWidget.html" target="_top">Frames</a></li> -<li><a href="QueryWidget.html" target="_top">No Frames</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_top"> -<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_top"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<div> -<ul class="subNavList"> -<li>Summary: </li> -<li>Nested | </li> -<li>Field | </li> -<li><a href="#constructor.summary">Constr</a> | </li> -<li><a href="#method.summary">Method</a></li> -</ul> -<ul class="subNavList"> -<li>Detail: </li> -<li>Field | </li> -<li><a href="#constructor.detail">Constr</a> | </li> -<li><a href="#method.detail">Method</a></li> -</ul> -</div> -<a name="skip.navbar.top"> -<!-- --> -</a></div> -<!-- ========= END OF TOP NAVBAR ========= --> -<!-- ======== START OF CLASS DATA ======== --> -<div class="header"> -<div class="subTitle">org.apache.juneau.rest.widget</div> -<h2 title="Class QueryWidget" class="title">Class QueryWidget</h2> -</div> -<div class="contentContainer"> -<ul class="inheritance"> -<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> -<li> -<ul class="inheritance"> -<li><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">org.apache.juneau.rest.widget.Widget</a></li> -<li> -<ul class="inheritance"> -<li>org.apache.juneau.rest.widget.QueryWidget</li> -</ul> -</li> -</ul> -</li> -</ul> -<div class="description"> -<ul class="blockList"> -<li class="blockList"> -<hr> -<br> -<pre>public class <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryWidget.html#line.123">QueryWidget</a> -extends <a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></pre> -<div class="block">Adds a <code>QUERY</code> link to the page that allows you to perform search/view/sort/paging on the page data. - - <p> - A typical usage of the query widget is to include it as a navigation link as shown in the example below - pulled from the <code>PetStoreResource</code> example: - <p class='bcode'> - <ja>@RestResource</ja>( - widgets={ - QueryWidget.<jk>class</jk> - }, - htmldoc=<ja>@HtmlDoc</ja>( - links=<js>"{up:'...',options:'...',query:'$W{query}',source:'...'}"</js> - ) - ) - </p> - - <p> - In the above example, this adds a <code>QUERY</code> that displays a search popup that can be used for filtering the - page results... - <img class='bordered' src='doc-files/PetStore_Query.png'> - - <p> - Tooltips are provided by hovering over the field names. - <img class='bordered' src='doc-files/PetStore_Query_tooltip.png'> - - <p> - When submitted, the form submits a GET request against the current URI with special GET search API query parameters. - (e.g. <js>"?s=column1=Foo*&v=column1,column2&o=column1,column2-&p=100&l=100"</js>). - - <p> - The search arguments can be retrieved programmatically using <a href="../../../../../org/apache/juneau/rest/RequestQuery.html#getSearchArgs--"><code>RequestQuery.getSearchArgs()</code></a>. - - <p> - Typically, the search functionality is implemented by applying the predefined <a href="../../../../../org/apache/juneau/rest/converters/Queryable.html" title="class in org.apache.juneau.rest.converters"><code>Queryable</code></a> converter on the - method that's returning a 2-dimensional table of POJOs that you wish to filter: - <p class='bcode'> - <ja>@RestMethod</ja>( - name=<js>"GET"</js>, - path=<js>"/"</js>, - converters=Queryable.<jk>class</jk> - ) - <jk>public</jk> Collection<Pet> getPets() { - </p> - - <p> - The following shows various search arguments and their results on the page: - <table style='width:auto'> - <tr> - <th>Search type</th><th>Query arguments</th><th>Query results</th> - </tr> - <tr> - <td>No arguments</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q1.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r1.png'></td> - </tr> - <tr> - <td>String search</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q2.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r2.png'></td> - </tr> - <tr> - <td>Numeric range</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q3.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r3.png'></td> - </tr> - <tr> - <td>ANDed terms</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q4.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r4.png'></td> - </tr> - <tr> - <td>Date range (entire year)</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q8.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r8.png'></td> - </tr> - <tr> - <td>Date range</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q9.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r9.png'></td> - </tr> - <tr> - <td>Date range</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q10.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r10.png'></td> - </tr> - <tr> - <td>Hide columns</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q5.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r5.png'></td> - </tr> - <tr> - <td>Sort</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q6.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r6.png'></td> - </tr> - <tr> - <td>Sort descending</td> - <td><img class='bordered' src='doc-files/PetStore_Query_q7.png'></td> - <td><img class='bordered' src='doc-files/PetStore_Query_r7.png'></td> - </tr> - </table></div> -</li> -</ul> -</div> -<div class="summary"> -<ul class="blockList"> -<li class="blockList"> -<!-- ======== CONSTRUCTOR SUMMARY ======== --> -<ul class="blockList"> -<li class="blockList"><a name="constructor.summary"> -<!-- --> -</a> -<h3>Constructor Summary</h3> -<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> -<caption><span>Constructors</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colOne" scope="col">Constructor and Description</th> -</tr> -<tr class="altColor"> -<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html#QueryWidget--">QueryWidget</a></span>()</code> </td> -</tr> -</table> -</li> -</ul> -<!-- ========== METHOD SUMMARY =========== --> -<ul class="blockList"> -<li class="blockList"><a name="method.summary"> -<!-- --> -</a> -<h3>Method Summary</h3> -<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> -<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> -<tr> -<th class="colFirst" scope="col">Modifier and Type</th> -<th class="colLast" scope="col">Method and Description</th> -</tr> -<tr id="i0" class="altColor"> -<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html#getName--">getName</a></span>()</code> -<div class="block">The widget key (i.e.</div> -</td> -</tr> -<tr id="i1" class="rowColor"> -<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html#resolve-org.apache.juneau.rest.RestRequest-">resolve</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> -<div class="block">Resolves the value for the variable.</div> -</td> -</tr> -</table> -<ul class="blockList"> -<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> -<!-- --> -</a> -<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> -<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang /Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> -</ul> -</li> -</ul> -</li> -</ul> -</div> -<div class="details"> -<ul class="blockList"> -<li class="blockList"> -<!-- ========= CONSTRUCTOR DETAIL ======== --> -<ul class="blockList"> -<li class="blockList"><a name="constructor.detail"> -<!-- --> -</a> -<h3>Constructor Detail</h3> -<a name="QueryWidget--"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>QueryWidget</h4> -<pre>public <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryWidget.html#line.123">QueryWidget</a>()</pre> -</li> -</ul> -</li> -</ul> -<!-- ============ METHOD DETAIL ========== --> -<ul class="blockList"> -<li class="blockList"><a name="method.detail"> -<!-- --> -</a> -<h3>Method Detail</h3> -<a name="getName--"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>getName</h4> -<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryWidget.html#line.126">getName</a>()</pre> -<div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">Widget</a></code></span></div> -<div class="block">The widget key (i.e. The contents of the <js>"$W{...}"</js> variable).</div> -<dl> -<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> -<dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">getName</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> -<dt><span class="returnLabel">Returns:</span></dt> -<dd>The widget key. - Must not be <jk>null</jk>.</dd> -</dl> -</li> -</ul> -<a name="resolve-org.apache.juneau.rest.RestRequest-"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>resolve</h4> -<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/QueryWidget.html#line.131">resolve</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) - throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> -<div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#resolve-org.apache.juneau.rest.RestRequest-">Widget</a></code></span></div> -<div class="block">Resolves the value for the variable.</div> -<dl> -<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> -<dd><code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#resolve-org.apache.juneau.rest.RestRequest-">resolve</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget">Widget</a></code></dd> -<dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>req</code> - The HTTP request object.</dd> -<dt><span class="returnLabel">Returns:</span></dt> -<dd>The resolved value.</dd> -<dt><span class="throwsLabel">Throws:</span></dt> -<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> -</dl> -</li> -</ul> -</li> -</ul> -</li> -</ul> -</div> -</div> -<!-- ========= END OF CLASS DATA ========= --> -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<div class="bottomNav"><a name="navbar.bottom"> -<!-- --> -</a> -<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> -<a name="navbar.bottom.firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../overview-summary.html">Overview</a></li> -<li><a href="package-summary.html">Package</a></li> -<li class="navBarCell1Rev">Class</li> -<li><a href="package-tree.html">Tree</a></li> -<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../help-doc.html">Help</a></li> -</ul> -</div> -<div class="subNav"> -<ul class="navList"> -<li><a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> -<li><a href="../../../../../org/apache/juneau/rest/widget/Widget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Next Class</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../index.html?org/apache/juneau/rest/widget/QueryWidget.html" target="_top">Frames</a></li> -<li><a href="QueryWidget.html" target="_top">No Frames</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_bottom"> -<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_bottom"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<div> -<ul class="subNavList"> -<li>Summary: </li> -<li>Nested | </li> -<li>Field | </li> -<li><a href="#constructor.summary">Constr</a> | </li> -<li><a href="#method.summary">Method</a></li> -</ul> -<ul class="subNavList"> -<li>Detail: </li> -<li>Field | </li> -<li><a href="#constructor.detail">Constr</a> | </li> -<li><a href="#method.detail">Method</a></li> -</ul> -</div> -<a name="skip.navbar.bottom"> -<!-- --> -</a></div> -<!-- ======== END OF BOTTOM NAVBAR ======= --> -<p class="legalCopy"><small>Copyright © 2017 <a href="http://www.apache.org/">Apache</a>. All rights reserved.</small></p> -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/Widget.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/Widget.html b/content/site/apidocs/org/apache/juneau/rest/widget/Widget.html index 41743b2..36810d4 100644 --- a/content/site/apidocs/org/apache/juneau/rest/widget/Widget.html +++ b/content/site/apidocs/org/apache/juneau/rest/widget/Widget.html @@ -18,8 +18,8 @@ catch(err) { } //--> -var methods = {"i0":6,"i1":6}; -var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var methods = {"i0":10,"i1":6,"i2":10,"i3":10,"i4":10,"i5":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; @@ -48,7 +48,7 @@ var activeTableTab = "activeTableTab"; </div> <div class="subNav"> <ul class="navList"> -<li><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> @@ -108,13 +108,13 @@ var activeTableTab = "activeTableTab"; <li class="blockList"> <dl> <dt>Direct Known Subclasses:</dt> -<dd><a href="../../../../../org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.html" title="class in org.apache.juneau.rest.widget">ContentTypeLinksColumnWidget</a>, <a href="../../../../../org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.html" title="class in org.apache.juneau.rest.widget">ContentTypeLinksRowWidget</a>, <a href="../../../../../org/apache/juneau/rest/widget/PoweredByApacheWidget.html" title="class in org.apache.juneau.rest.widget">PoweredByApacheWidget</a>, <a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" title="class in org.apache.juneau.rest.widget">PoweredByJuneauWidget</a>, <a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html" title="class in org.apache.juneau.rest.widget">QueryWidget</a></dd> +<dd><a href="../../../../../org/apache/juneau/rest/widget/MenuItemWidget.html" title="class in org.apache.juneau.rest.widget">MenuItemWidget</a>, <a href="../../../../../org/apache/juneau/rest/widget/PoweredByApacheWidget.html" title="class in org.apache.juneau.rest.widget">PoweredByApacheWidget</a>, <a href="../../../../../org/apache/juneau/rest/widget/PoweredByJuneauWidget.html" title="class in org.apache.juneau.rest.widget">PoweredByJuneauWidget</a></dd> </dl> <hr> <br> -<pre>public abstract class <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.29">Widget</a> +<pre>public abstract class <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.116">Widget</a> extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> -<div class="block">Defines an interface for defining resolvers for <js>"$W{...}"</js> string variables. +<div class="block">Defines an interface for resolvers of <js>"$W{...}"</js> string variables. <p> Widgets are associated with resources through the following @@ -122,7 +122,90 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <li><a href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#widgets--"><code>@RestResource.widgets</code></a> <li><a href="../../../../../org/apache/juneau/rest/annotation/RestMethod.html#widgets--"><code>@RestMethod.widgets</code></a> <li><a href="../../../../../org/apache/juneau/rest/RestConfig.html#addWidget-java.lang.Class-"><code>RestConfig.addWidget(Class)</code></a> - </ul></div> + </ul> + + <p> + Widgets allow you to add arbitrary HTML, CSS, and Javascript to the page. + + <p> + The HTML content returned by the <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getHtml-org.apache.juneau.rest.RestRequest-"><code>getHtml(RestRequest)</code></a> method is added where the <js>"$W{...}"</js> is + referenced in the page. + The Javascript and stylesheet content is added to the header of the page. + They allow you to control the look and behavior of your widgets. + + <p> + The following examples shows how to associate a widget with a REST method and then have it rendered in the links + and aside section of the page: + + <p class='bcode'> + <ja>@RestMethod</ja>( + widgets={ + MyWidget.<jk>class</jk> + } + htmldoc=<ja>@HtmlDoc</ja>( + links=<js>"{mylink:'$W{myWidget}'}"</js>, + aside=<js>"Check out this widget: $W{myWidget}"</js> + ) + ) + </p> + + <p> + The following shows an example of a widget that renders an image located in the <code>htdocs</code> static files + directory in your classpath (see <a href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#staticFiles--"><code>RestResource.staticFiles()</code></a>): + <p class='bcode'> + <jk>public class</jk> MyWidget <jk>extends</jk> Widget { + + <ja>@Override</ja> + <jk>public</jk> String getName(RestRequest req) { + return <js>"myWidget"</js>; + } + + <ja>@Override</ja> + <jk>public</jk> String getHtml(RestRequest req) <jk>throws</jk> Exception { + UriResolver r = req.getUriResolver(); + <jk>return</jk> <js>"<img class='myimage' onclick='myalert(this)' src='"</js>+r.resolve(<js>"servlet:/htdocs/myimage.png"</js>)+<js>"'>"</js>; + } + + <ja>@Override</ja> + <jk>public</jk> String getScript(RestRequest req) <jk>throws</jk> Exception { + <jk>return</jk> <js>""</js> + + <js>"\n function myalert(imageElement) {"</js> + + <js>"\n alert('cool!');"</js> + + <js>"\n }"</js>; + } + + <ja>@Override</ja> + <jk>public</jk> String getStyle(RestRequest req) <jk>throws</jk> Exception { + <jk>return</jk> <js>""</js> + + <js>"\n .myimage {"</js> + + <js>"\n border: 10px solid red;"</js> + + <js>"\n }"</js>; + } + } + </p> + + <p> + Note the <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-"><code>getResourceAsString(String)</code></a> and <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-java.util.Locale-"><code>getResourceAsString(String, Locale)</code></a> convenience methods + provided for quickly loading javascript and css files from the classpath or file system. + These are useful if your script or styles are complex and you want them loaded from files. + + <p> + <p class='bcode'> + <jk>public class</jk> MyWidget <jk>extends</jk> Widget { + + ... + + <ja>@Override</ja> + <jk>public</jk> String getScript(RestRequest req) <jk>throws</jk> Exception { + <jk>return</jk> getResourceAsString(<js>"MyWidget.js"</js>); + } + + <ja>@Override</ja> + <jk>public</jk> String getStyle(RestRequest req) <jk>throws</jk> Exception { + <jk>return</jk> getResourceAsString(<js>"MyWidget.css"</js>); + } + } + </p></div> </li> </ul> </div> @@ -153,21 +236,46 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> -<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> -<td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">getName</a></span>()</code> -<div class="block">The widget key (i.e.</div> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getHtml-org.apache.juneau.rest.RestRequest-">getHtml</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> +<div class="block">Resolves the HTML content for this widget.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#resolve-org.apache.juneau.rest.RestRequest-">resolve</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> -<div class="block">Resolves the value for the variable.</div> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getName--">getName</a></span>()</code> +<div class="block">The widget key.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-">getResourceAsString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Retrieves the specified classpath resource and returns the contents as a string.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-java.util.Locale-">getResourceAsString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale)</code> +<div class="block">Same as <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-"><code>getResourceAsString(String)</code></a> except also looks for localized-versions of the file.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getScript-org.apache.juneau.rest.RestRequest-">getScript</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> +<div class="block">Resolves any Javascript that should be added to the <xt><head>/<script></xt> element.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getStyle-org.apache.juneau.rest.RestRequest-">getStyle</a></span>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req)</code> +<div class="block">Resolves any CSS styles that should be added to the <xt><head>/<style></xt> element.</div> </td> </tr> </table> @@ -198,7 +306,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockListLast"> <li class="blockList"> <h4>Widget</h4> -<pre>public <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.29">Widget</a>()</pre> +<pre>public <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.116">Widget</a>()</pre> </li> </ul> </li> @@ -215,34 +323,144 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getName</h4> -<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.38">getName</a>()</pre> -<div class="block">The widget key (i.e. The contents of the <js>"$W{...}"</js> variable).</div> +<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.131">getName</a>()</pre> +<div class="block">The widget key. + + <p> + (i.e. The contents of the <js>"$W{...}"</js> variable). + + <p> + The returned value must not be <jk>null</jk>.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> -<dd>The widget key. - Must not be <jk>null</jk>.</dd> +<dd>The widget key.</dd> </dl> </li> </ul> -<a name="resolve-org.apache.juneau.rest.RestRequest-"> +<a name="getHtml-org.apache.juneau.rest.RestRequest-"> <!-- --> </a> -<ul class="blockListLast"> +<ul class="blockList"> <li class="blockList"> -<h4>resolve</h4> -<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.47">resolve</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) - throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> -<div class="block">Resolves the value for the variable.</div> +<h4>getHtml</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.143">getHtml</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Resolves the HTML content for this widget. + + <p> + A returned value of <jk>null</jk> will cause nothing to be added to the page.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>req</code> - The HTTP request object.</dd> <dt><span class="returnLabel">Returns:</span></dt> -<dd>The resolved value.</dd> +<dd>The HTML content of this widget.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> </dl> </li> </ul> +<a name="getScript-org.apache.juneau.rest.RestRequest-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getScript</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.157">getScript</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Resolves any Javascript that should be added to the <xt><head>/<script></xt> element. + + <p> + A returned value of <jk>null</jk> will cause nothing to be added to the page.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>req</code> - The HTTP request object.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The Javascript needed by this widget.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> +</dl> +</li> +</ul> +<a name="getStyle-org.apache.juneau.rest.RestRequest-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getStyle</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.171">getStyle</a>(<a href="../../../../../org/apache/juneau/rest/RestRequest.html" title="class in org.apache.juneau.rest">RestRequest</a> req) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Resolves any CSS styles that should be added to the <xt><head>/<style></xt> element. + + <p> + A returned value of <jk>null</jk> will cause nothing to be added to the page.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>req</code> - The HTTP request object.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The CSS styles needed by this widget.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> +</dl> +</li> +</ul> +<a name="getResourceAsString-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getResourceAsString</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.190">getResourceAsString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Retrieves the specified classpath resource and returns the contents as a string. + + <p> + Same as <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true#getResourceAsStream-java.lang.String-" title="class or interface in java.lang"><code>Class.getResourceAsStream(String)</code></a> except if it doesn't find the resource on this class, searches + up the parent hierarchy chain. + + <p> + If the resource cannot be found in the classpath, then an attempt is made to look relative to the JVM working directory. + <br>Path traversals outside the working directory are not allowed for security reasons.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - Name of the desired resource.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resource converted to a string, or <jk>null</jk> if the resource could not be found.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +</dl> +</li> +</ul> +<a name="getResourceAsString-java.lang.String-java.util.Locale-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getResourceAsString</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/rest/widget/Widget.html#line.213">getResourceAsString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Same as <a href="../../../../../org/apache/juneau/rest/widget/Widget.html#getResourceAsString-java.lang.String-"><code>getResourceAsString(String)</code></a> except also looks for localized-versions of the file. + + <p> + If the <code>locale</code> is specified, then we look for resources whose name matches that locale. + <br>For example, if looking for the resource <js>"MyResource.txt"</js> for the Japanese locale, we will look for + files in the following order: + <ol> + <li><js>"MyResource_ja_JP.txt"</js> + <li><js>"MyResource_ja.txt"</js> + <li><js>"MyResource.txt"</js> + </ol></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - Name of the desired resource.</dd> +<dd><code>locale</code> - The locale. Can be <jk>null</jk>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resource converted to a string, or <jk>null</jk> if the resource could not be found.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +</dl> +</li> +</ul> </li> </ul> </li> @@ -270,7 +488,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? </div> <div class="subNav"> <ul class="navList"> -<li><a href="../../../../../org/apache/juneau/rest/widget/QueryWidget.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/juneau/rest/widget/QueryMenuItem.html" title="class in org.apache.juneau.rest.widget"><span class="typeNameLink">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/ContentTypeMenuItem.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/ContentTypeMenuItem.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/ContentTypeMenuItem.png new file mode 100644 index 0000000..6c8db5c Binary files /dev/null and b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/ContentTypeMenuItem.png differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query.png deleted file mode 100644 index 0db9c0d..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q1.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q1.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q1.png deleted file mode 100644 index 65b08dc..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q1.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q10.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q10.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q10.png deleted file mode 100644 index 3ec59c1..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q10.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q2.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q2.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q2.png deleted file mode 100644 index 935b2f0..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q2.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q3.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q3.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q3.png deleted file mode 100644 index a0b72c7..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q3.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q4.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q4.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q4.png deleted file mode 100644 index b324817..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q4.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q5.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q5.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q5.png deleted file mode 100644 index 3fc6aab..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q5.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q6.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q6.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q6.png deleted file mode 100644 index d3fbd7c..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q6.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q7.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q7.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q7.png deleted file mode 100644 index ba8c997..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q7.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q8.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q8.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q8.png deleted file mode 100644 index e42fbbe..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q8.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q9.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q9.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q9.png deleted file mode 100644 index 7cd2ffe..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_q9.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r1.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r1.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r1.png deleted file mode 100644 index dcc26b3..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r1.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r10.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r10.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r10.png deleted file mode 100644 index 8cf450b..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r10.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r2.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r2.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r2.png deleted file mode 100644 index 5904efa..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r2.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r3.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r3.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r3.png deleted file mode 100644 index 4adf7cc..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r3.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r4.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r4.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r4.png deleted file mode 100644 index 5904efa..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r4.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r5.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r5.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r5.png deleted file mode 100644 index 9b6185a..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r5.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r6.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r6.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r6.png deleted file mode 100644 index d0f21be..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r6.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b5c66cf1/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r7.png ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r7.png b/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r7.png deleted file mode 100644 index 472a2ce..0000000 Binary files a/content/site/apidocs/org/apache/juneau/rest/widget/doc-files/PetStore_Query_r7.png and /dev/null differ
