Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML
 
 
Hot Web Programming Job

 

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Java Tutorials

Core Java
JSP
Servlet
JDBC
Hibernate
Struts 1
Struts 2
JSF
Spring
J2EE
J2ME
Web Services
Ajax
Dojo
MySQL
Latest Comments
Null pointer excep
swap program faile
hi.........
very good
navigaton mobile
  All Comments...
 

 

 
Struts Tutorials
*Stuts TOC
*Apache Struts Introduction
* Struts Controller
* Struts Action Class
* Struts ActionFrom Class
* Using Struts HTML Tags
*Struts Validator Framework    
*Client Side Address Validation    
*Struts Tiles
*tiles-defs.xml
*Struts DynaActionForm
*Struts File Upload
*Struts DataSource
*AGGREGATING ACTIONS
*Internationalization
Struts Resources
*Struts Books
*Struts Articles
*Struts Frameworks
*Struts IDE
*Struts Alternative
*Struts Links
*Struts Presentations
*Struts Projects
*Struts Software
*Struts Reference
*Struts Resources
*Other Struts Tutorial
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

JSF Interview Questions

                          

  1. What is the use of immediate attribute?
    UIInput components and command components can set the immediate attribute to true. This attribute, when set to true, forces the conversion and validation phase to occur earlier in the lifecycle, during the apply request values phase.  In other words, if some components on the page have their immediate attributes set to true, then the validation, conversion, and events associated with these components will be processed during apply request values phase.

     

    The immediate attribute can be used for the following purposes :

    1. Immediate attribute, when set to true, allows a commandLink or commandButton to process the back-end logic and ignore validation process related to the fields on the page. This allows navigation to occur even when there are validation errors.
    2. To make one or more input components "high priority" for validation, so validation is performed, if there is any invalid component data, only for high priority input components and not for low priority input components in the page. This helps reducing the number of error messages shown on the page.

      For example :

      In the code below, button performs navigation without validating the required field.
      <h:inputText id="it" required="true"/>
      <t:message for="it"/>
      <t:commandButton value="submit" immediate="true" action="welcome"/>

      In the code below, validation is performed only for the first component when button is clicked in spite of being both the input components required.

      <h:inputText id="it1" immediate="true" required="true"/>
      <h:inputText id="it2" required="true"/>
      <t:message for="it1"/>
      <t:message for="it2"/>
      <t:commandButton value="submit" action="welcome"/>

     

  2. Explain the usage of immediate attribute in an application.
    Take an example of shopping cart application in which a page contain quantity fields for each product and two hyperlinks "Continue Shopping" and "Update quantities". Now we have set the immediate attributes to "false" for all the quantity fields, "true" for "Continue Shopping" hyperlink and "false" for "Update quantities" hyperlink. If we click the "Continue Shopping" hyperlink, none of the changes entered into the quantity input fields will be processed. If you click the "Update Quantities" hyperlink, the values in the quantity fields will be updated in the shopping cart.
      
  3. How to get the error messages displayed?
    Error messages can be displayed using "message" and "messages" tag. "message" tag is used to display single error message for a particular component. The ID of the component for which the message is to be displayed is specified is specified in "for" attribute of the message tag.
    Error messages for all the components can be displayed at a place using "messages" tag. It supports two layouts "table" and "list". List layout shows all the messages in a line and table layout places all the messages in a tabular format.
      
  4. How to avoid that all the messages are shown on the same line?
    "messages" tag displays all error messages in a line because the default layout it supports is "list". This tag also supplies one more value "table" for "layout" attribute which displays all error messages in a tabular format i.e. in subsequent lines. So specifying explicitly the value of "layout" attribute to "table" can solve the problem of displaying all messages in the same line.

                          

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.