JSF OutputLabel Example

JSF OutputLabel Example The JSF OutputLabel will attach a Label to an input field component. The h:outputLabel renders an HTML <LABEL> component in the browser. The FOR attribute in the OutputLabel maps to the ID attribute of the Input component. Here below is the JSF components and its corresponding HTML component JSF => <h:outputLabel value="Username: [...]

By | 2017-11-23T02:52:51+00:00 November 23rd, 2017|Categories: JSF|Tags: , , , |0 Comments

JSF OutputText Example

JSF OutputText Example   The JSF OutputText renders a text value on the browser. The outputText is useful to refer the backing bean class and resource bundle property file. Below is the JSF tag and its corresponding value in the browser JSF => <h:outputText value="How are you?" /> Browser => How are you?   JSF [...]

By | 2017-11-23T01:16:43+00:00 November 23rd, 2017|Categories: JSF|Tags: , , , |0 Comments

JSF inputTextArea Example

JSF inputTextArea Example The JSF inputTextArea component renders an HTML <textarea> component in the browser. The row and col determine the size of the Text Area. Below is the JSF and its corresponding HTML component JSF => <h:inputTextarea rows="7" cols="200" value="#{user.text}" /> HTML => <textarea name="j_idt2:j_idt3" cols="200" rows="7" /> The below example explains about the [...]

By | 2017-11-22T20:23:06+00:00 November 22nd, 2017|Categories: JSF|Tags: , , , , |0 Comments

JSF InputSecret Example – Password Field

JSF InputSecret Example _ Password Field   The JSF InputSecret field renders an HTML <INPUT> tag of type Password. An asterisks (*) symbol comes for each character in the password field. Setting redisplay=false attribute empties the password field whenever refresh happens on the browser.   JSF => <h:inputSecret value="#{user.password}" /> HTML => <input type="password" name="j_idt2:j_idt3" [...]

By | 2017-11-22T18:46:59+00:00 November 22nd, 2017|Categories: JSF|Tags: , , , , |0 Comments

JSF InputFile File upload Example

JSF InputFIle – FileUpload Example   The JSF InputFile component is used to upload files from client machine. The uploaded files will be saved in the server. Below is the h:inputFIle component and its corresponding HTML tag   JSF => <h:inputFile value="#{fileupload.uploadedFile}" /> HTML => <input type="file" name="j_idt4" />   The below example explains about [...]

By | 2017-11-22T03:22:54+00:00 November 22nd, 2017|Categories: JSF|Tags: , , , |0 Comments

JSF Inputtext Example

JSF Inputtext Example The JSF INPUTTEXT renders an Text field in browser. It renders an HTML component <Input> of Type='Text' . Below is the JSF h:inputText and its corresponding HTML element JSF => <h:inputText value="#{user.name}" id="username" /> HTML => <input type="text" id="j_idt2:username" name="j_idt2:username" /> JSF h:InputText Example Below is the index.jsf page contains an inputText field.   [crayon-5a16ca817210e405715800/] [...]

By | 2017-11-21T22:05:45+00:00 November 21st, 2017|Categories: JSF|Tags: , , |0 Comments

JSF Form Tag Example

JSF Form tag Example   The JSF form render an HTML Form tag in the browser and it uses HTTP POST method. The CommandButton of type 'Submit' help us to submit the Form. The h:form renders in browser like below:   JSF => <h:form>   HTML => <form id="j_idt2" name="j_idt2" method="post" action="/JSF_FORM_EXAMPLE/faces/index.xhtml" enctype="application/x-www-form-urlencoded">     JSF h:Form [...]

By | 2017-11-21T01:24:39+00:00 November 21st, 2017|Categories: JSF|Tags: , , , , , |0 Comments

JSF h:Head and h:Body tags

JSF h:Head and h:Body tags   The JSF h:head renders an HTML <HEAD> tag in the browser. Similarly the h:body tag renders <BODY> tag in the browser.  Below are the JSF h:head and h:body tags and its corresponding HTML tags JSF: [crayon-5a16ca81726f4761747434/]   HTML:    [crayon-5a16ca81726fc610727568/]    

By | 2017-11-20T00:57:37+00:00 November 20th, 2017|Categories: JSF|Tags: , , , |0 Comments

JSF OutputLink Example

JSF OutputLink Example   The JSF h:OutputLink in useful to navigate a page outside of the Web application. The outcome attribute needs complete Web page name or the URL; For example, 'Home.xhtml' and not accept viewID like 'Home'. JSF Outputlink renders an anchor tag in the browser like below JSF => <h:outputLink value="www.google.com">Google</h:outputLink> HTML => [...]

By | 2017-11-19T23:40:59+00:00 November 19th, 2017|Categories: JSF|Tags: , , , |0 Comments

JSF Link Example

JSF Link Example   The <h:link> tag renders a HTML anchor tag in the browser. It uses the outcome attribute for doing navigation. We can use h:param tag to pass query parameters and h:graphicImage to render an image. The h:link tag renders like below in the browser   JSF => <h:link outcome="Home" value="Home" /> HTML [...]

By | 2017-11-19T18:52:50+00:00 November 19th, 2017|Categories: JSF|Tags: , , , , |0 Comments
Like us on Facebook.
Connect!