
I would like to know how to display data into textboxes which is retrieved from database in jsf. could you please provide a small example of how to do it. please do help.

You can also try the following code:
import java.util.*;
class Book{
String author;
String title;
String summary;
public Book(String author,String title,String summary){
this.author=author;
this.title=title;
this.summary=summary;
}
public String getTitle(){
return title;
}
public String getAuthor(){
return author;
}
public String getSummary(){
return summary;
}
}
public class BookInformation{
public static void main(String[]args){
Scanner input=new Scanner(System.in);
Book myLibrary[]=new Book[6];
for(int i=0;i<myLibrary.length;i++){
System.out.print("Author: ");
String author=input.nextLine();
System.out.print("Title: ");
String title=input.nextLine();
System.out.print("Summary: ");
String summary=input.nextLine();
myLibrary[i]=new Book(author,title,summary);
System.out.println();
}
System.out.println();
System.out.println("Book Information");
for (int i = 0; i < myLibrary.length; i++){
Book library = myLibrary[i];
System.out.println(library.getAuthor() + "\t "+ library.getTitle() + "\t "+ library.getSummary() + "\t ");
}
System.out.println();
System.out.print("Enter title to search infomation: ");
String tit=input.nextLine();
System.out.println();
for(int i = 0; i < myLibrary.length; i++) {
if(tit.equals(myLibrary[i].getTitle())) {
System.out.println("Author is: "+myLibrary[i].getAuthor());
System.out.println("Summary is: "+myLibrary[i].getSummary());
}
}
}
}

Sorry for the above post, you can visit the following link:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.