Home Answers Viewqa JSF-Questions jsf code in myeclipse

 
 


priyabrat mohanty
jsf code in myeclipse
1 Answer(s)      3 years and 10 months ago
Posted in : Java Server Faces Questions

View Answers

July 9, 2009 at 2:56 PM


Hi Friend,

Try the following code:

1)scrollableTable.jsp:

<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://richfaces.org/rich"; prefix="rich"%>
<%@ taglib uri="http://richfaces.org/a4j"; prefix="a4j"%>

<f:view>
<html>
<a4j:form>
<rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="200px"
width="30%" rows="40" columnClasses="col" value="#{ScrollerBean.initList}" var="list" sortMode="single">

<rich:column id="userName">
<f:facet name="header"><h:outputText styleClass="headerText" value="UserName" /></f:facet>
<h:outputText value="#{list.userName}" />
</rich:column>

<rich:column id="address">
<f:facet name="header"><h:outputText styleClass="headerText" value="Address" /></f:facet>
<h:outputText value="#{list.address}" />
</rich:column>

<rich:column id="contactNo">
<f:facet name="header"><h:outputText styleClass="headerText" value="ContactNo" /></f:facet>
<h:outputText value="#{list.contactNo}" />
</rich:column>
</rich:scrollableDataTable>
</a4j:form>
</html>
</f:view>

2)ScrollerBean.java:

package form;
import java.util.ArrayList;
public class ScrollerBean {

public ScrollerBean(){}
public ScrollerBean(String userName,String address,String contactNo){
this.userName = userName;
this.address = address;
this.contactNo = contactNo;
}
private String userName ;
private String address ;
private String contactNo ;
private ArrayList initList= new ArrayList();
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAddress() {
return address;
}
public void setLastName(String address) {
this.address = address;
}

public String getContactNo() {
return contactNo;
}
public void setContactNo(String contactNo) {
this.contactNo = contactNo;
}

public ArrayList getInitList() {

initList.add(new ScrollerBean("aaa","Chennai","22222"));
initList.add(new ScrollerBean("bbb","Delhi","33333"));
initList.add(new ScrollerBean("ccc","shimla","44444"));
initList.add(new ScrollerBean("ddd","Lucknow","55555"));
initList.add(new ScrollerBean("eee","Delhi","66666"));
initList.add(new ScrollerBean("fff","Dehradun","77777"));
initList.add(new ScrollerBean("ggg","Nainital","88888"));
return initList;
}
public void setInitList(ArrayList initList) {
this.initList = initList;
}

}

3) In faces-config:

<managed-bean>
<managed-bean-name>ScrollerBean</managed-bean-name>
<managed-bean-class>form.ScrollerBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>


<navigation-rule>
<from-view-id>/jsp/scrollableTable.jsp</from-view-id>
<navigation-case>
<from-action>#{ScrollerBean.initList}</from-action>
<to-view-id>/jsp/scrollableTable.jsp</to-view-id>
</navigation-case>
</navigation-rule>

Thanks









Related Pages:
jsf code in myeclipse - Java Server Faces Questions
jsf code in myeclipse  send me the code for richTablescroller Application in myEclipse  Hi Friend, Try the following code: 1)scrollableTable.jsp
Spring MyEclipse Code - Spring
Spring MyEclipse Code  How To Configure Spring in MyEclipse ?  Hi Friend, Please visit the following link: http://www.roseindia.net/spring/spring3/spring-3-hello-world.shtml Hope that it will be helpful for you
MyEclipse - Struts
written the following code in web.xml file it is giving error web.xml... which helps me to work on MyEclipse
JSF code
need jsf code that will populate combo box values from the database  Hi, i'm new on JSf,I need jsf code that will populate combo box values from the database when the form runs
JSF
JSF  i am having two checkbox while clicking on the first checkbox 2 more radio buttons should come . if i am not checking the the second checkbox than radio buttons should not come.Please help me out .. I am pasting my code
Unable to find Software Updates in Help menu in MyEclipse
Unable to find Software Updates in Help menu in MyEclipse  Hi, I am using MyEclipse for my project. I have to use SVN repository for checking the code and need to install Subclipse plugins to MyEclipse. But I am not getting
MyEclipse - Maven
MyEclipse  How to run servlet programs in MyEclipse . Please give me the path and how to add JAR files. I am using MyEclipse 6.0 Thanks and Regards, senthilkumar.p
JSF - Framework
JSF  Can any one please provide me with code to create widget in JSF using - IBM JSF Widget Library (JWL). Thank you for your Help
JSF code Error - Java Server Faces Questions
JSF code Error  Hii Friends, When Iam working on JSF..,What jars are have to add in Applicaton? Thanks and Regards By Sreedhar
JSF Code - Java Server Faces Questions
JSF Code  I'm having difficulty persisting or insert web application programmed with Java Server Faces into the database? I need a code on how to create a user account and store the variables using the JSF Technology?  
how to close JSF application..?
how to close JSF application..?  how to close jsf appliaction using command button with help of java code
project with myeclipse - Struts
project with myeclipse  Hi, i want to develop a simple web application using struts and jsp in MyEclipse 5.5.1A. Pleas help me
jsf pagination
jsf pagination  Hi , i want to paginate some questions in jsf... on please give any solution . Thanks, Bhuban   Here is a jsp code of pagination. In the given code,we have taken the database table student(rollNo,name,marks
MyEclipse Hibernate Tutorial
This tutorial is helpful to understand how hibernate work in MyEclipse
JSF Introduction - An Introduction to JSF Technology
JSF Introduction - An Introduction to JSF Technology...; Java Server Faces or JSF for short is another new exciting technology for developing web applications based on Java technologies. This JSF
Data Source in Myeclipse - JDBC
Data Source in Myeclipse  How to create data source in MyEclipse 5.1.1 version .Here i cant find Myeclipe Report Design.Can u pls help
About JSF Framework. - Framework
About JSF Framework.  What is JSF? Why it is used?What is flow of JSF with example code.. What is the difference between Struts and JSF? Which is the best site to learn JSF frame work?  Answer : JSF JSF is new
jsf text field not blank
jsf text field not blank  text field not clear in jsf onclick of reset button in my application initial value not deleted   Hello Friend, Post your code. Thanks
JSF error - JSP-Servlet
JSF error  I tried to retrieve data for a user from database using ,i..., githu  Hi friend, Code to help in solving the problem : jsf h:commandLink example
Roseindia JSF Tutorial
Roseindia provides you an extensive range of tutorials on JSF with complete source code available for the learners at single place. Roseindia JSF Tutorials are aimed to guide the learners with complete coverage of JSF topics required
JSF
JSF  What is JSF
jsf: generate another panelGrid
jsf: generate another panelGrid  hello the following is my code print("code sample"); <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
JSF 1.2 Features
) In the previous versions of JSF it was not possible to use JSTL code with the JSF expression language. Now is JSF 1.2 you can use JSTL code with JSF. This new... Language is great feature of JSF 1.2, which enables us to mix JSTL code
Invalidate Session in JSF
Invalidate Session in JSF  Invalidate Session in JSF How to invalidate session in JSF?    ExternalContext#invalidateSession() - can be used to invalidate session in JSF. See the code below.. @ManagedBean @SessionScoped
JSF Tutorial For Beginners
. JSF provided the facility of reusability of code. Problem of working... Of JSF JSF has the various features these are as : Reusability of Code...JSF Tutorial For Beginners In this section you will learn about the JSF
Servlets in JSF - JSP-Servlet
. by double click on the control i am writing the code. As i can write the code in the form itself by double clicking why should i go for servlets to write code.... Simply what is the role of servlets in JSF. which one is the best one..jsp
JSF Books
. Without JSF, the developer has to write code to handle almost all user...JSF Books          Introduction of JSF Books When we
onmouseover event in jsf
of the project, I have a requirement in my project. I am using jsf ,spring, hibernate & mysql database. can u suggest a code for, If I place mouse on a component I want to dispaly the list of some documents by using onmouseover event in jsf
Simple Login(JSF)
Simple Login(JSF)  I have tried to run the Simple Login code provided using netbeans. It gives me error. CAn I run it using netbeans or need to config anything in order to run the prog
JSF Properties - Using Properties files in JSF
to be used in the forms. JSF Modification Modify the code of "... will refer this bundle in our jsf page.  Now modify the code of "...JSF Properties - Using Properties files in JSF   
Visual web JSF - JDBC
from jsf textfield and button through query please not through jsp but through jsf managed bean code i tried but the data is inserting in mysql that is null... on JSF visit to : http://www.roseindia.net/jsf/ Thanks
Unable to install Subversion plugins in MyEclipse
Unable to install Subversion plugins in MyEclipse  Thanks for your reply Deepak. I am using MyEclipse Blue Edition 8.6 M1. I tried adding Subversion plugins and got error. This is the path i followed: Help --> MyEclipse
JSF core Tag Reference
JSF Core Tag Reference      ... about JSF Core Tags. All these core tags are contained in JSF Core Tag Library...; directive at the top of code where "uri" is set to http
JSF Interview Questions
JSF Interview Questions          Who are the users of JSF technology? JSF... and flexible in its architecture JSF allows a wide range of users
JSF Components
JSF Components      Components in JSF are elements like text box, button, table etc.. that are used to create UI of JSF Applications. These are objects that manage interaction
JSF
JSF  In what way JSF makes the difference between Applets?? After reading this article I understood instead of using Request and response, we... and embed that into applets also rite.. Do u mean JSF also does the same internally
JSF HTML Tag Reference
JSF HTML Tag Reference      In this section, you will learn more about html tags provided in JSF. JSF HTML tags are used for design the page by using server side code. This tag
Java Server Faces (JSF)
how to write JSF code for navigation and event handling. To master... Java Server Faces (JSF)       JSF Training Course Objectives
insert date into database using jsf
insert date into database using jsf  Hello I need a simple example of source code to insert a date into a database using jsf what do I have to put in backing bean and page jsf ( i need juste a date ) thanks
how to ruv servlet program in myeclipse blue edition?
how to ruv servlet program in myeclipse blue edition?  how to ruv servlet program in myeclipse blue edition?  Servlets are run in a web... project, in MyEclipse, and the web server can be launched from MyEclipse. You can
JSF Select one menu - Framework
JSF Select one menu  Hi, I am new in Jsf, I use one this is based... of JSF is not showing it show (canā??t display the mainlayer component in the visual... Vivek   Hi friend, Code to help in solving the problem
jsf - Java Server Faces Questions
jsf  Hi friends, i have a problem with jsf commandlink,i need 2 links in my jsf page i wrote code like... code to solve the problem. For more information on JSF visit to : http
JSF - Java Server Faces Tutorials
JSF tutorial comes with free source code and configuration files... the example with the complete code of the program.    JSF...JSF - Java Server Faces Tutorials Complete Java Server Faces (JSF
how to creating hbm files in hibernate using Myeclipse
how to creating hbm files in hibernate using Myeclipse  how to creating hbm files in hibernate using Myeclipse
jsf - Java Server Faces Questions
jsf  Hi, In my project there are 3 jsp pages and one jsf page ,first jsp page forwarding the request to jsf page then this jsf gives the greeting... in blue colour in italic style,then tell me the code how to get it.I hava one
How create csv format in jsf ?
How create csv format in jsf ?  Dear Friends , Good morning to all of you? I have a problem to create .CSV format in jsf. Actully I have successfully created .PDF files of my jasper report form jrxml in jsf
How to develop EJB3.0 , jsp with myeclipse ? - EJB
How to develop EJB3.0 , jsp with myeclipse ?  Hi, How to develop EJB3.0,jsp project with myeclipse using jboss4.2.2. I have problem in project type File - > New - > Enterprise Application Project. Please any body
JSF Tags
code fragment we have imported two JSF tag libraries with the help of taglib...JSF Tags      JSF application typically uses JSP pages to represent views. JSF provides useful
dropdown list in jsf
continues for state and areas related to state.Please provide the code

Ask Questions?

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.