jsf code in myeclipse

jsf code in myeclipse

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 Tutorials/Questions & Answers:
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
Advertisements
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 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?  
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
MyEclipse - Struts
written the following code in web.xml file it is giving error web.xml... which helps me to work on MyEclipse
JSF
JSF  What is JSF
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
MyEclipse Hibernate Tutorial
This tutorial is helpful to understand how hibernate work in MyEclipse
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
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
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
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
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
JSP in MyEclipse Enterprise Workbench 8.5
JSP in MyEclipse Enterprise Workbench 8.5  I am using MyEclipse Enterprise Workbench version 8.5. I have just started learning jsp programs. and I am facing the following problem:- <%@ page import="com.ora.jsp.util.*" %>
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
Source Code for Implementing Search Feature in JSF/JSP using Servlet - Java Beginners
Source Code for Implementing Search Feature in JSF/JSP using Servlet  How do I write the source code to implement search feature in JSF/JSP using..., example in jsf, jsp, java method   Hi friend, package javacode
please check my code is wrong or ok.it was not work .this is form validation in javascript using jsf page
please check my code is wrong or ok.it was not work .this is form validation in javascript using jsf page  <p>?xml version='1.0' encoding...://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html
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
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
please check my code is wrong or ok.it was not work .this is form validation in javascript using jsf page
Form validation in javascript using jsf page  ?xml version='1.0... xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <h:head>
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 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
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 architecture
JSF architecture  What is JSF architecture
what is the difference between the eclipse and myeclipse - IDE Questions
what is the difference between the eclipse and myeclipse  what is the difference between the eclipse and myeclipse  Hi Friend, Difference: Eclipse is an IDE or platform for developing, whereas MyEclipse
jsf attribute
jsf attribute  What is the different between value and binding attribute of jsf
how to close JSF application..?
how to close JSF application..?  how to close jsf appliaction using command button with help of java code
wt is the advantage of myeclipse ide compare to others
wt is the advantage of myeclipse ide compare to others  plz give me the reply   Hi Friend, Advantages: ADS_TO_REPLACE_1 1)Extendable 2)Best CVS / SVN Support 3)Good plugins (e.g. CDT, PHPEclipse) ADS_TO_REPLACE_2 4
JSF Tutorial
JSF Tutorial  plz provide the jsf complete tutorial  Hi, We have lot's of JSF tutorials. Please read it at [http://roseindia.net/jsf/][1] Thanks [1]: http://roseindia.net/jsf/  The link is http
Advantages of JSF
Advantages of JSF  What are the advantages of JSF
Implementations of JSF
Implementations of JSF  What are the available implementations of JSF
JSF framework
JSF framework  hi Can I use Jdeveloper to learn JSF framework? thanks Sangeetha
jsf session
jsf session  How to maintain session in jsf login application?   Please visit the following links: http://www.roseindia.net/jsf/richfaces/creating-managed-bean.shtml http://www.roseindia.net/jsf/RememberMeLogin.shtml
jsf session
jsf session  How to maintain session in jsf login application?   Please visit the following links: http://www.roseindia.net/jsf/richfaces/creating-managed-bean.shtml http://www.roseindia.net/jsf/RememberMeLogin.shtml
JSF Tutorial
JSF Tutorial  I am novice to JSF Programming. And want to learn the Java Server Faces (JSF) technology online. So, could you please list down few helpful JSF Tutorials. Also, which is the latest version of Java Server Faces (JSF
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 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
JSF Related
JSF Related  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
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. (adsbygoogle = window.adsbygoogle || []).push
Download full code of JSF, Spring and Hibernate based Registration program
Download full code of JSF, Spring and Hibernate based Registration program...; From this page you can download the source code of the application. Downloading codeADS_TO_REPLACE_1 Click here to download the code of the application
JSF+Filter
JSF+Filter  What is the meaning of the tags: avoid-urls for filter configurations in web.xml.
JSF 1.2 Features
to use JSTL code with the JSF expression language. Now is JSF 1.2 you can use JSTL code with JSF. This new feature of JSF 1.2 is know as Unified Expression... enables us to mix JSTL code with the JSF expression language.  
How to create and execute Hibernate project with out Myeclipse ide ?
How to create and execute Hibernate project with out Myeclipse ide ?  Hi, I am new to Hibernate programming please provide me rough design for creating and executing Hibernate project. Thank you
JSF Navigation By Example
. This section illustrates you about the JSF navigation by providing the example with the complete code of the program. In the Roseindia JSF Tutorial you will see...JSF Navigation By Example     
JSF - Framework
information : http://www.roseindia.net/jsf/SimpleHelloByEnteringName.shtml http://www.roseindia.net/jsf/richfaces/creating-managed-bean.shtml 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
Jsf biggener
Jsf biggener  hi friends, am new to jsf,i got an exception while...;Hi Friend, Please visit the following links: JSF TutorialsADS_TO_REPLACE_4 JSF-NetBeans Tutorials Thanks
jsf question
jsf question  what the jsf really is and how it come up in existence... FACES'.JSF 1.0 was released in March, 2004 & a maintenance release 1.1 in June... is a component oriented and event driven framework for web applications. JSF eases

Ads