I have a strange problem. I tried the Sample code for JSF component ui:table that uses a TripDataProvider. Here is the sample code
package com.kbs;
import com.sun.data.provider.impl.ObjectListDataProvider;
import java.util.ArrayList;
import java.util.Set;
public class TripDataProvider extends ObjectListDataProvider{
private ArrayList tripsList = new ArrayList();
/** Creates a new instance of tripDataProvider */
public TripDataProvider() {
// Put in dummy data for design time
tripsList.add(new Trip());
// Wrap the list
setList(tripsList);
}
public void refreshTripsList(Integer personId){
tripsList.clear();
}
}
The Trip is a simple bean class with some attributes, getters and setters. Pls note the package com.kbs in the TripDataProvider. I added a property of TripDataProvider in the SessionBean1.java. When I go to my Page1 design and right click on my table and bring up the Table Layout, I dont see the tripDataProvider in the drop down list.
However, If I change the package of my classes from com.kbs to just kbs, then everything works fine and I can select this data provider. Could someone pls help me identify the problem. I have created new projects and tried several times to understand the problem but I have no clue about its solution.
thanks
RK
Message was edited by:
rupakk1
By the way I am referring to the JSF Hibermate tutorial at
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/hibernate.html
It has a TripDataProvider.
Message was edited by:
rupakk1
From the project that works fine, If I copy the JSP source about that table into the other project which has the problem, there is a PropertyNotfound exception for trip where trip is defined as a property in SessionBean1 as TripDataProvider. However, If i declare another property of type String, it is easily recognizable but not trip. I checked my managed-beans.xml also, it is allright.