Jsf panelgrid html tag

JSF h:panelGrid tag is used to render HTML table element. Attributes of h:panelGrid tag. Attribute Description id id for the tag binding Reference to the component used in a backing bean rendered A boolean value; false would suppress rendering styleClass Cascading stylesheet (CSS) class name value value binding bgcolor Background color for the table border … Read more

Categories JSF

Jsf outputlink html tag

JSF h:outputLink tag is used to render HTML anchor element. Value attribute specify the target URL. JSF tag: <h:outputLink value="nextPage">Click Here</h:outputLink><h:outputLink value="nextPage">Click Here</h:outputLink> Rendered HTML tag: <a href="nextPage.xhtml">Click Here</a><a href="nextPage.xhtml">Click Here</a> Note: 1. The “h:link” tag is useful to generate a link which requires to interact with the JSF “outcome” , but lack of “action” … Read more

Categories JSF

Jsf commandlink html tag

JSF h:commandLink tag is used to render HTML anchor element. Value attribute specify the anchor text and action attribute determined the target URL. JSF tag: <h:commandLink value="Click here" action="nextPage" /><h:commandLink value="Click here" action="nextPage" /> Rendered HTML tag: <a href="#" onclick="mojarra.jsfcljs(document.getElementById(‘j_idt6’), {‘j_idt6:j_idt16′:’j_idt6:j_idt16’},”); return false">Click Here</a><a href="#" onclick="mojarra.jsfcljs(document.getElementById(‘j_idt6’), {‘j_idt6:j_idt16′:’j_idt6:j_idt16’},”); return false">Click Here</a> Note: In HTML output we … Read more

Categories JSF

Jsf link html tag

JSF h:link tag is used to render HTML anchor element. JSF tag: <h:link value="Click here" outcome="nextPage" /><h:link value="Click here" outcome="nextPage" /> Rendered HTML tag: <a href="/JavaServerFaces/faces/nextPage.xhtml">Click here</a><a href="/JavaServerFaces/faces/nextPage.xhtml">Click here</a> Note: We can add parameter to generated link by using f:param. <h:link value="Click here" outcome="nextPage" > <f:param name="id" value="1" /> </h:link><h:link value="Click here" outcome="nextPage" > <f:param … Read more

Categories JSF

Jsf outputscript html tag

JSF h:outputScript tag is used to render HTML script element with type “text/javascript” and link it to a js file. JSF tag: <h:outputScript library="js" name="test.js"/><h:outputScript library="js" name="test.js"/> Rendered HTML tag: <script type="text/javascript" src="/JavaServerFaces/faces/javax.faces.resource/test.js?ln=js"> </script><script type="text/javascript" src="/JavaServerFaces/faces/javax.faces.resource/test.js?ln=js"> </script> Example: test.js function sayHello(){ alert("Hello World."); }function sayHello(){ alert("Hello World."); } welcome.xhtml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC … Read more

Categories JSF

Jsf outputstylesheet html tag

JSF h:outputStylesheet tag is used to render HTML link element with type “text/css”. JSF tag: <h:outputStylesheet library="css" name="styles.css" /><h:outputStylesheet library="css" name="styles.css" /> Rendered HTML tag: <link type="text/css" rel="stylesheet" href="/JavaServerFaces/faces/javax.faces.resource/style.css?ln=css" /><link type="text/css" rel="stylesheet" href="/JavaServerFaces/faces/javax.faces.resource/style.css?ln=css" /> Note: When using h:outputStylesheet put entry in your page otherwise it will not work. Example: style.css .hello{ color:blue; }.hello{ color:blue; } … Read more

Categories JSF

JSF graphicImage html tag

JSF h:graphicImage tag is used to render HTML img element. JSF tag: <h:graphicImage value="https://www.w3schools.blog/jsf1.jpg"/><h:graphicImage value="https://www.w3schools.blog/jsf1.jpg"/> Rendered HTML tag: <img src="https://www.w3schools.blog/jsf1.jpg" /><img src="https://www.w3schools.blog/jsf1.jpg" /> Attributes of h:graphicImage tag. Attribute Description id id for the tag binding Reference to the component used in a backing bean rendered A boolean value; false would suppress rendering styleClass Cascading stylesheet … Read more

Categories JSF

JSF outputFormat html tag

JSF h:outputFormat tag is used to render HTML text which can accept parameterized inputs. JSF tag: <h:outputFormat value="parameter 1 : {0}, parameter 2 : {1}" > <f:param value="Param1" /> <f:param value="Param2" /> </h:outputFormat><h:outputFormat value="parameter 1 : {0}, parameter 2 : {1}" > <f:param value="Param1" /> <f:param value="Param2" /> </h:outputFormat> Rendered HTML tag: parameter 1 : … Read more

Categories JSF

Jsf outputText html tag

JSF h:outputText tag is used to render HTML text. JSF tag: <h:outputText value="Hello World"/><h:outputText value="Hello World"/> Rendered HTML tag: Hello WorldHello World Attributes of h:outputText tag. Attribute Description id id for the tag binding Reference to the component used in a backing bean rendered A boolean value; false would suppress rendering styleClass Cascading stylesheet (CSS) … Read more

Categories JSF

JSF selectOneMenu html tag

JSF h:selectOneMenu tag is used to render a single select HTML input element of the type “select” with size not specified. JSF tag: <h:selectManyListbox value="#{testBean.data}" /> <f:selectItem itemValue="1" itemLabel="Item 1" /> <f:selectItem itemValue="2" itemLabel="Item 2" /> </h:selectManyListbox><h:selectManyListbox value="#{testBean.data}" /> <f:selectItem itemValue="1" itemLabel="Item 1" /> <f:selectItem itemValue="2" itemLabel="Item 2" /> </h:selectManyListbox> Rendered HTML tag: <select name="j_idt6:j_idt8"> … Read more

Categories JSF