This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118366 - [60cat] Create a "dataprovider" out of a Entity Bean
Summary: [60cat] Create a "dataprovider" out of a Entity Bean
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 2 votes (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-10 14:09 UTC by racx
Modified: 2008-02-06 14:40 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description racx 2007-10-10 14:09:14 UTC
[ JDK VERSION : 1.6.0_02 ]

I think it would be time saving for programming with JSF if we can
have a wizard to create a dataprovider out of an entity bean.

That way, it will be easier to bind a DataProvider with a visual
component at design time.
The created dataprovider can be empty with the following
constructor:

/** Creates a new instance of membersDataProvider */
    public membersDataProvider() {

        // dummy data for design time
        membersList.add(new Members());

        // Wrap the list
        setList(membersList);
    }


That way when we finish designing the page in the visual designer we
can go back to the code of the data provider and add all the
necessary methods.


Best Regards,

Rachad
Comment 1 racx 2007-10-10 20:56:11 UTC
Additional Explanation:

Having a JSF application and working with JPA as our data backend. While injecting the entity beans to the visual web 
component, we have to create a data provider class for the entity bean we need to inject,  that data provider class 
usually extends the "ObjectListDataProvider" class.

And then we bind the "Table"(for instance) in the visual web to that Data Provider.

So it would be practical to have the possibility to create on design time that DataProvider class. to be able to bind 
it to our visual componet.

Please look at this example, where Members is the entity bean, and MembersDataProvider is the needed Data Provider:

public class MembersDataProvider extends ObjectListDataProvider{

    private List membersList = new ArrayList();

    /** Creates a new instance of MembersDataProviderr */
    public MembersDataProvider() {

        // Dummy data for design time
        membersList.add(new Members());

        // Wrap the list
        setList(membersList);
    }
}
Comment 2 John Baker 2008-01-10 01:50:28 UTC
no resources to implement for 6.x