Repository: incubator-juneau-website
Updated Branches:
  refs/heads/asf-site c98c566fc -> c7c8f33aa


Add form post example.

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/commit/c7c8f33a
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/c7c8f33a
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/c7c8f33a

Branch: refs/heads/asf-site
Commit: c7c8f33aa8098cd7d0baf50270e7ff9dca40a1b5
Parents: c98c566
Author: JamesBognar <[email protected]>
Authored: Sat Feb 25 11:39:30 2017 -0500
Committer: JamesBognar <[email protected]>
Committed: Sat Feb 25 11:39:30 2017 -0500

----------------------------------------------------------------------
 content/about.html                      |  44 ++++++++++++++++++++++++---
 content/images/SystemPropertiesForm.png | Bin 0 -> 56052 bytes
 2 files changed, 40 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/c7c8f33a/content/about.html
----------------------------------------------------------------------
diff --git a/content/about.html b/content/about.html
index 792e22d..be35593 100644
--- a/content/about.html
+++ b/content/about.html
@@ -575,6 +575,37 @@
        }
        </p>
        <p>
+               When combined with the support for HTML5 beans, simple HTML 
form pages can be constructed for easy input and output
+               using nothing more than Java:
+       </p>
+       <p class='bcode'>
+       <ja>@RestMethod</ja>(
+               name=<js>"GET"</js>, path=<js>"/formPage"</js>,
+               summary=<js>"Form entry page"</js>,
+               description=<js>"A form post page for setting a single system 
property value."</js>,
+               guards=AdminGuard.<jk>class</jk>
+       )
+       <jk>public</jk> Form getFormPage() {
+               <jk>return</jk> 
<jsm>form</jsm>().method(<js>"POST"</js>).action(<js>"formPagePost"</js>).children(
+                       <jsm>h4</jsm>(<js>"Set system property"</js>),
+                       <js>"Name: "</js>, 
<jsm>input</jsm>(<js>"text"</js>).name(<js>"name"</js>), <jsm>br</jsm>(),
+                       <js>"Value: "</js>, 
<jsm>input</jsm>(<js>"text"</js>).name(<js>"value"</js>), <jsm>br</jsm>(), 
<jsm>br</jsm>(),
+                       <jsm>button</jsm>(<js>"submit","Click 
me!"</js>).style(<js>"float:right"</js>)
+               );
+       }
+
+       <ja>@RestMethod</ja>(
+               name=<js>"POST"</js>, path=<js>"/formPagePost"</js>, 
+               description=<js>"Accepts a simple form post of a system 
property name/value pair."</js>,
+               guards=AdminGuard.<jk>class</jk>
+       )
+       <jk>public</jk> Redirect 
formPagePost(<ja>@FormData</ja>(<js>"name"</js>) String name, 
<ja>@FormData</ja>(<js>"value"</js>) String value) {
+               System.<jsm>setProperty</jsm>(name, value);
+               <jk>return new</jk> Redirect();  <jc>// Redirect to the servlet 
top page.</jc>
+       }
+       </p>    
+       <img class='bordered' src='images/SystemPropertiesForm.png'>
+       <p>
                Auto-generated OPTIONS pages are constructed from Swagger DTO 
beans, here shown serialized as HTML...
        </p>
        <img class='bordered' src='images/Swagger.png'>
@@ -588,11 +619,14 @@
                <li>Extremely simple debuggability using nothing more than your 
browser.
                <li>Auto-generated localized Swagger-based OPTIONS pages from 
data provided through annotations (as above), resource bundles, or Swagger JSON 
files.
                <li>Configurability through external INI files.
-               <li>Client-versioned responses (and other heuristic matching 
APIs).
+               <li>Client-versioned responses (and other customizable 
heuristic matching APIs).
                <li>Servlet and method level guards.
                <li>Automated error handling.
+               <li>Define and use your own stylesheets.
+               <li>Built-in support for serializing POJOs, InputStreams, 
Readers, Streamables, Writables, and ZipFiles with the ability to define your 
own handlers for custom object types.
                <li>Optional JAX-RS integration.
-               <li>much more!....
+               <li>Lots of up-to-date documentation and examples.
+               <li>MUCH MORE!....
        </ul>
        <br><hr>
        <p>
@@ -774,14 +808,16 @@
        <br><hr>
        <h5 class='toc'>More information</h5>
        <p>
-               All user documentation for this project is maintained in its <a 
class='doclink' 
href='http://juneau.incubator.apache.org/site/apidocs/index.html' 
target="_top">Javadocs</a>.
+               <b>*ALL*</b> user documentation for this project is maintained 
in its <a class='doclink' 
href='http://juneau.incubator.apache.org/site/apidocs/index.html' 
target="_top">Javadocs</a>.
+               If it's not in the Javadocs, it doesn't exist.
        </p>
        <p>
                The top-level <a class='doclink' 
href='http://juneau.incubator.apache.org/site/apidocs/overview-summary.html#overview.description'
 target="_top">Overview</a> document is a good
                starting point for developers wishing to get up-to-speed 
quickly.
        </p>
        <p>
-               Any questions about the project should be asked via email to <a 
href='mailto:[email protected]?Subject=Apache%20Juneau%20question'>[email protected]</a>.
+               Any questions about the project should be asked via email at <a 
href='mailto:[email protected]?Subject=Apache%20Juneau%20question'>[email protected]</a>.
        </p>
+       <p align="center"><i><b>*** fi&#769;n ***</b></i></p>
 </body>
 </html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/c7c8f33a/content/images/SystemPropertiesForm.png
----------------------------------------------------------------------
diff --git a/content/images/SystemPropertiesForm.png 
b/content/images/SystemPropertiesForm.png
new file mode 100644
index 0000000..6d924f7
Binary files /dev/null and b/content/images/SystemPropertiesForm.png differ

Reply via email to