Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
Hello, I'm using wicket 1.5.4, and I tried various approaches in using Wicket and JPA (using webshere/open jpa). I looked at several posts here, but I keep ending up writing /more/ boiler plate code and configuration than with plain old jdbc. So. I don't want to write factories. I don't want to wr

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread Josh Kamau
You dont want to use cdi either? On 12 May 2012 12:22, "hfriederichs" wrote: Hello, I'm using wicket 1.5.4, and I tried various approaches in using Wicket and JPA (using webshere/open jpa). I looked at several posts here, but I keep ending up writing /more/ boiler plate code and configuration t

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
I looked at it, shortly. It's a perfect example of what I mean. I looked at a blog by Igor V. And there we go again: you have to do this; and than that. And then configure this. And don't forget to add a line in xml. And in the end, put it all together and it's so great. I don't think so. I

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread Josh Kamau
Use ebean then. Www.avaje.org . You just add 1 properties file and you can start persisting your jpa entities On 12 May 2012 12:58, "hfriederichs" wrote: I looked at it, shortly. It's a perfect example of what I mean. I looked at a blog by Igor V. And there we go again: you have to do this; an

onComponentTag tag#setName() and checkComponentTag(tag, "input")

2012-05-12 Thread Arthur H.
Hi, I have a subclass if TextField which handles if the field should be rendered as textarea or simple input field: @Override protected void onComponentTag(final ComponentTag tag) { if ( multiline ) { tag.setName( "textarea" ); }

Prevent a fragment from rendering the outer tag

2012-05-12 Thread Thomas Singer
I have following markup: ... ... ... Foo Bar ... ... When adding "fragment-1" (instance of Fragment) to "page", it renders using Wicket 1.4.* as: ... ... ... Bar ... Foo ... How can I make the Fragment not to render the div-t

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread Igor Vaynberg
On Sat, May 12, 2012 at 2:58 AM, hfriederichs wrote: > I looked at it, shortly. It's a perfect example of what I mean. I looked at a > blog by Igor V. And there we go again: you have to do this; and than that. > And then configure this. And don't forget to add a line in xml. > And in the end,

Re: Prevent a fragment from rendering the outer tag

2012-05-12 Thread Andrea Del Bene
Hi, fragment.setRenderBodyOnly(true) I have following markup: ... ... ... Foo Bar ... ... When adding "fragment-1" (instance of Fragment) to "page", it renders using Wicket 1.4.* as: ... ... ... Bar ... Foo ... How can I make the Fragment not to render the div-tag around

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
Igor, Josh suggested CDI as an alternative, in that respect it's the same as other approaches I've tried: to cumbersome, to complex for my goals, so in respect to what I want I don't think it's great. I'll look into the wicket-jee module in wicketstuff, but it is yet another extra 'thingy' you n

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread James Carman
Wicket core tries to stay "stack agnostic". If you want technology specific stuff, you have to use extra modules. On May 12, 2012 1:23 PM, "hfriederichs" wrote: > Igor, > > Josh suggested CDI as an alternative, in that respect it's the same as > other > approaches I've tried: to cumbersome, to c

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
James, what is technology specific about JPA? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4629309.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread James Carman
What if people want to use Hibernate? What if people want to use Cayenne? What if people want to use iBatis/myBatis? What if folks want to use just plain ole JDBC? The point is that the "core" of Wicket tries to stay as uncluttered as possible, relying upon add-on modules to adapt it to other e

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread Igor Vaynberg
On Sat, May 12, 2012 at 10:23 AM, hfriederichs wrote: > Igor, > > Josh suggested CDI as an alternative, in that respect it's the same as other > approaches I've tried: to cumbersome, to complex for my goals, so in respect > to what I want I don't think it's great. > > I'll look into the wicket-jee

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
I have things working, in two versions: one with a 'PersistenceManagerSingleton' I wrote, ugly, and one based on jndi-lookups of both the EntityManager and the UserTransaction, ugly too, for sticking to jndi-lookups. A third I am thinking of is create an EJB-project alongside my WebModule, so I can

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread James Carman
On Sat, May 12, 2012 at 3:42 PM, hfriederichs wrote: > And I think I´m missing your point: I still don't get what's technology > specific about JPA. Isn't it just a Java API like JMS or JaxWS? > Yes, JPA is *an* API, but it's not the only persistence API out there. If Wicket were to "pick a favo

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
Igor, I suspect you didn't realize when you got up this morning that at the end of the day you would acquire eternal fame, but there it is. To get it working with WebSphere is another matter; let's call it a challenge... I'll consider all the things mentioned here, thanks to you all. Regards et

Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread Igor Vaynberg
that example will work with websphere, or without it. -igor On Sat, May 12, 2012 at 1:15 PM, hfriederichs wrote: > Igor, > > I suspect you didn't realize when you got up this morning that at the end of > the day you would acquire eternal fame, but there it is. To get it working > with WebSphere

RE: Wicket and JPA: please a simple way to go

2012-05-12 Thread Chris Colman
>James, what is technology specific about JPA? You assume that because JPA is a standard it must be the only standard. A lot of people would take offense to that. Have you heard of JDO? It was around long before JPA, is much more mature, still actively enhanced and many who use it do so because t