RE: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-27 Thread Wilhelmsen Tor Iver
 I want to know how to input date into database using form. I am using 
 Timestamp in mysql.

The Wicket-related psrt of that question is that you use a TextFieldDate with 
a model, and you then get the model object value in onSubmit() and use normal 
SQL to insert or update.

- Tor Iver


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



Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-27 Thread Richard W. Adams
Just parse the date string into a Timestamp. That's Java, not Wicket.

RAM /abr./: Rarely Adequate Memory. 



From:   SudeepShakya shakyasud...@live.com
To: users@wicket.apache.org
Date:   03/26/2012 11:03 PM
Subject:Re: Creating a submit form which takes date and a string 
as input and displays the data from database(mysql) using simple jdbc



I want to know how to input date into database using form. I am using
Timestamp in mysql.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4507896.html

Sent from the Users forum mailing list archive at Nabble.com.

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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-27 Thread SudeepShakya
I have used Date.valueOf(String). But submitting the form Null Pointer
Exception is thrown.

While submitting i have created an object of Application.java and the class
with getter and setters.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4508800.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread SudeepShakya
I am new to wicket and also to webframeworks. i am creating an app, which has
a homepage and when a link is clicked, it should display a form which takes
two dates and a string as input and retrieves data from database.
Thanks in advance.
I tried to learn from 'wicket in action' but the example codes do not work
much wicket 1.4.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4505124.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread Andrea Del Bene

Hi,

what exactly is your problem? What problems are you having so far?

I am new to wicket and also to webframeworks. i am creating an app, which has
a homepage and when a link is clicked, it should display a form which takes
two dates and a string as input and retrieves data from database.
Thanks in advance.
I tried to learn from 'wicket in action' but the example codes do not work
much wicket 1.4.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4505124.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread SudeepShakya
I have created a form which takes two dates/time and a textbox and created a
class for get/set.
And, it should work as : when i insert the data, it should check the data in
the database and display the filtered data as specified by the inputs .
Also i have created a jdbc connection  and a method for retrieving data .
I don't know how to create a textbox that takes date/time as input and it
will be easy to the user to input.
I have created following files which I have attached. And also created html
files for form input and filtered display.

Thanx for response.
http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteCollection.java
VoteCollection.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteCollectionJDBC.java
VoteCollectionJDBC.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteDisplayPage.java
VoteDisplayPage.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteEditForm.java
VoteEditForm.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteEditPage.java
VoteEditPage.java 
http://apache-wicket.1842946.n4.nabble.com/file/n4505444/Votes.java
Votes.java 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4505444.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread James Carman
Have you looked at the examples from the website?
On Mar 26, 2012 7:20 AM, SudeepShakya shakyasud...@live.com wrote:

 I have created a form which takes two dates/time and a textbox and created
 a
 class for get/set.
 And, it should work as : when i insert the data, it should check the data
 in
 the database and display the filtered data as specified by the inputs .
 Also i have created a jdbc connection  and a method for retrieving data .
 I don't know how to create a textbox that takes date/time as input and it
 will be easy to the user to input.
 I have created following files which I have attached. And also created html
 files for form input and filtered display.

 Thanx for response.

 http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteCollection.java
 VoteCollection.java

 http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteCollectionJDBC.java
 VoteCollectionJDBC.java

 http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteDisplayPage.java
 VoteDisplayPage.java
 http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteEditForm.java
 VoteEditForm.java
 http://apache-wicket.1842946.n4.nabble.com/file/n4505444/VoteEditPage.java
 VoteEditPage.java
 http://apache-wicket.1842946.n4.nabble.com/file/n4505444/Votes.java
 Votes.java

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4505444.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread SudeepShakya
I have viewed some of the examples but not appropriate one. Can u give some
hint

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4505882.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread James Carman
http://www.wicket-library.com/wicket-examples/dates/


On Mon, Mar 26, 2012 at 9:55 AM, SudeepShakya shakyasud...@live.com wrote:
 I have viewed some of the examples but not appropriate one. Can u give some
 hint

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4505882.html
 Sent from the Users forum mailing list archive at Nabble.com.

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


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



Re: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-26 Thread SudeepShakya
I want to know how to input date into database using form. I am using
Timestamp in mysql.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-a-submit-form-which-takes-date-and-a-string-as-input-and-displays-the-data-from-database-myc-tp4505124p4507896.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Re: Re: jdbc

2010-02-16 Thread Ivan Dudko
Thank you all guys!

I just do it with Map.

Especially thanks to Leo.Erlandsson!

2010/2/15  leo.erlands...@tyringe.com:
 Should be no different when using JDBC than using it when using Domain
 Objects.

 Check out Wicket Phonebook Example that uses FilterToolbar:
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook

 Source Code Example:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/phonebook/src/main/java/wicket/contrib/phonebook/web/page/ListContactsPage.java


 Thank you!
 I just discovered this sample:
 http://www.brettdutton.com/blog/?p=4

 What i can do.. if i want to use FilterToolbar with DataTable?


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



Re: jdbc

2010-02-16 Thread Hauke Ingmar Schmidt
Hej,

2010/2/11 Giambalvo, Christian christian.giamba...@excelsisnet.com:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

Unrelated to the original posters question, but: The sort method used
in this sample does not work correctly. It gets a sublist and sorts
the sublist instead of sorting the base data and getting the sublist
from the sorted data. It doesn't show in the sample because no paging
is used and the base data is already sorted.

Hej då
Hauke Ingmar

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



Re: jdbc

2010-02-16 Thread Hauke Ingmar Schmidt
Hej,

2010/2/16 Hauke Ingmar Schmidt haukeing...@gmail.com:
 2010/2/11 Giambalvo, Christian christian.giamba...@excelsisnet.com:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 Unrelated to the original posters question, but: The sort method used
 in this sample does not work correctly. It gets a sublist and sorts
 the sublist instead of sorting the base data and getting the sublist
 from the sorted data. It doesn't show in the sample because no paging
 is used and the base data is already sorted.

Fixed. And I generified the example.

Hej då
Hauke Ingmar

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



Re: Re: jdbc

2010-02-15 Thread Leo . Erlandsson
now problem is not accessing object fields..

problem is transform resultset to these objects..

You could just work with Maps in Wicket instead of Domain Objects. The 
transformation from ResultSet to a Map containing the Column name as Key 
and the data as Value should be trivial (if not; reply and I'll provide 
sample code) using MetaData (this is how we do it in our JSP pages today).

Or you could write / find a software that does the mapping from JDBC 
ResultSet to Domain Objects... But why not use an ORM such as Hibernate / 
Cayenne / iBatis then.. ?





Re: jdbc

2010-02-15 Thread Ilja Pavkovic
use any preferred OR mapper like hibernate, toplink, 

 now problem is not accessing object fields..
 
 problem is transform resultset to these objects..
 
 2010/2/12 James Carman jcar...@carmanconsulting.com:
  You could create a reference from Honey to Milk, since you have a
  milkid field there.  Then, you'd use a list of Honey objects and
  you'd display these properties:
  
  id
  milk.id
  name
  milk.name
  
  On Fri, Feb 12, 2010 at 3:58 AM, Ivan Dudko ivan.du...@gmail.com wrote:
  For example..
  class Honey {
  int id;
  int milkid;
  String name;
  // getters and setters
  }
  class Milk {
  int id;
  String name;
  // getters and setters
  }
  
  and my query:
  SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
  milk.name MILKNAME FROM honey, milk
  WHERE  honey.milkid=milk.id;
  
  And i want to display table with these fields.
  
  Which object i must use?
  
  2010/2/11 James Carman jcar...@carmanconsulting.com:
  Well, what sort of object do you want to display?  Are you going to
  just create an Object[] for each row in the table?  Or, are you
  creating a DTO of some sort?
  
  On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com 
wrote:
  Thank you.
  I already do simple things with hibernate and spring ioc.
  Now i want to use plain old jdbc.
  I already get the datatable wich works with one pojo (table).
  Now i am in trouble.. how i can get table for two joined tables, for
  example?
  
  2010/2/11 James Carman jcar...@carmanconsulting.com:
  Yeah, but this doesn't give them an example of how to get the results
  out of a JDBC result set.  This is based on a static, in-memory list
  of Contact objects.  What I would recommend is to look at a
  Hibernate-based example and come up with the JDBC analog.  Here's an
  example from my Advanced Wicket talk I gave a while back:
  
  http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main
  /java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java
  
  At the bottom, there's a data provider which talks to a repository
  to get its data.
  
  
  
  On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
  
  christian.giamba...@excelsisnet.com wrote:
  http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.htm
  l
  
  -Ursprüngliche Nachricht-
  Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
  Gesendet: Donnerstag, 11. Februar 2010 15:47
  An: users@wicket.apache.org
  Betreff: Re: jdbc
  
  I already have method that return my data from db as arraylist. And
  i use this in iterator() method of dataprovider.
  But which object (i think model) i must return?
  
  2010/2/11 James Carman jcar...@carmanconsulting.com:
  You need to create a provider for your data.  Look at what the
  constructor takes and then implement the interface.
  
  On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com 
wrote:
  Hello!
  
  I can't understand how to populate data from a resultset object
  into datatable. Anyone have an example?
  
  Thank you!
  
  --
  --- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  ---
  -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
  additional commands, e-mail: users-h...@wicket.apache.org
  
  
  - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
  additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
  additional commands, e-mail: users-h...@wicket.apache.org
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional

Re: jdbc

2010-02-15 Thread Ivan Dudko
Can you give me an example, how i can use ResultSet transformed into
Map with for example datatable component?
I think i can write method transforming ResultSet to a Map.

I do not want to use any ORM, because web tier for my app is just
control panel and main features implemented in the backend.


2010/2/15 Ilja Pavkovic ilja.pavko...@binaere-bauten.de:
 use any preferred OR mapper like hibernate, toplink, 

 now problem is not accessing object fields..

 problem is transform resultset to these objects..

 2010/2/12 James Carman jcar...@carmanconsulting.com:
  You could create a reference from Honey to Milk, since you have a
  milkid field there.  Then, you'd use a list of Honey objects and
  you'd display these properties:
 
  id
  milk.id
  name
  milk.name
 
  On Fri, Feb 12, 2010 at 3:58 AM, Ivan Dudko ivan.du...@gmail.com wrote:
  For example..
  class Honey {
  int id;
  int milkid;
  String name;
  // getters and setters
  }
  class Milk {
  int id;
  String name;
  // getters and setters
  }
 
  and my query:
  SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
  milk.name MILKNAME FROM honey, milk
  WHERE  honey.milkid=milk.id;
 
  And i want to display table with these fields.
 
  Which object i must use?
 
  2010/2/11 James Carman jcar...@carmanconsulting.com:
  Well, what sort of object do you want to display?  Are you going to
  just create an Object[] for each row in the table?  Or, are you
  creating a DTO of some sort?
 
  On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com
 wrote:
  Thank you.
  I already do simple things with hibernate and spring ioc.
  Now i want to use plain old jdbc.
  I already get the datatable wich works with one pojo (table).
  Now i am in trouble.. how i can get table for two joined tables, for
  example?
 
  2010/2/11 James Carman jcar...@carmanconsulting.com:
  Yeah, but this doesn't give them an example of how to get the results
  out of a JDBC result set.  This is based on a static, in-memory list
  of Contact objects.  What I would recommend is to look at a
  Hibernate-based example and come up with the JDBC analog.  Here's an
  example from my Advanced Wicket talk I gave a while back:
 
  http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main
  /java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java
 
  At the bottom, there's a data provider which talks to a repository
  to get its data.
 
 
 
  On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
 
  christian.giamba...@excelsisnet.com wrote:
  http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.htm
  l
 
  -Ursprüngliche Nachricht-
  Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
  Gesendet: Donnerstag, 11. Februar 2010 15:47
  An: users@wicket.apache.org
  Betreff: Re: jdbc
 
  I already have method that return my data from db as arraylist. And
  i use this in iterator() method of dataprovider.
  But which object (i think model) i must return?
 
  2010/2/11 James Carman jcar...@carmanconsulting.com:
  You need to create a provider for your data.  Look at what the
  constructor takes and then implement the interface.
 
  On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com
 wrote:
  Hello!
 
  I can't understand how to populate data from a resultset object
  into datatable. Anyone have an example?
 
  Thank you!
 
  --
  --- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
  ---
  -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
  additional commands, e-mail: users-h...@wicket.apache.org
 
  
  - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
  additional commands, e-mail: users-h...@wicket.apache.org
 
 
  
  - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
  additional commands, e-mail: users-h...@wicket.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org

Re: jdbc

2010-02-15 Thread Ilja Pavkovic
 Can you give me an example, how i can use ResultSet transformed into
 Map with for example datatable component?
 I think i can write method transforming ResultSet to a Map.
 
 I do not want to use any ORM, because web tier for my app is just
 control panel and main features implemented in the backend.

You want to swim without getting wet. Fine :)

public class MyMilkFactory {
public ListMilk provideHoneyObjects() {
// iterate over sql statement/REsultSet
   Milk milk = createMilk(rs);
   Honey honey provideHoney(rs.getInteger(honeyid));
   
}

public Milk createMilk(ResultSet rs) { // do not use an OR/mapper here 
but do the dirty work on your own}

public Honey provideHoney(int id) {//read from database, again do the 
dirty work on your own }
}




 2010/2/15 Ilja Pavkovic ilja.pavko...@binaere-bauten.de:
  use any preferred OR mapper like hibernate, toplink, 
  
  now problem is not accessing object fields..
  
  problem is transform resultset to these objects..
  
  2010/2/12 James Carman jcar...@carmanconsulting.com:
   You could create a reference from Honey to Milk, since you have a
   milkid field there.  Then, you'd use a list of Honey objects and
   you'd display these properties:
   
   id
   milk.id
   name
   milk.name
   
   On Fri, Feb 12, 2010 at 3:58 AM, Ivan Dudko ivan.du...@gmail.com 
wrote:
   For example..
   class Honey {
   int id;
   int milkid;
   String name;
   // getters and setters
   }
   class Milk {
   int id;
   String name;
   // getters and setters
   }
   
   and my query:
   SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
   milk.name MILKNAME FROM honey, milk
   WHERE  honey.milkid=milk.id;
   
   And i want to display table with these fields.
   
   Which object i must use?
   
   2010/2/11 James Carman jcar...@carmanconsulting.com:
   Well, what sort of object do you want to display?  Are you going to
   just create an Object[] for each row in the table?  Or, are you
   creating a DTO of some sort?
   
   On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com
  
  wrote:
   Thank you.
   I already do simple things with hibernate and spring ioc.
   Now i want to use plain old jdbc.
   I already get the datatable wich works with one pojo (table).
   Now i am in trouble.. how i can get table for two joined tables,
   for example?
   
   2010/2/11 James Carman jcar...@carmanconsulting.com:
   Yeah, but this doesn't give them an example of how to get the
   results out of a JDBC result set.  This is based on a static,
   in-memory list of Contact objects.  What I would recommend is to
   look at a Hibernate-based example and come up with the JDBC
   analog.  Here's an example from my Advanced Wicket talk I gave a
   while back:
   
   http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/m
   ain
   /java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.j
   ava
   
   At the bottom, there's a data provider which talks to a
   repository to get its data.
   
   
   
   On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
   
   christian.giamba...@excelsisnet.com wrote:
   http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.
   htm l
   
   -Ursprüngliche Nachricht-
   Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
   Gesendet: Donnerstag, 11. Februar 2010 15:47
   An: users@wicket.apache.org
   Betreff: Re: jdbc
   
   I already have method that return my data from db as arraylist.
   And i use this in iterator() method of dataprovider.
   But which object (i think model) i must return?
   
   2010/2/11 James Carman jcar...@carmanconsulting.com:
   You need to create a provider for your data.  Look at what the
   constructor takes and then implement the interface.
   
   On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko
   ivan.du...@gmail.com
  
  wrote:
   Hello!
   
   I can't understand how to populate data from a resultset object
   into datatable. Anyone have an example?
   
   Thank you!
   
   ---
   --- --- To unsubscribe, e-mail:
   users-unsubscr...@wicket.apache.org For additional commands,
   e-mail: users-h...@wicket.apache.org
   
   
   --- -- To unsubscribe, e-mail:
   users-unsubscr...@wicket.apache.org For additional commands,
   e-mail: users-h...@wicket.apache.org
   
   -
   --- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
   
   
   -
   --- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
   
   --
   --- To unsubscribe, e-mail: users-unsubscr

Re: Re: jdbc

2010-02-15 Thread Leo . Erlandsson
If you want to use a Map and display it in a Datatable there's no 
difference from using an Object in Wicket. 

You access the key/values using PropertyColumn as usual (i.e. you don't 
really need to make any changes to your code). For Objects you use e. g. 
name for the getName() method. When using Maps name will return the 
value corresponding to the key name.




 Can you give me an example, how i can use ResultSet transformed into
 Map with for example datatable component?
 I think i can write method transforming ResultSet to a Map.
 
 I do not want to use any ORM, because web tier for my app is just
 control panel and main features implemented in the backend.

 You want to swim without getting wet. Fine :)

 public class MyMilkFactory {
public ListMilk provideHoneyObjects() {
// iterate over sql statement/REsultSet
   Milk milk = createMilk(rs);
   Honey honey provideHoney(rs.getInteger(honeyid));
 
}

public Milk createMilk(ResultSet rs) { // do not use an 
OR/mapper here 
 but do the dirty work on your own}

public Honey provideHoney(int id) {//read from database, 
again do the 
 dirty work on your own }
}


Re: Re: jdbc

2010-02-15 Thread Ivan Dudko
Thank you!
I just discovered this sample:
http://www.brettdutton.com/blog/?p=4

What i can do.. if i want to use FilterToolbar with DataTable?

2010/2/15  leo.erlands...@tyringe.com:
 If you want to use a Map and display it in a Datatable there's no
 difference from using an Object in Wicket.

 You access the key/values using PropertyColumn as usual (i.e. you don't
 really need to make any changes to your code). For Objects you use e. g.
 name for the getName() method. When using Maps name will return the
 value corresponding to the key name.




 Can you give me an example, how i can use ResultSet transformed into
 Map with for example datatable component?
 I think i can write method transforming ResultSet to a Map.

 I do not want to use any ORM, because web tier for my app is just
 control panel and main features implemented in the backend.

 You want to swim without getting wet. Fine :)

 public class MyMilkFactory {
                public ListMilk provideHoneyObjects() {
                                // iterate over sql statement/REsultSet
                               Milk milk = createMilk(rs);
               Honey honey provideHoney(rs.getInteger(honeyid));

                }

                public Milk createMilk(ResultSet rs) { // do not use an
 OR/mapper here
 but do the dirty work on your own}

                public Honey provideHoney(int id) {//read from database,
 again do the
 dirty work on your own }
}


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



Re: jdbc

2010-02-15 Thread James Carman
Sorry, man.  Some things just have to be left as an exercise for the
reader.  That's not a Wicket question.

On Mon, Feb 15, 2010 at 6:14 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 now problem is not accessing object fields..

 problem is transform resultset to these objects..

 2010/2/12 James Carman jcar...@carmanconsulting.com:
 You could create a reference from Honey to Milk, since you have a
 milkid field there.  Then, you'd use a list of Honey objects and
 you'd display these properties:

 id
 milk.id
 name
 milk.name




 On Fri, Feb 12, 2010 at 3:58 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 For example..
 class Honey {
 int id;
 int milkid;
 String name;
 // getters and setters
 }
 class Milk {
 int id;
 String name;
 // getters and setters
 }

 and my query:
 SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
 milk.name MILKNAME FROM honey, milk
 WHERE  honey.milkid=milk.id;

 And i want to display table with these fields.

 Which object i must use?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 Well, what sort of object do you want to display?  Are you going to
 just create an Object[] for each row in the table?  Or, are you
 creating a DTO of some sort?

 On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Thank you.
 I already do simple things with hibernate and spring ioc.
 Now i want to use plain old jdbc.
 I already get the datatable wich works with one pojo (table).
 Now i am in trouble.. how i can get table for two joined tables, for 
 example?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 Yeah, but this doesn't give them an example of how to get the results
 out of a JDBC result set.  This is based on a static, in-memory list
 of Contact objects.  What I would recommend is to look at a
 Hibernate-based example and come up with the JDBC analog.  Here's an
 example from my Advanced Wicket talk I gave a while back:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java

 At the bottom, there's a data provider which talks to a repository
 to get its data.



 On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
 christian.giamba...@excelsisnet.com wrote:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 -Ursprüngliche Nachricht-
 Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
 Gesendet: Donnerstag, 11. Februar 2010 15:47
 An: users@wicket.apache.org
 Betreff: Re: jdbc

 I already have method that return my data from db as arraylist. And i
 use this in iterator() method of dataprovider.
 But which object (i think model) i must return?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com 
 wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



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



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



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



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



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



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

Re: Re: Re: jdbc

2010-02-15 Thread Leo . Erlandsson
Should be no different when using JDBC than using it when using Domain 
Objects.

Check out Wicket Phonebook Example that uses FilterToolbar:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook

Source Code Example:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/phonebook/src/main/java/wicket/contrib/phonebook/web/page/ListContactsPage.java


 Thank you!
 I just discovered this sample:
 http://www.brettdutton.com/blog/?p=4

 What i can do.. if i want to use FilterToolbar with DataTable?


Re: jdbc

2010-02-12 Thread Ivan Dudko
For example..
class Honey {
int id;
int milkid;
String name;
// getters and setters
}
class Milk {
int id;
String name;
// getters and setters
}

and my query:
SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
milk.name MILKNAME FROM honey, milk
WHERE  honey.milkid=milk.id;

And i want to display table with these fields.

Which object i must use?

2010/2/11 James Carman jcar...@carmanconsulting.com:
 Well, what sort of object do you want to display?  Are you going to
 just create an Object[] for each row in the table?  Or, are you
 creating a DTO of some sort?

 On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Thank you.
 I already do simple things with hibernate and spring ioc.
 Now i want to use plain old jdbc.
 I already get the datatable wich works with one pojo (table).
 Now i am in trouble.. how i can get table for two joined tables, for example?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 Yeah, but this doesn't give them an example of how to get the results
 out of a JDBC result set.  This is based on a static, in-memory list
 of Contact objects.  What I would recommend is to look at a
 Hibernate-based example and come up with the JDBC analog.  Here's an
 example from my Advanced Wicket talk I gave a while back:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java

 At the bottom, there's a data provider which talks to a repository
 to get its data.



 On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
 christian.giamba...@excelsisnet.com wrote:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 -Ursprüngliche Nachricht-
 Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
 Gesendet: Donnerstag, 11. Februar 2010 15:47
 An: users@wicket.apache.org
 Betreff: Re: jdbc

 I already have method that return my data from db as arraylist. And i
 use this in iterator() method of dataprovider.
 But which object (i think model) i must return?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



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



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



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



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



Re: jdbc

2010-02-12 Thread James Carman
You could create a reference from Honey to Milk, since you have a
milkid field there.  Then, you'd use a list of Honey objects and
you'd display these properties:

id
milk.id
name
milk.name




On Fri, Feb 12, 2010 at 3:58 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 For example..
 class Honey {
 int id;
 int milkid;
 String name;
 // getters and setters
 }
 class Milk {
 int id;
 String name;
 // getters and setters
 }

 and my query:
 SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
 milk.name MILKNAME FROM honey, milk
 WHERE  honey.milkid=milk.id;

 And i want to display table with these fields.

 Which object i must use?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 Well, what sort of object do you want to display?  Are you going to
 just create an Object[] for each row in the table?  Or, are you
 creating a DTO of some sort?

 On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Thank you.
 I already do simple things with hibernate and spring ioc.
 Now i want to use plain old jdbc.
 I already get the datatable wich works with one pojo (table).
 Now i am in trouble.. how i can get table for two joined tables, for 
 example?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 Yeah, but this doesn't give them an example of how to get the results
 out of a JDBC result set.  This is based on a static, in-memory list
 of Contact objects.  What I would recommend is to look at a
 Hibernate-based example and come up with the JDBC analog.  Here's an
 example from my Advanced Wicket talk I gave a while back:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java

 At the bottom, there's a data provider which talks to a repository
 to get its data.



 On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
 christian.giamba...@excelsisnet.com wrote:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 -Ursprüngliche Nachricht-
 Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
 Gesendet: Donnerstag, 11. Februar 2010 15:47
 An: users@wicket.apache.org
 Betreff: Re: jdbc

 I already have method that return my data from db as arraylist. And i
 use this in iterator() method of dataprovider.
 But which object (i think model) i must return?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



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



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



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



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



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



jdbc

2010-02-11 Thread Ivan Dudko
Hello!

I can't understand how to populate data from a resultset object into datatable.
Anyone have an example?

Thank you!

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



Re: jdbc

2010-02-11 Thread James Carman
You need to create a provider for your data.  Look at what the
constructor takes and then implement the interface.

On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



Re: jdbc

2010-02-11 Thread Ivan Dudko
I already have method that return my data from db as arraylist. And i
use this in iterator() method of dataprovider.
But which object (i think model) i must return?

2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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



AW: jdbc

2010-02-11 Thread Giambalvo, Christian
http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

-Ursprüngliche Nachricht-
Von: Ivan Dudko [mailto:ivan.du...@gmail.com] 
Gesendet: Donnerstag, 11. Februar 2010 15:47
An: users@wicket.apache.org
Betreff: Re: jdbc

I already have method that return my data from db as arraylist. And i
use this in iterator() method of dataprovider.
But which object (i think model) i must return?

2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



Re: jdbc

2010-02-11 Thread James Carman
Yeah, but this doesn't give them an example of how to get the results
out of a JDBC result set.  This is based on a static, in-memory list
of Contact objects.  What I would recommend is to look at a
Hibernate-based example and come up with the JDBC analog.  Here's an
example from my Advanced Wicket talk I gave a while back:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java

At the bottom, there's a data provider which talks to a repository
to get its data.



On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
christian.giamba...@excelsisnet.com wrote:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 -Ursprüngliche Nachricht-
 Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
 Gesendet: Donnerstag, 11. Februar 2010 15:47
 An: users@wicket.apache.org
 Betreff: Re: jdbc

 I already have method that return my data from db as arraylist. And i
 use this in iterator() method of dataprovider.
 But which object (i think model) i must return?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



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



Re: jdbc

2010-02-11 Thread Ivan Dudko
Thank you.
I already do simple things with hibernate and spring ioc.
Now i want to use plain old jdbc.
I already get the datatable wich works with one pojo (table).
Now i am in trouble.. how i can get table for two joined tables, for example?

2010/2/11 James Carman jcar...@carmanconsulting.com:
 Yeah, but this doesn't give them an example of how to get the results
 out of a JDBC result set.  This is based on a static, in-memory list
 of Contact objects.  What I would recommend is to look at a
 Hibernate-based example and come up with the JDBC analog.  Here's an
 example from my Advanced Wicket talk I gave a while back:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java

 At the bottom, there's a data provider which talks to a repository
 to get its data.



 On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
 christian.giamba...@excelsisnet.com wrote:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 -Ursprüngliche Nachricht-
 Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
 Gesendet: Donnerstag, 11. Februar 2010 15:47
 An: users@wicket.apache.org
 Betreff: Re: jdbc

 I already have method that return my data from db as arraylist. And i
 use this in iterator() method of dataprovider.
 But which object (i think model) i must return?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



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



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



Re: jdbc

2010-02-11 Thread James Carman
Well, what sort of object do you want to display?  Are you going to
just create an Object[] for each row in the table?  Or, are you
creating a DTO of some sort?

On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Thank you.
 I already do simple things with hibernate and spring ioc.
 Now i want to use plain old jdbc.
 I already get the datatable wich works with one pojo (table).
 Now i am in trouble.. how i can get table for two joined tables, for example?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 Yeah, but this doesn't give them an example of how to get the results
 out of a JDBC result set.  This is based on a static, in-memory list
 of Contact objects.  What I would recommend is to look at a
 Hibernate-based example and come up with the JDBC analog.  Here's an
 example from my Advanced Wicket talk I gave a while back:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java

 At the bottom, there's a data provider which talks to a repository
 to get its data.



 On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
 christian.giamba...@excelsisnet.com wrote:
 http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html

 -Ursprüngliche Nachricht-
 Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
 Gesendet: Donnerstag, 11. Februar 2010 15:47
 An: users@wicket.apache.org
 Betreff: Re: jdbc

 I already have method that return my data from db as arraylist. And i
 use this in iterator() method of dataprovider.
 But which object (i think model) i must return?

 2010/2/11 James Carman jcar...@carmanconsulting.com:
 You need to create a provider for your data.  Look at what the
 constructor takes and then implement the interface.

 On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello!

 I can't understand how to populate data from a resultset object into 
 datatable.
 Anyone have an example?

 Thank you!

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



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



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


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



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



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



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



Re: wicket + jdbc template app

2009-11-23 Thread Ivan Dudko
Thank you! I have just implement it! I am using c3p0 and SQL DAO
without Spring or any Persistent framework.

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



Re: wicket + jdbc template app

2009-11-19 Thread Ivan Dudko
Hello, guys!

I am still could not implement wicket application without any
persistence framework and also spring-jdbc.
I want to use only connection pooling with dbcp or c3p0.
May you provide example for this kind of app.

Thank you for answer!

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



Re: wicket + jdbc template app

2009-11-19 Thread James Carman
Are you saying you don't want to use Spring at all?  But, you do want
to use DBCP or C3P0?

On Thu, Nov 19, 2009 at 7:46 AM, Ivan Dudko ivan.du...@gmail.com wrote:
 Hello, guys!

 I am still could not implement wicket application without any
 persistence framework and also spring-jdbc.
 I want to use only connection pooling with dbcp or c3p0.
 May you provide example for this kind of app.

 Thank you for answer!

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



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



Re: wicket + jdbc template app

2009-11-19 Thread Clint Checketts
My Wicket app I maintain only uses the JdbcTemplate class from Spring. We
don't use any hibernate or other ORM framework.

I don't have any code I can give, but I can answer any questions. How far
have you gotten?

-Clint


On Thu, Nov 19, 2009 at 7:23 AM, James Carman
jcar...@carmanconsulting.comwrote:

 Are you saying you don't want to use Spring at all?  But, you do want
 to use DBCP or C3P0?

 On Thu, Nov 19, 2009 at 7:46 AM, Ivan Dudko ivan.du...@gmail.com wrote:
  Hello, guys!
 
  I am still could not implement wicket application without any
  persistence framework and also spring-jdbc.
  I want to use only connection pooling with dbcp or c3p0.
  May you provide example for this kind of app.
 
  Thank you for answer!
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




RE: wicket + jdbc template app

2009-11-19 Thread Loritsch, Berin C.
DBCP and C3P0 are implementations of the pooled DataSource interface, so
all you have to do is bind them to JNDI.  Tomcat and other Servlet
container vendors have instructions on how to do this.  Inside your
code, you access it through the JNDI API which looks up the pooled
datasource.

Do be sure to close anything you open, which includes resultsets,
statements, and connections.  Put the close code in finally statements
to ensure that you don't fill up your pool with open resources.  Open
ResultSets also have matching resources on your database server, so you
can introduce scalability problems if you aren't careful.

-Original Message-
From: Clint Checketts [mailto:checke...@gmail.com] 
Sent: Thursday, November 19, 2009 8:35 AM
To: users@wicket.apache.org
Subject: Re: wicket + jdbc template app

My Wicket app I maintain only uses the JdbcTemplate class from Spring.
We
don't use any hibernate or other ORM framework.

I don't have any code I can give, but I can answer any questions. How
far
have you gotten?

-Clint


On Thu, Nov 19, 2009 at 7:23 AM, James Carman
jcar...@carmanconsulting.comwrote:

 Are you saying you don't want to use Spring at all?  But, you do want
 to use DBCP or C3P0?

 On Thu, Nov 19, 2009 at 7:46 AM, Ivan Dudko ivan.du...@gmail.com
wrote:
  Hello, guys!
 
  I am still could not implement wicket application without any
  persistence framework and also spring-jdbc.
  I want to use only connection pooling with dbcp or c3p0.
  May you provide example for this kind of app.
 
  Thank you for answer!
 
 
-
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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



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



Re: wicket + jdbc template app

2009-11-19 Thread James Carman
On Thu, Nov 19, 2009 at 10:41 AM, Loritsch, Berin C.
berin.lorit...@gd-ais.com wrote:
 Do be sure to close anything you open, which includes resultsets,
 statements, and connections.  Put the close code in finally statements
 to ensure that you don't fill up your pool with open resources.  Open
 ResultSets also have matching resources on your database server, so you
 can introduce scalability problems if you aren't careful.

And this is why we use something like Spring's JDBC support to manage
all of that for us (they've already thought of this stuff).


 -Original Message-
 From: Clint Checketts [mailto:checke...@gmail.com]
 Sent: Thursday, November 19, 2009 8:35 AM
 To: users@wicket.apache.org
 Subject: Re: wicket + jdbc template app

 My Wicket app I maintain only uses the JdbcTemplate class from Spring.
 We
 don't use any hibernate or other ORM framework.

 I don't have any code I can give, but I can answer any questions. How
 far
 have you gotten?

 -Clint


 On Thu, Nov 19, 2009 at 7:23 AM, James Carman
 jcar...@carmanconsulting.comwrote:

 Are you saying you don't want to use Spring at all?  But, you do want
 to use DBCP or C3P0?

 On Thu, Nov 19, 2009 at 7:46 AM, Ivan Dudko ivan.du...@gmail.com
 wrote:
  Hello, guys!
 
  I am still could not implement wicket application without any
  persistence framework and also spring-jdbc.
  I want to use only connection pooling with dbcp or c3p0.
  May you provide example for this kind of app.
 
  Thank you for answer!
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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



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



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



Re: wicket + jdbc template app

2009-11-02 Thread Ivan Dudko
thank you guys!


wicket + jdbc template app

2009-11-01 Thread Ivan Dudko
Hello, guys!

I want to use wicket with plain jdbc without any persistence framework.
Where i can find template application for this type of data source?

Thank you for answer!


Re: wicket + jdbc template app

2009-11-01 Thread James Carman
Do you want to use spring

On Nov 1, 2009 10:12 AM, Ivan Dudko ivan.du...@gmail.com wrote:

Hello, guys!

I want to use wicket with plain jdbc without any persistence framework.
Where i can find template application for this type of data source?

Thank you for answer!


Re: wicket + jdbc template app

2009-11-01 Thread dtoffe

Just set up your connection in your Application subclass and provide a
method to get it from wherever you need it. Use connection pooling.

Daniel


idudko wrote:
 
 Hello, guys!
 
 I want to use wicket with plain jdbc without any persistence framework.
 Where i can find template application for this type of data source?
 
 Thank you for answer!
 
 

-- 
View this message in context: 
http://old.nabble.com/wicket-%2B-jdbc-template-app-tp26151790p26152287.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket + jdbc template app

2009-11-01 Thread Pedro Santos
Hi, I got it working using spring. You can see an template application using
spring on wicket stuff: phone book

http://static.springsource.org/spring/docs/2.0.8/reference/jdbc.html

On Sun, Nov 1, 2009 at 5:07 PM, dtoffe dto...@yahoo.com.ar wrote:


Just set up your connection in your Application subclass and provide a
 method to get it from wherever you need it. Use connection pooling.

 Daniel


 idudko wrote:
 
  Hello, guys!
 
  I want to use wicket with plain jdbc without any persistence framework.
  Where i can find template application for this type of data source?
 
  Thank you for answer!
 
 

 --
 View this message in context:
 http://old.nabble.com/wicket-%2B-jdbc-template-app-tp26151790p26152287.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Pedro Henrique Oliveira dos Santos


Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-24 Thread Pedro Sena
I'll check them

Thanks Eric,

On Wed, Sep 23, 2009 at 8:08 PM, Erik Post eriksen...@gmail.com wrote:

 Well, besides iolite, you could take a look at wicket-phonebook and
 wicketopia. They're not JDBC but they both come with Spring
 preconfigured. The phonebook has a couple of example DAO's and iBatis
 (among others) set up. You could take those as a starting point and
 'add' JDBC.

 Cheers,
 Erik


 On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com wrote:
  Hi Guys,
 
  I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm
  using lolite but it comes with JPA instead of JDBC.
 
  I would like to know if there is some archetype for the setup that I
  described in the title. I already checked wicket stuff if no luck.
 
  Thanks in advance,
  --
  /**
  * Pedro Sena
  * Systems Architect
  * Sun Certified Java Programmer
  * Sun Certified Web Component Developer
  */
 

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




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-24 Thread Muro Copenhagen
Hi Pedro

Try Appfuse-light with the desired combination:
https://appfuse-light.dev.java.net/servlets/ProjectDocumentList?folderID=8006expandFolder=8006folderID=0

It should be at the bottom.

Best Regards
Muro

On Thu, Sep 24, 2009 at 12:04 PM, Pedro Sena sena.pe...@gmail.com wrote:

 I'll check them

 Thanks Eric,

 On Wed, Sep 23, 2009 at 8:08 PM, Erik Post eriksen...@gmail.com wrote:

  Well, besides iolite, you could take a look at wicket-phonebook and
  wicketopia. They're not JDBC but they both come with Spring
  preconfigured. The phonebook has a couple of example DAO's and iBatis
  (among others) set up. You could take those as a starting point and
  'add' JDBC.
 
  Cheers,
  Erik
 
 
  On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com
 wrote:
   Hi Guys,
  
   I'm new to Wicket with Spring(I never used Spring before, just Seam).
 I'm
   using lolite but it comes with JPA instead of JDBC.
  
   I would like to know if there is some archetype for the setup that I
   described in the title. I already checked wicket stuff if no luck.
  
   Thanks in advance,
   --
   /**
   * Pedro Sena
   * Systems Architect
   * Sun Certified Java Programmer
   * Sun Certified Web Component Developer
   */
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer
 * Sun Certified Web Component Developer
 */



Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-24 Thread Pedro Sena
Wow,

Exactly what I was looking for!!!

Thanks a lot !!

On Thu, Sep 24, 2009 at 7:10 AM, Muro Copenhagen copenha...@gmail.comwrote:

 Hi Pedro

 Try Appfuse-light with the desired combination:

 https://appfuse-light.dev.java.net/servlets/ProjectDocumentList?folderID=8006expandFolder=8006folderID=0

 It should be at the bottom.

 Best Regards
 Muro

 On Thu, Sep 24, 2009 at 12:04 PM, Pedro Sena sena.pe...@gmail.com wrote:

  I'll check them
 
  Thanks Eric,
 
  On Wed, Sep 23, 2009 at 8:08 PM, Erik Post eriksen...@gmail.com wrote:
 
   Well, besides iolite, you could take a look at wicket-phonebook and
   wicketopia. They're not JDBC but they both come with Spring
   preconfigured. The phonebook has a couple of example DAO's and iBatis
   (among others) set up. You could take those as a starting point and
   'add' JDBC.
  
   Cheers,
   Erik
  
  
   On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com
  wrote:
Hi Guys,
   
I'm new to Wicket with Spring(I never used Spring before, just Seam).
  I'm
using lolite but it comes with JPA instead of JDBC.
   
I would like to know if there is some archetype for the setup that I
described in the title. I already checked wicket stuff if no luck.
   
Thanks in advance,
--
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  /**
  * Pedro Sena
  * Systems Architect
  * Sun Certified Java Programmer
  * Sun Certified Web Component Developer
  */
 




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Starting with Wicket, Spring, Maven and JDBC

2009-09-23 Thread Pedro Sena
Hi Guys,

I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm
using lolite but it comes with JPA instead of JDBC.

I would like to know if there is some archetype for the setup that I
described in the title. I already checked wicket stuff if no luck.

Thanks in advance,
-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-23 Thread Erik Post
Well, besides iolite, you could take a look at wicket-phonebook and
wicketopia. They're not JDBC but they both come with Spring
preconfigured. The phonebook has a couple of example DAO's and iBatis
(among others) set up. You could take those as a starting point and
'add' JDBC.

Cheers,
Erik


On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com wrote:
 Hi Guys,

 I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm
 using lolite but it comes with JPA instead of JDBC.

 I would like to know if there is some archetype for the setup that I
 described in the title. I already checked wicket stuff if no luck.

 Thanks in advance,
 --
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer
 * Sun Certified Web Component Developer
 */


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



JDBC Connection for CRUD operations

2008-02-29 Thread wicketUser

Hi,

I am new to Wicket and I don't wish to use hibernate as persistence
framework. I am trying to do CRUD operations through JDBC connection to a
mysql database.

I have added mysql dependency in my project's pom.xml file

  dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.0.5/version

  /dependency

and I can see the connector in the war file.

However, when I try to save an object, I get the following error:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.mycompany.DBConnection.save(DBConnection.java:20)
at
com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
at
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
)
at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
rface.java:183)
at
org.apache.wicket.request.target.component.listener.ListenerInterface
RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
(AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
ava:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
va:194)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
26)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:450)


Can anyone please help me with this?

Thanks.

-- 
View this message in context: 
http://www.nabble.com/JDBC-Connection-for-CRUD-operations-tp15757358p15757358.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC Connection for CRUD operations

2008-02-29 Thread lars vonk
What driver did you specify?

On Fri, Feb 29, 2008 at 1:17 PM, wicketUser [EMAIL PROTECTED] wrote:

  Hi,

  I am new to Wicket and I don't wish to use hibernate as persistence
  framework. I am trying to do CRUD operations through JDBC connection to a
  mysql database.

  I have added mysql dependency in my project's pom.xml file

   dependency
 groupIdmysql/groupId
 artifactIdmysql-connector-java/artifactId
 version5.0.5/version
   /dependency

  and I can see the connector in the war file.

  However, when I try to save an object, I get the following error:

  java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getConnection(DriverManager.java:545)
 at java.sql.DriverManager.getConnection(DriverManager.java:171)
 at com.mycompany.DBConnection.save(DBConnection.java:20)
 at
  com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
 at
  org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
  )
 at
  org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
  )
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
 at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
  org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
  rface.java:183)
 at
  org.apache.wicket.request.target.component.listener.ListenerInterface
  RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
 at
  org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
  (AbstractRequestCycleProcessor.java:90)
 at
  org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
  ava:1166)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
  354)
 at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
  va:194)
 at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1084)
 at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
  60)
 at
  org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
  a:216)
 at
  org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
  81)
 at
  org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
  26)
 at
  org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

 at
  org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
  lerCollection.java:206)
 at
  org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
  java:114)
 at
  org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
  39)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
  5)
 at
  org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
  n.java:842)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at
  org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
  va:395)
 at
  org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
  .java:450)


  Can anyone please help me with this?

  Thanks.

  --
  View this message in context: 
 http://www.nabble.com/JDBC-Connection-for-CRUD-operations-tp15757358p15757358.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC Connection for CRUD operations

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael

you need to have which ever driver you specified on classpath..

wicketUser wrote:

Hi,

I am new to Wicket and I don't wish to use hibernate as persistence
framework. I am trying to do CRUD operations through JDBC connection to a
mysql database.

I have added mysql dependency in my project's pom.xml file

  dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.0.5/version

  /dependency

and I can see the connector in the war file.

However, when I try to save an object, I get the following error:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.mycompany.DBConnection.save(DBConnection.java:20)
at
com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
at
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
)
at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
rface.java:183)
at
org.apache.wicket.request.target.component.listener.ListenerInterface
RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
(AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
ava:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
va:194)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
26)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:450)


Can anyone please help me with this?

Thanks.

  


--
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBC Connection for CRUD operations

2008-02-29 Thread James Carman
Just having the driver specified on the classpath doesn't register it.
 You have to do a Class.forName(drivernamehere) to register it with
the DriverManager.  I'd do that as a ServletContextListener or
something.

On 2/29/08, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 you need to have which ever driver you specified on classpath..


  wicketUser wrote:
   Hi,
  
   I am new to Wicket and I don't wish to use hibernate as persistence
   framework. I am trying to do CRUD operations through JDBC connection to a
   mysql database.
  
   I have added mysql dependency in my project's pom.xml file
  
 dependency
 groupIdmysql/groupId
 artifactIdmysql-connector-java/artifactId
 version5.0.5/version
 /dependency
  
   and I can see the connector in the war file.
  
   However, when I try to save an object, I get the following error:
  
   java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getConnection(DriverManager.java:545)
   at java.sql.DriverManager.getConnection(DriverManager.java:171)
   at com.mycompany.DBConnection.save(DBConnection.java:20)
   at
   com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
   at
   org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
   )
   at
   org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
   )
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
   java:39)
   at
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
   sorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at
   org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
   rface.java:183)
   at
   org.apache.wicket.request.target.component.listener.ListenerInterface
   RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
   at
   org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
   (AbstractRequestCycleProcessor.java:90)
   at
   org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
   ava:1166)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
   org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
   354)
   at
   org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
   va:194)
   at
   org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
   Handler.java:1084)
   at
   org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
   60)
   at
   org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
   a:216)
   at
   org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
   81)
   at
   org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
   26)
   at
   org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  
   at
   org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
   lerCollection.java:206)
   at
   org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
   java:114)
   at
   org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
   39)
   at org.mortbay.jetty.Server.handle(Server.java:324)
   at
   org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
   5)
   at
   org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
   n.java:842)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
   at
   org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
   va:395)
   at
   org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
   .java:450)
  
  
   Can anyone please help me with this?
  
   Thanks.
  
  

  --

 -Wicket for love
  -Jme for fun

  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684



  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]