You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kshitiz <k....@gmail.com> on 2012/07/31 09:25:41 UTC

Editing list in Dataview

Hi,

Right now I am using listview but I am considering to look after dataview
where data is fetched from database everytime you change page. So, do we
have to modify our query to get the required data to be displayed in the
page? I mean right now I am  retrieving all data from database. 

Also, will it be possible for me to update the list being displayed in a
page like deleting a content or rearranging them?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Editing-list-in-Dataview-tp4650885.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Editing list in Dataview

Posted by jchappelle <jc...@4redi.com>.
You don't have to have Spring to do this one table, it just makes it easier
to do many more like really fast in the future. It is more scalable.

The Dataview and ListView components are just the UI component(the view). So
your query won't have to change. The main thing that will change is how you
feed the data returned by your query to the view. So for ListView you are
either using a List or a IModel to feed it data. With a Dataview you will
have to implement IDataProvider to feed it data. 

If your query is handling pagination right now then you are good, however if
it isn't then here is something to consider. You can still have paging
without modifying the query but if you do that then that means the query
will return all records, and you will be filtering your results down inside
your java code. A lot of my Dataviews do that because the result sets are
small enough, however if you have very large result sets then you might
consider incorporating paging into your query.

Josh





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Editing-list-in-Dataview-tp4650885p4651041.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Editing list in Dataview

Posted by kshitiz <k....@gmail.com>.
Thanks Paul...I was wondering though..is there any way to do without Spring?
I mean why to go for Spring just for one component...



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Editing-list-in-Dataview-tp4650885p4650995.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Editing list in Dataview

Posted by Paul BorČ™ <pa...@bors.ws>.
Refer to Wicket's examples and how to use Spring.
http://www.wicket-library.com/wicket-examples/spring/

Once you get the injection going you can write your own DAOs (Hibernate, JDBC, etc) that filter the SQL given a data table toolbar and sort them by the selected column. You would need to learn how to use pagination with the data providers so that you only query the DB for the few records you need to display per page.

To learn more about wicket get yourself a book:
http://wicket.apache.org/learn/books/

Have fun and welcome to Wicket.

Have a great day,
Paul BorČ™

On Jul 31, 2012, at 3:25, kshitiz <k....@gmail.com> wrote:

> Hi,
> 
> Right now I am using listview but I am considering to look after dataview
> where data is fetched from database everytime you change page. So, do we
> have to modify our query to get the required data to be displayed in the
> page? I mean right now I am  retrieving all data from database. 
> 
> Also, will it be possible for me to update the list being displayed in a
> page like deleting a content or rearranging them?
> 
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Editing-list-in-Dataview-tp4650885.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org