Re: [Wicket-user] A trivial problem with tables that i can't manage
Thank you very much for your support. Actually, i'm using Mysql and was wondering how to set a min and max limit on a select. And because i love exotic solutions, i use Cayenne for persistence :-) I will check if Cayenne can do the thing, but Eelco's solution seems very satisfying. 2007/6/25, Scott Swank [EMAIL PROTECTED]: On 6/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On Monday, June 25, 2007, 9:54:58 PM, Landry [EMAIL PROTECTED] wrote: A problem remains, however : i don't know how to implement IDataProvider.iterator(int first, int count). Must be something like this in oracle : select * from mytable where rownum=first and rownum count Actually, in Oracle, it's significantly more complex than the above, but let's not go there (unless you're actually doing that in Oracle?). But how to do this in mysql ? (row_id could do the thing, but it is only available when your primary key is integer). I've not used MySQL for years, but I think it's select * from mytable order by whatever limit first, count where 'first' is from 0. If you are using an ORM tool (JPA, Hibernate, JDO) the tool might do specific optimizations for you. But I think what most people (/ implementations) do is just scroll the result set cursor to the first record needed. Eelco In Hibernate, and more widely in JPA, you use setFirstResult() setMaxResults() on your query. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
On Tuesday, June 26, 2007, 9:25:15 AM, landry [EMAIL PROTECTED] wrote: Thank you very much for your support. Actually, i'm using Mysql and was wondering how to set a min and max limit on a select. And because i love exotic solutions, i use Cayenne for persistence I will check if Cayenne can do the thing, but Eelco's solution seems very satisfying. Incidentally, if you've got any tips/notes that might help anyone looking to use Cayenne with Wicket, please add them to the Wiki - Maybe a child page below http://cwiki.apache.org/WICKET/database-interaction.html ? /Gwyn - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
I'm as newbie to Cayenne as i am to Wicket, so i'm not sure that i do things the right way ! Anyway, i will have some free time this summer : a good occasion to complete the wiki. 2007/6/26, Gwyn Evans [EMAIL PROTECTED]: On Tuesday, June 26, 2007, 9:25:15 AM, landry [EMAIL PROTECTED] wrote: Thank you very much for your support. Actually, i'm using Mysql and was wondering how to set a min and max limit on a select. And because i love exotic solutions, i use Cayenne for persistence I will check if Cayenne can do the thing, but Eelco's solution seems very satisfying. Incidentally, if you've got any tips/notes that might help anyone looking to use Cayenne with Wicket, please add them to the Wiki - Maybe a child page below http://cwiki.apache.org/WICKET/database-interaction.html ? /Gwyn - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
Thank you so much for your answer. GridView seems to achieve exactly what i need. A problem remains, however : i don't know how to implement IDataProvider.iterator(int first, int count). Must be something like this in oracle : select * from mytable where rownum=first and rownum count But how to do this in mysql ? (row_id could do the thing, but it is only available when your primary key is integer). Thanks for your help. Igor Vaynberg a écrit : On 6/23/07, *Landry Soules* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello, I have a very simple problem: i just want to display a table of customers, with some infos on each entry. No problem to achieve that when you deal with one record per line. The problem is that i want to display 4 customers on each row, as this : = Customer1 || Customer2 || Customer3 || Customer4 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName = Customer5 || Customer6 || Customer7 || Customer8 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName It sounds so simple, but i can't figure out how to do this. Can someone help me, please ? see GridView component. example here [1] [1] http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.GridViewPage -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
On Monday, June 25, 2007, 9:54:58 PM, Landry [EMAIL PROTECTED] wrote: A problem remains, however : i don't know how to implement IDataProvider.iterator(int first, int count). Must be something like this in oracle : select * from mytable where rownum=first and rownum count Actually, in Oracle, it's significantly more complex than the above, but let's not go there (unless you're actually doing that in Oracle?). But how to do this in mysql ? (row_id could do the thing, but it is only available when your primary key is integer). I've not used MySQL for years, but I think it's select * from mytable order by whatever limit first, count where 'first' is from 0. /Gwyn - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
On Monday, June 25, 2007, 9:54:58 PM, Landry [EMAIL PROTECTED] wrote: A problem remains, however : i don't know how to implement IDataProvider.iterator(int first, int count). Must be something like this in oracle : select * from mytable where rownum=first and rownum count Actually, in Oracle, it's significantly more complex than the above, but let's not go there (unless you're actually doing that in Oracle?). But how to do this in mysql ? (row_id could do the thing, but it is only available when your primary key is integer). I've not used MySQL for years, but I think it's select * from mytable order by whatever limit first, count where 'first' is from 0. If you are using an ORM tool (JPA, Hibernate, JDO) the tool might do specific optimizations for you. But I think what most people (/ implementations) do is just scroll the result set cursor to the first record needed. Eelco Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html ;) On 6/25/07, Gwyn Evans [EMAIL PROTECTED] wrote: On Monday, June 25, 2007, 9:54:58 PM, Landry [EMAIL PROTECTED] wrote: A problem remains, however : i don't know how to implement IDataProvider.iterator(int first, int count). Must be something like this in oracle : select * from mytable where rownum=first and rownum count Actually, in Oracle, it's significantly more complex than the above, but let's not go there (unless you're actually doing that in Oracle?). But how to do this in mysql ? (row_id could do the thing, but it is only available when your primary key is integer). I've not used MySQL for years, but I think it's select * from mytable order by whatever limit first, count where 'first' is from 0. /Gwyn - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Scott Swank reformed mathematician - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
On 6/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On Monday, June 25, 2007, 9:54:58 PM, Landry [EMAIL PROTECTED] wrote: A problem remains, however : i don't know how to implement IDataProvider.iterator(int first, int count). Must be something like this in oracle : select * from mytable where rownum=first and rownum count Actually, in Oracle, it's significantly more complex than the above, but let's not go there (unless you're actually doing that in Oracle?). But how to do this in mysql ? (row_id could do the thing, but it is only available when your primary key is integer). I've not used MySQL for years, but I think it's select * from mytable order by whatever limit first, count where 'first' is from 0. If you are using an ORM tool (JPA, Hibernate, JDO) the tool might do specific optimizations for you. But I think what most people (/ implementations) do is just scroll the result set cursor to the first record needed. Eelco In Hibernate, and more widely in JPA, you use setFirstResult() setMaxResults() on your query. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
Hi, I am a Wicket Newbie - so I'm sure this isn't he best solution I have... I see two easy solutions: 1: Convert your data into some sort of row model. You could create some sort of strategy that is used as model for the item. Each strategy resolves one value of the customer. Instead of iterating (with the DataView) over all customers and then adding the values. Iterate over the strategies and add labels for each customer. 2: Do not use tabels. Use some sort of divs instead. ;) Johannes Schneider Landry Soules wrote: Hello, I have a very simple problem: i just want to display a table of customers, with some infos on each entry. No problem to achieve that when you deal with one record per line. The problem is that i want to display 4 customers on each row, as this : = Customer1 || Customer2 || Customer3 || Customer4 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName = Customer5 || Customer6 || Customer7 || Customer8 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName It sounds so simple, but i can't figure out how to do this. Can someone help me, please ? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Johannes Schneider Im Lindenwasen 15 72810 Gomaringen Fon +49 7072 9229972 Fax +49 7072 50 Mobil +49 178 1364488 [EMAIL PROTECTED] http://www.johannes-schneider.info smime.p7s Description: S/MIME Cryptographic Signature - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] A trivial problem with tables that i can't manage
Hello, I have a very simple problem: i just want to display a table of customers, with some infos on each entry. No problem to achieve that when you deal with one record per line. The problem is that i want to display 4 customers on each row, as this : = Customer1 || Customer2 || Customer3 || Customer4 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName = Customer5 || Customer6 || Customer7 || Customer8 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName It sounds so simple, but i can't figure out how to do this. Can someone help me, please ? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A trivial problem with tables that i can't manage
On 6/23/07, Landry Soules [EMAIL PROTECTED] wrote: Hello, I have a very simple problem: i just want to display a table of customers, with some infos on each entry. No problem to achieve that when you deal with one record per line. The problem is that i want to display 4 customers on each row, as this : = Customer1 || Customer2 || Customer3 || Customer4 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName = Customer5 || Customer6 || Customer7 || Customer8 firstName || firstName || firstName || firstName lastName || lastName || lastName || lastName It sounds so simple, but i can't figure out how to do this. Can someone help me, please ? see GridView component. example here [1] [1] http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.GridViewPage -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user