Showing results for XForms (category)

XForms backed with JAX-RS RESTful services

Comments Off December 31st, 2009 by Henri Bezemer

In an earlier post I presented a simple example of a login form implemented with XForms. In this example, XML data submitted by the form is parsed by a Java Servlet into a DOM tree, data is extracted using XPath and finally the servlet directly prints a XML result to its response stream. For large scale development, this is not the most efficient and safe way to implement this functionality.

JAX-RS allows us to efficiently build RESTful services, which are a perfect match to XForms. In this post I’ll present a JAX-RS service to replace the servlet from the login form example. Read more…

Dynamic navigation with XForms

2 Comments » December 29th, 2009 by Henri Bezemer

XForms are a great way for a Java web developer to avoid the use of the JSF framework. Instead of authoring world-wide open standard (X)HTML pages, JSF lets you code JSP pages with JSF tags. JSF forces you from a truly open standard into a less open Java only standard. This alone makes me want to avoid JSF.

XForms is a programming language independent W3C open standard. In this post I will not try to show all the benefits of using XForms. I’ll assume that you’ve already decided that you want to use XForms with Java. XForms is powerful enough to provide most if not all of the presentation logic that your web site requires. In this post I will explain how dynamic navigation can be achieved fully in XForms, thereby stripping the server side Java code of all presentation logic. Dynamic navigation is a mechanism found in the JSF framework. Put very simply, an agent (browser) posts data collected on a page to a server and the outcome of processing this data determines the next page. Read more…