Pass through Element and Attribute.

Pass through Element and Attribute.

 

Pass through element or attributes are ways to use a Manage Java Bean in HTML 5 web page

Example : Suppose we have index.html content as below with Java Class App.java and Web.java

<html lang=”en” xmlns:jsf=”xmlns.jcp.org/jsf ” xmlns:h=”xmlns.jcp.org/xhtml” >

…
      <input type=”text” jsf:id=”name”  value =”${app.name}” required=”true”>

Or

<h2  h:outputLabel  value=”location”> I am from {$web.getLocation(location) } </h2>

 

Normally HTML 5 input tag has not jsf:id , with the jsf:id , we are inferring a specific attribute or actions from our Manage Java Bean

The purpose of this is to show how to use a component or  extract a data( properties )  from  Manage Java Bean

 

The first way is to Pass through Element , which has been indicated in the above example

 

Pass through element

Example 2

<html  lang=”en”

Xmlns:p=”xmlns.jcp.org/jsf/passthough  >

….

<input type=”text” p:id=””

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: