En  Fa
softprojects.org
Discovering: Tips & Tricks  > Languages  > Java Tips  > Using ObjectArrayDataProvider component to show list of objects in a table component in VWP
 

Using ObjectArrayDataProvider component to show list of objects in a table component in VWP

Print version  

Using ObjectArrayDataProvider component to show list of objects in a table component in VWP

For showing list of object in a table component, best choose is ObjectListDataProvider component; like this sample.
But until now the ObjectListDataProvider component in the palette have not worked and we must write a class that extends ObjectListDataProvider .
But there is a component that can act return ObjectListDataProvider. That is ObjectArrayDataProvider.
We can easily drag and drop this component into design page and then set the array property .
For this propose first declare an array in the page :

private Entity.Person[] arrayPerson ;

public Person[] getArrayPerson()
{
   return this.arrayPerson;
}

public void setArrayPerson(Person[] arrayPerson)
{
  this.arrayPerson = arrayPerson;
}

Then drag and drop ObjectArrayDataProvider component into design page, then set the array property to arrayPerson.
Now we can right click on the table component, in the page and select Bind to data then select ObjectArrayDataProvider1 .

Details
      
Writer: saeed zarinfam
Sent by: Salar Khalilzadeh
Source: saeedzarinfam.blogspot.com
Date Sent: 10/21/2008 6:47 PM
Views: 141
Votes: 1
Rating: 4.00 Points from 4.00 Points

Your Rating:
bookmark this
 

There is no comment for this topic.

Language:

Copyright © 2008 SoftProjects.org | About | Valid XHTML | CSS