Friday, July 24, 2015

Developing JSF UI

JSF technology uses Tag Libraries containing simple and reusable Tags to create rich and dynamic UI component model. You can implement validations, conversions and handle events generated by UI.

Basic Two types of JSF Tag Libraries are

  • HTML Tag Library
  • Core Tag Library.
  1. HTML TAG LIBRARY:
You can create UI form components using HTML Tag Library. To use HTML Tag Library , you need to include a namespace in your WebPage(.xhtml file).
"http://xmlns.jcp.org/jsf/html"
  • Head and Body Tag:
          Head and body tag is included between < html > and < /html > tag.
         For Example.

          < html xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:h="http://xmlns.jcp.org/jsf/html"  >
          < h:head >
                           < title >  WELCOME TO JSF FIRST PAGE < /title >
          < /h:head >
          < body >
                            To do Content.....you can design your webpage here.
           < /body >
          < /html >
2. Form Tag:
       Jsf form tag uses Postback method to submit form data to server, hence uses POST method.
       You can include form tag in body tag.
For Example:
< html xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:h="http://xmlns.jcp.org/jsf/html"  >
          < h:head >
                           < title >  WELCOME TO JSF FIRST PAGE < /title >
          < /h:head >
          < body >
                         < h:form  id="myform1" >
                                       < !-- other UI  components -- >
                        < /h:form >
           < /body >
          < /html >

TO BE CONTINUED.....




No comments: