Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSF-Questions jsf code in myeclipse
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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



Advertisement
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
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 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?  
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
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  What is JSF
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 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
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
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
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
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
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
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
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: 1)Extendable 2)Best CVS / SVN Support 3)Good plugins (e.g. CDT, PHPEclipse) 4) Native look and feel across
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
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
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
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
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
JSF architecture
JSF architecture  What is JSF architecture
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
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 close JSF application..?
how to close JSF application..?  how to close jsf appliaction using command button with help of java code
jsf attribute
jsf attribute  What is the different between value and binding attribute of jsf
 

 

 

DMCA.com