Re: have anyone tried empire-DB?

2008-10-23 Thread Wayne Pope
Nino what do you recommend in terms orf DB framework. We're currently using
Hibernate and I'm personally finding it a pain - it seems to influence the
java code way too much and it create some horrible joins if we're not
carefull. Any suggestions that you've used in the real world?

On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 This is interesting:

 (JaQu) Provide API level compatibility with JPA (so that JaQu can be used
 as an extension of JPA).

 But I think something similar are on its way for JPA 2.0..?


 marco.behler wrote:

 I gave empireDB a quick look a while ago and it looks interesting. Besides
 JPersist I also stumbled upon JaQu
 (http://www.h2database.com/html/jaqu.html), which is still in its
 infancy.
 I'm sure there's more LINQ-like clones out there.

 As far as I'm concerned, I'd really like to have a thorough look at stuff
 like db4o or couchDB, especially performance wise. I did Hibernate/iBatis
 in
 the past and am currently working on a project with iBatis again. Both
 have
 advantages and disadvantages and I don't love either. I would rather not
 have to care about tables, objects,the mighty mismatch (and in Hibernate's
 case the mighty session) anymore, but just shove that damn thing into an
 object database ;)

 *hides from enraged DBAs and their optimised queries*



 Nino.Martinez wrote:


 Yeah seems to be nice...

 At WUG DK we discussed. That if using stuff like hibernate, for simple
 cruds it's nice but if you have a complex object graph it becomes very
 troublesome to use (if you use cascade all etc.)..

 Ames, Tim wrote:


 Looks like it has a lot in common with JPersist.  That is what I have
 been using. No XML, all POJO.

 -Original Message-
 From: Nino Saturnino Martinez Vazquez Wael
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 16, 2008 11:28 AM
 To: users@wicket.apache.org
 Subject: have anyone tried empire-DB?

 So have you tried it with wicket?

 http://incubator.apache.org/empire-db/

 --
 -Wicket for love

 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]

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 _
 _

 EMAIL CONFIDENTIALITY NOTICE
 This Email message, and any attachments, may contain confidential
 patient health information that is legally protected. This information is
 intended only for the use of the individual or entity named above. The
 authorized recipient of this information is prohibited from
 disclosing this information to any other party unless required to do so
 by law or regulation and is required to destroy the information after its
 stated need has been fulfilled. If you are not the intended recipient, you
 are hereby notified that any disclosure, copying, distribution, or action
 taken in reliance on the contents of this message is strictly prohibited.
 If you have received this information in error, please notify the sender
 immediately by replying to this message and delete the message from your
 system.


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



 --
 -Wicket for love

 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]









 --
 -Wicket for love

 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: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-23 Thread Nino Saturnino Martinez Vazquez Wael

Hehe Bruno

I were about to write a similar mail..

[EMAIL PROTECTED] wrote:

That's ok Chris,

It's just a matter of time until they find out they did the wrong 
choice - unless this is going to be a small software, with very 
specific functions, like GMail. :-) There's a team by my side here 
that is working in a sub-project with GWT and they chose it using that 
same argument: easy creation of Web2.0 style user interfaces. But 
now, they are going nuts because of how big the code is getting (and 
the project is by far from the end) - so, it's not just about few 
effort. You have to consider everything. Maintenance is one of them. 
By the way, it's really hard to create custom components within GWT. 
So I think you can see the problem here about code size.


But, good luck for the rest of you team... I'll pray for them... :-D

Best regards (really),
Bruno

On Oct 22, 2008 6:41am, [EMAIL PROTECTED] wrote:

Martin, Richard, thanks for your answers!



Unfortunately, I could not convince the other devs of the various

advantages of wicket. The team chose GWT because it allows to create Web

2.0 style user interfaces with fewer effort.



Regards,

Christoph




--
-Wicket for love

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: Associating a request to a Session

2008-10-23 Thread Serkan Camurcuoglu

I think your session id changes because you access the server as
localhost:8080 for the first time, but yahoo forwards you back to
www.bioscene.co.jp (which I think is the same host), so you access the same
server with a different host name, and your browser does not send the same
cookie..

I hope I did not get it all wrong..




David Leangen-8 wrote:
 
 Yeah... didn't explain this well.
 
 Here's the thread in context:
 
 http://www.nabble.com/Associating-a-request-to-a-Session-td19641227.html
 
 And here's headers of the handshake(with some editing for privacy and
 brevity)...
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Associating-a-request-to-a-Session-tp19641227p20124897.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]



Antwort: Re: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-23 Thread christoph . grothaus
Hi Bruno,

I appreciate it that you pray for the rest of my team :-) I won't be a bad 
looser, so I will give my best with the other devs to build a good 
solution with GWT. I really hope that it is not inherent to GWT that the 
code gets big and unmaintainable. So I cross my fingers and hope for the 
best...

Kind regards,
Christoph

How to use Menu component in wicket-yui stuff?

2008-10-23 Thread 张伟
Hello,
I want to konw how to use Menu component in wicket-yui stuff? Can anyone
give me a demo or example? I could ont find any javadoc or sourcecode.
Thanks!


Re: have anyone tried empire-DB?

2008-10-23 Thread Igor Vaynberg
im curious in what way does it influence java code...

-igor

On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
[EMAIL PROTECTED] wrote:
 Nino what do you recommend in terms orf DB framework. We're currently using
 Hibernate and I'm personally finding it a pain - it seems to influence the
 java code way too much and it create some horrible joins if we're not
 carefull. Any suggestions that you've used in the real world?

 On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:

 This is interesting:

 (JaQu) Provide API level compatibility with JPA (so that JaQu can be used
 as an extension of JPA).

 But I think something similar are on its way for JPA 2.0..?


 marco.behler wrote:

 I gave empireDB a quick look a while ago and it looks interesting. Besides
 JPersist I also stumbled upon JaQu
 (http://www.h2database.com/html/jaqu.html), which is still in its
 infancy.
 I'm sure there's more LINQ-like clones out there.

 As far as I'm concerned, I'd really like to have a thorough look at stuff
 like db4o or couchDB, especially performance wise. I did Hibernate/iBatis
 in
 the past and am currently working on a project with iBatis again. Both
 have
 advantages and disadvantages and I don't love either. I would rather not
 have to care about tables, objects,the mighty mismatch (and in Hibernate's
 case the mighty session) anymore, but just shove that damn thing into an
 object database ;)

 *hides from enraged DBAs and their optimised queries*



 Nino.Martinez wrote:


 Yeah seems to be nice...

 At WUG DK we discussed. That if using stuff like hibernate, for simple
 cruds it's nice but if you have a complex object graph it becomes very
 troublesome to use (if you use cascade all etc.)..

 Ames, Tim wrote:


 Looks like it has a lot in common with JPersist.  That is what I have
 been using. No XML, all POJO.

 -Original Message-
 From: Nino Saturnino Martinez Vazquez Wael
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 16, 2008 11:28 AM
 To: users@wicket.apache.org
 Subject: have anyone tried empire-DB?

 So have you tried it with wicket?

 http://incubator.apache.org/empire-db/

 --
 -Wicket for love

 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]

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 _
 _

 EMAIL CONFIDENTIALITY NOTICE
 This Email message, and any attachments, may contain confidential
 patient health information that is legally protected. This information is
 intended only for the use of the individual or entity named above. The
 authorized recipient of this information is prohibited from
 disclosing this information to any other party unless required to do so
 by law or regulation and is required to destroy the information after its
 stated need has been fulfilled. If you are not the intended recipient, you
 are hereby notified that any disclosure, copying, distribution, or action
 taken in reliance on the contents of this message is strictly prohibited.
 If you have received this information in error, please notify the sender
 immediately by replying to this message and delete the message from your
 system.


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



 --
 -Wicket for love

 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]









 --
 -Wicket for love

 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]



Re: Re: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-23 Thread Igor Vaynberg
http://ptrthomas.wordpress.com/2008/09/04/wicket-and-gwt-compared-with-code/

-igor

On Wed, Oct 22, 2008 at 10:42 PM,  [EMAIL PROTECTED] wrote:
 Hi Bruno,

 I appreciate it that you pray for the rest of my team :-) I won't be a bad
 looser, so I will give my best with the other devs to build a good
 solution with GWT. I really hope that it is not inherent to GWT that the
 code gets big and unmaintainable. So I cross my fingers and hope for the
 best...

 Kind regards,
 Christoph

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



Re: Associating a request to a Session

2008-10-23 Thread David Leangen
On Wed, 2008-10-22 at 23:10 -0700, Serkan Camurcuoglu wrote:
 I think your session id changes because you access the server as
 localhost:8080 for the first time, but yahoo forwards you back to
 www.bioscene.co.jp (which I think is the same host), so you access the same
 server with a different host name, and your browser does not send the same
 cookie..

Damn, you're smart!

Thanks for taking the time to look at this. I got so used to debugging
this way that I didn't even think about that.

OpenID is a bit problematic to debug because if you are not on the
production host, you need to jump through all sorts of hoops to get it
working.


Anyway, thanks a lot! :-)


Cheers,
=dml




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



Re: how to unittest a checkbox

2008-10-23 Thread Minto van der Sluis

thx for your reply.

Yes I already tried used FormTester, but I can't find any method to change
the value of a CheckBox besides the select method. But my checkbox is a
stand-alone one and not part of a group. Using the select method did not
results in the outcome I was looking for. :-(

1) Should I use a checkgroup with just one checkbox ? 
2) Have I overlooked some other way to change the value of a CheckBox from
inside a unittest?

In regard to option 1, it feels incorrect to change working code just to
facilitate unittesting? If that's what it takes I will change my code. It's
just that I wonder if I missed something.

regards,

Minto van der Sluis


jwcarman wrote:
 
 Have you tried using FormTester?
 
 On Wed, Oct 22, 2008 at 5:20 AM, Minto van der Sluis
 [EMAIL PROTECTED] wrote:

 Hi folks,

 Creating unittests for my pages I managed to read the value a checkbox of
 a
 rendered page. I used:

tester.assertModelValue( form:myCheckBox, true );

 However I failed to change that value in my unittest prior to submitting
 the
 form.

 Can anyone point in the right direction?

 Kind regards,

 Minto van der Sluis

 --
 View this message in context:
 http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20106917.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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20125169.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]



What's the difference between Check and CheckBox

2008-10-23 Thread Minto van der Sluis

Messing around with unittesting a CheckBox, I discovered Check as well:

org.apache.wicket.markup.html.form.Check;
org.apache.wicket.markup.html.form.CheckBox;

To me it's not very clean what the difference is, since they are both
attached to the same markup:

input type=checkbox ... 

Can anyone enlighten me ?

regards,

Minto van der Sluis
-- 
View this message in context: 
http://www.nabble.com/What%27s-the-difference-between-Check-and-CheckBox-tp20125256p20125256.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: GMAP2 with Wicket AjaxTabbedPanel

2008-10-23 Thread Martin Funk
Hi kiks,

could you boil that down to a quickstart. I'll be happy to look into that.

mf

2008/10/23, ej595 [EMAIL PROTECTED]:

 Im having a most strange problem and im wondering if anyone has a fix at
 all.
 I have a series of ajax tabbed panels one of which is supposed to show a
 gmap2 google map. For some totally bizarre reason, the tab blows up with the
 following error ...

  ERROR org.apache.wicket.RequestCycle - Too many path parts, please provide
 sufficient number of path parameter names

 Now, ive inspected the URI and noticed that the bookmarkable page link has
 some weird googlemap url appended to it, and hence makes the bookmarkable
 link seem to have more parameters then the mount statement declares. So ...
 URI SHOULD be /V/2/ON/Color/Brown/  But is coming out as
 /V/2/ON/Color/Brown/http://www.google.com/jsapi
 I have no idea at all why this is occurring. If the same components are
 stored outside the tabbedpanel, then its all fine.

 Has anyone come across this, or does anyone have a workaround ?
 Many thanks in advance.
 --
 View this message in context:
 http://www.nabble.com/GMAP2-with-Wicket-AjaxTabbedPanel-tp20124469p20124469.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: have anyone tried empire-DB?

2008-10-23 Thread Wayne Pope
well I'm new to Hibernate, and it seems that you must be extremely consious
of how hibernate handles mapping etc. This may also be the same with other
object to relational frameworks. An example is the the behaviour of
OneToMany mappings using List as this uses bag sematics. Hibernate's
handling of these relationships is somewhat brute force i.e. it deletes
existing entries and re-inserts to match the current collection and
therefore you need to use Set's or use collectionid to create an idbag.
Therefore straight away I can't use a List (which is all I need) in the
code.

There seems (to me) many many gotchas with Hibernate that you need to be
aware of and the error messages don't tell you much compare to say Wicket.

I come from a world where we used stored proceedures before and you simply
provided the straight mapping from the result columns to your pojos. This
was very flexible as you could change your pojos with no impact to the db
structure and vice-versa we could completly change the db schema (for
performance or any reason) with no impact on the code. This seems to work
well.

On Thu, Oct 23, 2008 at 8:36 AM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 im curious in what way does it influence java code...

 -igor

 On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
 [EMAIL PROTECTED] wrote:
  Nino what do you recommend in terms orf DB framework. We're currently
 using
  Hibernate and I'm personally finding it a pain - it seems to influence
 the
  java code way too much and it create some horrible joins if we're not
  carefull. Any suggestions that you've used in the real world?
 
  On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael 
  [EMAIL PROTECTED] wrote:
 
  This is interesting:
 
  (JaQu) Provide API level compatibility with JPA (so that JaQu can be
 used
  as an extension of JPA).
 
  But I think something similar are on its way for JPA 2.0..?
 
 
  marco.behler wrote:
 
  I gave empireDB a quick look a while ago and it looks interesting.
 Besides
  JPersist I also stumbled upon JaQu
  (http://www.h2database.com/html/jaqu.html), which is still in its
  infancy.
  I'm sure there's more LINQ-like clones out there.
 
  As far as I'm concerned, I'd really like to have a thorough look at
 stuff
  like db4o or couchDB, especially performance wise. I did
 Hibernate/iBatis
  in
  the past and am currently working on a project with iBatis again. Both
  have
  advantages and disadvantages and I don't love either. I would rather
 not
  have to care about tables, objects,the mighty mismatch (and in
 Hibernate's
  case the mighty session) anymore, but just shove that damn thing into
 an
  object database ;)
 
  *hides from enraged DBAs and their optimised queries*
 
 
 
  Nino.Martinez wrote:
 
 
  Yeah seems to be nice...
 
  At WUG DK we discussed. That if using stuff like hibernate, for simple
  cruds it's nice but if you have a complex object graph it becomes very
  troublesome to use (if you use cascade all etc.)..
 
  Ames, Tim wrote:
 
 
  Looks like it has a lot in common with JPersist.  That is what I have
  been using. No XML, all POJO.
 
  -Original Message-
  From: Nino Saturnino Martinez Vazquez Wael
  [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 16, 2008 11:28 AM
  To: users@wicket.apache.org
  Subject: have anyone tried empire-DB?
 
  So have you tried it with wicket?
 
  http://incubator.apache.org/empire-db/
 
  --
  -Wicket for love
 
  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]
 
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 _
  _
  _
 
  EMAIL CONFIDENTIALITY NOTICE
  This Email message, and any attachments, may contain confidential
  patient health information that is legally protected. This
 information is
  intended only for the use of the individual or entity named above.
 The
  authorized recipient of this information is prohibited from
  disclosing this information to any other party unless required to do
 so
  by law or regulation and is required to destroy the information after
 its
  stated need has been fulfilled. If you are not the intended
 recipient, you
  are hereby notified that any disclosure, copying, distribution, or
 action
  taken in reliance on the contents of this message is strictly
 prohibited.
  If you have received this information in error, please notify the
 sender
  immediately by replying to this message and delete the message from
 your
  system.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  -Wicket for love
 
  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684
 
 
  

Re: Associating a request to a Session

2008-10-23 Thread Serkan Camurcuoglu

I'm glad it worked :)




David Leangen-8 wrote:
 
 
 Thanks for taking the time to look at this. I got so used to debugging
 this way that I didn't even think about that.
 
 

-- 
View this message in context: 
http://www.nabble.com/Associating-a-request-to-a-Session-tp19641227p20125368.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: have anyone tried empire-DB?

2008-10-23 Thread Igor Vaynberg
seems to me you just dont grasp how the mappings work. eg if you use a
@OneToMany with mappedby and let the other side control the
association then nothing is automatically inserted or deleted.
further, even if you do not use mappedby then nothing is deleted
unless you declare the delete orphan cascade.

the problem here is that List is a specific type of collection where
each element is uniquely identified by its index. that is just the
nature of lists and has nothing to do with hibenrate. this generally
does not map nicely to database collections unless you actually have
an index column in your table, so lists are rarely used when dealing
with databases...

i will agree with you as far as hibernate's horrible error reporting,
but other then that i find it a good tool and do not see many cases
where the abstraction leaks into actual coding style. some concepts
are very leaky, such as lazy loading, but that cant really be helped.

-igor

On Wed, Oct 22, 2008 at 11:56 PM, Wayne Pope
[EMAIL PROTECTED] wrote:
 well I'm new to Hibernate, and it seems that you must be extremely consious
 of how hibernate handles mapping etc. This may also be the same with other
 object to relational frameworks. An example is the the behaviour of
 OneToMany mappings using List as this uses bag sematics. Hibernate's
 handling of these relationships is somewhat brute force i.e. it deletes
 existing entries and re-inserts to match the current collection and
 therefore you need to use Set's or use collectionid to create an idbag.
 Therefore straight away I can't use a List (which is all I need) in the
 code.

 There seems (to me) many many gotchas with Hibernate that you need to be
 aware of and the error messages don't tell you much compare to say Wicket.

 I come from a world where we used stored proceedures before and you simply
 provided the straight mapping from the result columns to your pojos. This
 was very flexible as you could change your pojos with no impact to the db
 structure and vice-versa we could completly change the db schema (for
 performance or any reason) with no impact on the code. This seems to work
 well.

 On Thu, Oct 23, 2008 at 8:36 AM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 im curious in what way does it influence java code...

 -igor

 On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
 [EMAIL PROTECTED] wrote:
  Nino what do you recommend in terms orf DB framework. We're currently
 using
  Hibernate and I'm personally finding it a pain - it seems to influence
 the
  java code way too much and it create some horrible joins if we're not
  carefull. Any suggestions that you've used in the real world?
 
  On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael 
  [EMAIL PROTECTED] wrote:
 
  This is interesting:
 
  (JaQu) Provide API level compatibility with JPA (so that JaQu can be
 used
  as an extension of JPA).
 
  But I think something similar are on its way for JPA 2.0..?
 
 
  marco.behler wrote:
 
  I gave empireDB a quick look a while ago and it looks interesting.
 Besides
  JPersist I also stumbled upon JaQu
  (http://www.h2database.com/html/jaqu.html), which is still in its
  infancy.
  I'm sure there's more LINQ-like clones out there.
 
  As far as I'm concerned, I'd really like to have a thorough look at
 stuff
  like db4o or couchDB, especially performance wise. I did
 Hibernate/iBatis
  in
  the past and am currently working on a project with iBatis again. Both
  have
  advantages and disadvantages and I don't love either. I would rather
 not
  have to care about tables, objects,the mighty mismatch (and in
 Hibernate's
  case the mighty session) anymore, but just shove that damn thing into
 an
  object database ;)
 
  *hides from enraged DBAs and their optimised queries*
 
 
 
  Nino.Martinez wrote:
 
 
  Yeah seems to be nice...
 
  At WUG DK we discussed. That if using stuff like hibernate, for simple
  cruds it's nice but if you have a complex object graph it becomes very
  troublesome to use (if you use cascade all etc.)..
 
  Ames, Tim wrote:
 
 
  Looks like it has a lot in common with JPersist.  That is what I have
  been using. No XML, all POJO.
 
  -Original Message-
  From: Nino Saturnino Martinez Vazquez Wael
  [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 16, 2008 11:28 AM
  To: users@wicket.apache.org
  Subject: have anyone tried empire-DB?
 
  So have you tried it with wicket?
 
  http://incubator.apache.org/empire-db/
 
  --
  -Wicket for love
 
  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]
 
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 _
  _
  _
 
  EMAIL CONFIDENTIALITY NOTICE
  This Email message, and any attachments, may contain confidential
  patient health information that is legally protected. This
 

Re: have anyone tried empire-DB?

2008-10-23 Thread Wayne Pope
seems to me you just dont grasp how the mappings work.
lol yes, I am new to it so lots to grasp. To be fair I did sort out the
mappings to use List after a lot of messing about. I just find things take a
long time to behave correctly in Hibernate, and thus not very productive -
for me it one of the harder frameworks to get up to speed with , especially
as I'm using the annotations and most of the doc/knowledge base is around
the xml form. Perhaps I should switch.

However my original quesiton still stands - any other db frameworks that
anyone recommends?

On Thu, Oct 23, 2008 at 9:03 AM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 seems to me you just dont grasp how the mappings work. eg if you use a
 @OneToMany with mappedby and let the other side control the
 association then nothing is automatically inserted or deleted.
 further, even if you do not use mappedby then nothing is deleted
 unless you declare the delete orphan cascade.

 the problem here is that List is a specific type of collection where
 each element is uniquely identified by its index. that is just the
 nature of lists and has nothing to do with hibenrate. this generally
 does not map nicely to database collections unless you actually have
 an index column in your table, so lists are rarely used when dealing
 with databases...

 i will agree with you as far as hibernate's horrible error reporting,
 but other then that i find it a good tool and do not see many cases
 where the abstraction leaks into actual coding style. some concepts
 are very leaky, such as lazy loading, but that cant really be helped.

 -igor

 On Wed, Oct 22, 2008 at 11:56 PM, Wayne Pope
 [EMAIL PROTECTED] wrote:
  well I'm new to Hibernate, and it seems that you must be extremely
 consious
  of how hibernate handles mapping etc. This may also be the same with
 other
  object to relational frameworks. An example is the the behaviour of
  OneToMany mappings using List as this uses bag sematics. Hibernate's
  handling of these relationships is somewhat brute force i.e. it deletes
  existing entries and re-inserts to match the current collection and
  therefore you need to use Set's or use collectionid to create an idbag.
  Therefore straight away I can't use a List (which is all I need) in the
  code.
 
  There seems (to me) many many gotchas with Hibernate that you need to be
  aware of and the error messages don't tell you much compare to say
 Wicket.
 
  I come from a world where we used stored proceedures before and you
 simply
  provided the straight mapping from the result columns to your pojos. This
  was very flexible as you could change your pojos with no impact to the db
  structure and vice-versa we could completly change the db schema (for
  performance or any reason) with no impact on the code. This seems to work
  well.
 
  On Thu, Oct 23, 2008 at 8:36 AM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
 
  im curious in what way does it influence java code...
 
  -igor
 
  On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
  [EMAIL PROTECTED] wrote:
   Nino what do you recommend in terms orf DB framework. We're currently
  using
   Hibernate and I'm personally finding it a pain - it seems to influence
  the
   java code way too much and it create some horrible joins if we're not
   carefull. Any suggestions that you've used in the real world?
  
   On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael
 
   [EMAIL PROTECTED] wrote:
  
   This is interesting:
  
   (JaQu) Provide API level compatibility with JPA (so that JaQu can be
  used
   as an extension of JPA).
  
   But I think something similar are on its way for JPA 2.0..?
  
  
   marco.behler wrote:
  
   I gave empireDB a quick look a while ago and it looks interesting.
  Besides
   JPersist I also stumbled upon JaQu
   (http://www.h2database.com/html/jaqu.html), which is still in its
   infancy.
   I'm sure there's more LINQ-like clones out there.
  
   As far as I'm concerned, I'd really like to have a thorough look at
  stuff
   like db4o or couchDB, especially performance wise. I did
  Hibernate/iBatis
   in
   the past and am currently working on a project with iBatis again.
 Both
   have
   advantages and disadvantages and I don't love either. I would
 rather
  not
   have to care about tables, objects,the mighty mismatch (and in
  Hibernate's
   case the mighty session) anymore, but just shove that damn thing
 into
  an
   object database ;)
  
   *hides from enraged DBAs and their optimised queries*
  
  
  
   Nino.Martinez wrote:
  
  
   Yeah seems to be nice...
  
   At WUG DK we discussed. That if using stuff like hibernate, for
 simple
   cruds it's nice but if you have a complex object graph it becomes
 very
   troublesome to use (if you use cascade all etc.)..
  
   Ames, Tim wrote:
  
  
   Looks like it has a lot in common with JPersist.  That is what I
 have
   been using. No XML, all POJO.
  
   -Original Message-
   From: Nino Saturnino Martinez Vazquez Wael
   

Re: redirect issue on IE causing HTTP 404

2008-10-23 Thread freak182

Hello Igor,

Im still investagating the scenario because in different machine where IE7
and IE6 install it works fine. Im just wandering why here in my machine
(IE7) is not working. sorry for the inconvenience. i will just investigate
before posting again.

Thanks a lot.
Cheers.



igor.vaynberg wrote:
 
 create a quickstart that reproduces this and attach it to a jira issue.
 
 -igor
 
 On Wed, Oct 22, 2008 at 9:27 PM, freak182 [EMAIL PROTECTED] wrote:

 Hello Igor,

 I have a problem in IE when i redirect wicket pages using javascript
 using
 location.href = '?wicket:interface=:3' . here is the scenario:

 public class InitBehavior extends AbstractBehavior
 {
   final IModel params = new AbstractReadOnlyModel() {

@Override
public Object getObject()
{

// redirect url's
map.put(roamUrl,
 RequestCycle.get().urlFor(NoIdPage.class,
 null));
map.put(loginUrl, RequestCycle.get().urlFor(new
 LoginPage()));
map.put(errorUrl, RequestCycle.get().urlFor(new
 ErrorPage()));
return map;
}

};

component.add(TextTemplateHeaderContributor.forJavaScript(
InitBehavior.class, init.js, params));
super.bind(component);
}

 ...
 }

 and in init.js

 function clientReady() {


// detect if arcot id exist
if (!IDExists(strWFUserID)) {
if (Flag) {
//
 document.getElementById('divErrPopup').style.display = 'block';

location.href = '${errorUrl}';
} else {


 location.href = '${roamUrl}';
}
} else {


location.href = '${loginUrl}';

}
 }

 this script is executed upon loading of the page. This working fine in
 firefox. im using wicket 1.3.4 i also try the latest release 1.3.5 but it
 still problem in IE(http://localhost:8080/test/undefined). I also,
 mount(new
 QueryStringUrlCodingStrategy(noid, NoIdPage.class)); again this works
 only
 in firefox but not in IE. since our client mostly IE users. i also found
 this bug https://issues.apache.org/jira/browse/WICKET-1449 ... How can i
 solve this problem? Is there a work around to this?

 Thanks a lot.
 Cheers.

 --
 View this message in context:
 http://www.nabble.com/redirect-issue-on-IE-causing-HTTP-4040-tp20124228p20124228.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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/redirect-issue-on-IE-causing-HTTP-404-tp20124228p20125698.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: What's the difference between Check and CheckBox

2008-10-23 Thread Michael Sparer


the main difference is that checks belong to a checkgroup (useful in
repeaters) and checkbox is convenient when used alone

check out http://www.wicketstuff.org/wicket13/forminput/ ;-)

regards,
Michael


Minto van der Sluis wrote:
 
 Messing around with unittesting a CheckBox, I discovered Check as well:
 
 org.apache.wicket.markup.html.form.Check;
 org.apache.wicket.markup.html.form.CheckBox;
 
 To me it's not very clean what the difference is, since they are both
 attached to the same markup:
 
 input type=checkbox ... 
 
 Can anyone enlighten me ?
 
 regards,
 
 Minto van der Sluis
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/What%27s-the-difference-between-Check-and-CheckBox-tp20125256p20126224.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]



SortablePalette possible?

2008-10-23 Thread Rommert de Bruijn

Hi all,

I'm currently working on a web application that requires Persons to be 
added/removed to/from a UserGroup. What I have in mind is much like the 
Palette component, but with added functionality:


a) a left hand list with all unselected Persons , a right hand list with 
selected Persons, and buttons to move Persons from left to right and 
vice versa, supporting Ctrl/Shift+click behavior to make selections.

b) each item in the list shows firstName and lastName, as tabular data.
c) up/down sorting behavior on each property that is displayed (in this 
case: firstName and lastName), for both lists.


a) is basically Palette. But b) does not go well with Palette, since the 
option tag in Palette is not allowed (w3c) to take any additional html 
such as tr and td. To display tabular data, I could use a DataView, 
which would work nicely with c) using OrderByBorders. But alas: DataView 
does not support the Ctrl/Shift+click behavior that I need.


As they say: pictures say more then 1000 words. So I'll skip the other 
800 or so words and attach a  screenshot of what I'd like to make :) The 
image contains some Dutch text, which I'll gladly translate if necessary.


My actual questions:
- Has anyone tried this before, either successful or unsuccessful?
- Which components would you use to create something that does all this?
- If this combination of functionality seems impossible to merge into 
one component, which functionality would you drop to create the next 
best thing?


Thanks in advance,
Rommert de Bruijn

--
Rommert de Bruijn
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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

Re: SortablePalette possible?

2008-10-23 Thread Rommert de Bruijn

And a link to the image I promised:

http://img395.imageshack.us/my.php?image=sortablepaletteea0.jpg

(may contain some horrible adds)

Rommert de Bruijn wrote:

Hi all,

I'm currently working on a web application that requires Persons to be 
added/removed to/from a UserGroup. What I have in mind is much like 
the Palette component, but with added functionality:


a) a left hand list with all unselected Persons , a right hand list 
with selected Persons, and buttons to move Persons from left to right 
and vice versa, supporting Ctrl/Shift+click behavior to make selections.

b) each item in the list shows firstName and lastName, as tabular data.
c) up/down sorting behavior on each property that is displayed (in 
this case: firstName and lastName), for both lists.


a) is basically Palette. But b) does not go well with Palette, since 
the option tag in Palette is not allowed (w3c) to take any 
additional html such as tr and td. To display tabular data, I 
could use a DataView, which would work nicely with c) using 
OrderByBorders. But alas: DataView does not support the 
Ctrl/Shift+click behavior that I need.


As they say: pictures say more then 1000 words. So I'll skip the other 
800 or so words and attach a  screenshot of what I'd like to make :) 
The image contains some Dutch text, which I'll gladly translate if 
necessary.


My actual questions:
- Has anyone tried this before, either successful or unsuccessful?
- Which components would you use to create something that does all this?
- If this combination of functionality seems impossible to merge into 
one component, which functionality would you drop to create the next 
best thing?


Thanks in advance,
Rommert de Bruijn



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



--
Rommert de Bruijn
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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



ListView broken?

2008-10-23 Thread pieter claassen

I am getting a classcast exception in ListView that is stumping me.

This is the error message (top few lines)

WicketMessage: Error attaching this container for rendering:  
[MarkupContainer [Component id = questioneditform]]


Root cause:

java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
at  
org 
.apache 
.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)

at org.apache.wicket.Component.getModelObject(Component.java:1558)
at com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm 
$1.populateItem(TemplateEditPage.java:93)



This is the code that generates my ListItems:

ListView questions = new ListView(questions, template
.getQuestions()) {


@Override
protected void populateItem(ListItem item) {
final QuestionAndAnswer qanda = 
(QuestionAndAnswer) item
.getModelObject();
setModel(new 
CompoundPropertyModel(qanda));



I know for a fact that template.getQuestions() produces an ArrayList.

The arraylist works when there is only 1 item in it but when I have  
more than 1 item, it fails with the ClassCastException. Is this a  
wicket problem or am I doing something wrong?


Regards,
Pieter
pieter claassen
[EMAIL PROTECTED]




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



Re: ListView broken?

2008-10-23 Thread Dipu
 looks like template.getQuestions() is returning a list  with items in it
which is not of the type QuestionAndAnswer

try iterating through the list and logging the class name of each item in it

Dipu



On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen [EMAIL PROTECTED]wrote:

 I am getting a classcast exception in ListView that is stumping me.

 This is the error message (top few lines)

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = questioneditform]]

 Root cause:

 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at
 org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at
 com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm$1.populateItem(TemplateEditPage.java:93)


 This is the code that generates my ListItems:

ListView questions = new ListView(questions,
 template
.getQuestions()) {


@Override
protected void populateItem(ListItem item) {
final QuestionAndAnswer qanda =
 (QuestionAndAnswer) item
.getModelObject();
setModel(new
 CompoundPropertyModel(qanda));



 I know for a fact that template.getQuestions() produces an ArrayList.

 The arraylist works when there is only 1 item in it but when I have more
 than 1 item, it fails with the ClassCastException. Is this a wicket problem
 or am I doing something wrong?

 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]




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




Re: ListView broken?

2008-10-23 Thread Serkan Camurcuoglu

it seems like template.getQuestions() returns a model which has a
QuestionAndAnswer instance instead of a list as its model object.. The code
on the line where the exception is thrown is:

return ((List)listView.getModelObject()).get(index);

which indicates that your problem is trying to cast a QuestionAndAnswer
instance to a List. Everyone is using ListView and it cannot be broken this
way :)




Pieter Claassen wrote:
 
 I am getting a classcast exception in ListView that is stumping me.
 
 This is the error message (top few lines)
 
 WicketMessage: Error attaching this container for rendering:  
 [MarkupContainer [Component id = questioneditform]]
 
 Root cause:
 
 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at  
 org 
 .apache 
 .wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm 
 $1.populateItem(TemplateEditPage.java:93)
 
 
 This is the code that generates my ListItems:
 
   ListView questions = new ListView(questions, template
   .getQuestions()) {
 
 
   @Override
   protected void populateItem(ListItem item) {
   final QuestionAndAnswer qanda = 
 (QuestionAndAnswer) item
   .getModelObject();
   setModel(new 
 CompoundPropertyModel(qanda));
 
 
 
 I know for a fact that template.getQuestions() produces an ArrayList.
 
 The arraylist works when there is only 1 item in it but when I have  
 more than 1 item, it fails with the ClassCastException. Is this a  
 wicket problem or am I doing something wrong?
 
 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/ListView-broken--tp20126952p20127126.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]



Problem with a stateless form

2008-10-23 Thread aditsu

Hi, I made a small application to reproduce the problem. You can download it
from http://aditsu.net/wickettest.zip
Dependencies: jetty 6, wicket 1.4-m3, slf4j, log4j
Steps to reproduce:
1. Run the test.Start class
2. Open http://localhost:8080 in a browser
3. Open http://localhost:8080/page2 in a new tab
4. Go to the first tab and click submit

Result:

WicketRuntimeException: unable to find component with path form on stateless
page [Page class = test.Page2, id = 0, version = 0]

It looks like the 2 pages are created with the same id in 2 different
pagemaps, but when I submit the form, it goes to the second pagemap and
finds the second page (with no form on it). Bug?

-- 
View this message in context: 
http://www.nabble.com/Problem-with-a-stateless-form-tp20127191p20127191.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]



Scrolling items in a data view

2008-10-23 Thread graham tate

I have a data view area which i populate with a series of records,  I limit
the items displayed per page to say '4' and i then allow the user to 'page'
through the items via two links ie. view next/ view prev  this works
fine and im able to see the appropriate page of info on the screen. 
However what i would like is that instead of the new items replacing the
original items on the screen, the items are appended in a dynamic fashion
i.e the old items 'roll' off the page and the new items 'roll' on. 
Has anyone done anything lik ethis before? is it even possible?

Cheers 
-- 
View this message in context: 
http://www.nabble.com/Scrolling-items-in-a-data-view-tp20127200p20127200.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: ListView broken?

2008-10-23 Thread pieter claassen

Comments inline:

On Oct 23, 2008, at 10:59 AM, Serkan Camurcuoglu wrote:



it seems like template.getQuestions() returns a model which has a
QuestionAndAnswer instance instead of a list as its model object..



This is the code in template that returns an arraylist.

public ArrayListQuestionAndAnswer getQuestions() {
return questions;
}

Is this correct?

P



The code
on the line where the exception is thrown is:

return ((List)listView.getModelObject()).get(index);

which indicates that your problem is trying to cast a  
QuestionAndAnswer
instance to a List. Everyone is using ListView and it cannot be  
broken this

way :)




Pieter Claassen wrote:


I am getting a classcast exception in ListView that is stumping me.

This is the error message (top few lines)

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = questioneditform]]

Root cause:

java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
at
org
.apache
.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java: 
55)

at org.apache.wicket.Component.getModelObject(Component.java:1558)
at com.musmato.wicket.pages.templates.TemplateEditPage 
$QuestionEditForm

$1.populateItem(TemplateEditPage.java:93)


This is the code that generates my ListItems:

ListView questions = new ListView(questions, template
.getQuestions()) {


@Override
protected void populateItem(ListItem item) {
final QuestionAndAnswer qanda = 
(QuestionAndAnswer) item
.getModelObject();
setModel(new 
CompoundPropertyModel(qanda));



I know for a fact that template.getQuestions() produces an ArrayList.

The arraylist works when there is only 1 item in it but when I have
more than 1 item, it fails with the ClassCastException. Is this a
wicket problem or am I doing something wrong?

Regards,
Pieter
pieter claassen
[EMAIL PROTECTED]




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





--
View this message in context: 
http://www.nabble.com/ListView-broken--tp20126952p20127126.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]



pieter claassen
[EMAIL PROTECTED]




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



Re: ListView broken?

2008-10-23 Thread pieter claassen

Hi Dipu,

I tried that but when I do the following:

protected void populateItem(ListItem item) {
			System.out.println(+++ +  
item.getModelObject().getClass().getName());
			final QuestionAndAnswer qanda = (QuestionAndAnswer)  
item.getModelObject();


I find that I now get the ClassCastException in the System.out.println  
line. It is clear as mud that the problem is that I am trying to force  
something into a list which is not a list?


Regards,
Pieter


On Oct 23, 2008, at 10:59 AM, Dipu wrote:

looks like template.getQuestions() is returning a list  with items  
in it

which is not of the type QuestionAndAnswer

try iterating through the list and logging the class name of each  
item in it


Dipu



On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen [EMAIL PROTECTED] 
wrote:



I am getting a classcast exception in ListView that is stumping me.

This is the error message (top few lines)

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = questioneditform]]

Root cause:

java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
at
org 
.apache 
.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java: 
55)

at org.apache.wicket.Component.getModelObject(Component.java:1558)
at
com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm 
$1.populateItem(TemplateEditPage.java:93)



This is the code that generates my ListItems:

  ListView questions = new ListView(questions,
template
  .getQuestions()) {


  @Override
  protected void populateItem(ListItem  
item) {

  final QuestionAndAnswer qanda =
(QuestionAndAnswer) item
  .getModelObject 
();

  setModel(new
CompoundPropertyModel(qanda));



I know for a fact that template.getQuestions() produces an ArrayList.

The arraylist works when there is only 1 item in it but when I have  
more
than 1 item, it fails with the ClassCastException. Is this a wicket  
problem

or am I doing something wrong?

Regards,
Pieter
pieter claassen
[EMAIL PROTECTED]




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




pieter claassen
[EMAIL PROTECTED]




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



Re: ListView broken?

2008-10-23 Thread Dipu
can't you check what exactly is being returned by template.getQuestions()
 and if its a list what are the items in it




On Thu, Oct 23, 2008 at 10:10 AM, pieter claassen [EMAIL PROTECTED]wrote:

 Hi Dipu,

 I tried that but when I do the following:

protected void populateItem(ListItem item) {
System.out.println(+++ +
 item.getModelObject().getClass().getName());
final QuestionAndAnswer qanda = (QuestionAndAnswer)
 item.getModelObject();

 I find that I now get the ClassCastException in the System.out.println
 line. It is clear as mud that the problem is that I am trying to force
 something into a list which is not a list?

 Regards,
 Pieter



 On Oct 23, 2008, at 10:59 AM, Dipu wrote:

  looks like template.getQuestions() is returning a list  with items in it
 which is not of the type QuestionAndAnswer

 try iterating through the list and logging the class name of each item in
 it

 Dipu



 On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen [EMAIL PROTECTED]
 wrote:

  I am getting a classcast exception in ListView that is stumping me.

 This is the error message (top few lines)

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = questioneditform]]

 Root cause:

 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at

 org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at

 com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm$1.populateItem(TemplateEditPage.java:93)


 This is the code that generates my ListItems:

  ListView questions = new ListView(questions,
 template
  .getQuestions()) {


  @Override
  protected void populateItem(ListItem item) {
  final QuestionAndAnswer qanda =
 (QuestionAndAnswer) item
  .getModelObject();
  setModel(new
 CompoundPropertyModel(qanda));



 I know for a fact that template.getQuestions() produces an ArrayList.

 The arraylist works when there is only 1 item in it but when I have more
 than 1 item, it fails with the ClassCastException. Is this a wicket
 problem
 or am I doing something wrong?

 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]




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



 pieter claassen
 [EMAIL PROTECTED]




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




Re: ListView broken?

2008-10-23 Thread pieter claassen

Ok, I added;

public class Debug {
public static void debug(List list) {
for (Object item : list) {
System.out.println(++DEBUG++:  + 
item.getClass().toString());
}
}


and called debug just before I returned my ArrayList of question:

public ArrayListQuestionAndAnswer getQuestions() {
Debug.debug(questions);
return questions;
}

This is what I saw in my console. There are two objects in the list  
and they are both QuestionAndAnswer objects



++DEBUG++: class com.musmato.model.QuestionAndAnswer
++DEBUG++: class com.musmato.model.QuestionAndAnswer

Regards,
Pieter

On Oct 23, 2008, at 11:18 AM, Dipu wrote:

can't you check what exactly is being returned by  
template.getQuestions()

and if its a list what are the items in it




On Thu, Oct 23, 2008 at 10:10 AM, pieter claassen [EMAIL PROTECTED] 
wrote:



Hi Dipu,

I tried that but when I do the following:

  protected void populateItem(ListItem item) {
  System.out.println(+++ +
item.getModelObject().getClass().getName());
  final QuestionAndAnswer qanda =  
(QuestionAndAnswer)

item.getModelObject();

I find that I now get the ClassCastException in the  
System.out.println
line. It is clear as mud that the problem is that I am trying to  
force

something into a list which is not a list?

Regards,
Pieter



On Oct 23, 2008, at 10:59 AM, Dipu wrote:

looks like template.getQuestions() is returning a list  with items  
in it

which is not of the type QuestionAndAnswer

try iterating through the list and logging the class name of each  
item in

it

Dipu



On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen [EMAIL PROTECTED]

wrote:


I am getting a classcast exception in ListView that is stumping me.


This is the error message (top few lines)

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = questioneditform]]

Root cause:

java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
at

org 
.apache 
.wicket 
.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)

at org.apache.wicket.Component.getModelObject(Component.java:1558)
at

com.musmato.wicket.pages.templates.TemplateEditPage 
$QuestionEditForm$1.populateItem(TemplateEditPage.java:93)



This is the code that generates my ListItems:

ListView questions = new ListView(questions,
template
.getQuestions()) {


@Override
protected void populateItem(ListItem  
item) {

final QuestionAndAnswer qanda =
(QuestionAndAnswer) item
.getModelObject 
();

setModel(new
CompoundPropertyModel(qanda));



I know for a fact that template.getQuestions() produces an  
ArrayList.


The arraylist works when there is only 1 item in it but when I  
have more

than 1 item, it fails with the ClassCastException. Is this a wicket
problem
or am I doing something wrong?

Regards,
Pieter
pieter claassen
[EMAIL PROTECTED]




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




pieter claassen
[EMAIL PROTECTED]




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




pieter claassen
[EMAIL PROTECTED]




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



Re: ListView broken?

2008-10-23 Thread Dipu
pass , sorry i have no clue

On Thu, Oct 23, 2008 at 10:37 AM, pieter claassen [EMAIL PROTECTED]wrote:

 Ok, I added;

 public class Debug {
public static void debug(List list) {
for (Object item : list) {
System.out.println(++DEBUG++:  +
 item.getClass().toString());
}
}


 and called debug just before I returned my ArrayList of question:

public ArrayListQuestionAndAnswer getQuestions() {
Debug.debug(questions);
return questions;
}

 This is what I saw in my console. There are two objects in the list and
 they are both QuestionAndAnswer objects


 ++DEBUG++: class com.musmato.model.QuestionAndAnswer
 ++DEBUG++: class com.musmato.model.QuestionAndAnswer

 Regards,
 Pieter


 On Oct 23, 2008, at 11:18 AM, Dipu wrote:

  can't you check what exactly is being returned by template.getQuestions()
 and if its a list what are the items in it




 On Thu, Oct 23, 2008 at 10:10 AM, pieter claassen [EMAIL PROTECTED]
 wrote:

  Hi Dipu,

 I tried that but when I do the following:

  protected void populateItem(ListItem item) {
  System.out.println(+++ +
 item.getModelObject().getClass().getName());
  final QuestionAndAnswer qanda = (QuestionAndAnswer)
 item.getModelObject();

 I find that I now get the ClassCastException in the System.out.println
 line. It is clear as mud that the problem is that I am trying to force
 something into a list which is not a list?

 Regards,
 Pieter



 On Oct 23, 2008, at 10:59 AM, Dipu wrote:

 looks like template.getQuestions() is returning a list  with items in it

 which is not of the type QuestionAndAnswer

 try iterating through the list and logging the class name of each item
 in
 it

 Dipu



 On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen [EMAIL PROTECTED]

 wrote:


 I am getting a classcast exception in ListView that is stumping me.


 This is the error message (top few lines)

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = questioneditform]]

 Root cause:

 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at


 org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at


 com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm$1.populateItem(TemplateEditPage.java:93)


 This is the code that generates my ListItems:

ListView questions = new ListView(questions,
 template
.getQuestions()) {


@Override
protected void populateItem(ListItem item) {
final QuestionAndAnswer qanda =
 (QuestionAndAnswer) item
.getModelObject();
setModel(new
 CompoundPropertyModel(qanda));



 I know for a fact that template.getQuestions() produces an ArrayList.

 The arraylist works when there is only 1 item in it but when I have
 more
 than 1 item, it fails with the ClassCastException. Is this a wicket
 problem
 or am I doing something wrong?

 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]




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



  pieter claassen
 [EMAIL PROTECTED]




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



 pieter claassen
 [EMAIL PROTECTED]




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




RE: Double clickable rows in AjaxFallbackDefaultDataTable

2008-10-23 Thread Yazeed Isaacs
Hi Igor

Thanks for the tip. It work perfectly.

I overrode the newRowItem() method of AjaxFallbackDefaultDataTable like
this:

protected Item newRowItem(String id, int index, IModel model) {
Item rowItem = super.newRowItem(id, index, model);
AjaxEventBehavior onDoubleClickBehaviour = new
AjaxEventBehavior(
ondblclick) {

@Override
protected void onEvent(AjaxRequestTarget target)
{
// the code that will execute once a
double click occurs

target.appendJavascript(alert('ondblclick occurred'););
}

};
rowItem.add(onDoubleClickBehaviour);

return rowItem;
}


Regards,
Yazeed Isaacs



-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: 22 October 2008 05:46 PM
To: users@wicket.apache.org
Subject: Re: Double clickable rows in AjaxFallbackDefaultDataTable

add a behavior to the row item that listens to ondblclick or whatever
the event is called. i am not sure that TRs support this, so check in
the browser first.

to add the behavior to the row item override newrowitem on the table.

-igor

On Wed, Oct 22, 2008 at 7:58 AM, Yazeed Isaacs
[EMAIL PROTECTED] wrote:
 Hi

 Does anyone know how to implement something that could do this.

 Please point me in the right direction.

 Regards,
 Yazeed Isaacs


 -
 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]




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



Re: ListView broken?

2008-10-23 Thread Martijn Dashorst
The classcastexception happens on retrieving the N-th item from the
list. The class cast tries to cast the model object of the listview to
a List. Apparently the argument to the listview is not a List, but
somethign that returns a QuestionAndAnswer.

Are you looking at the correct ListView (i.e. are there more ListView
s on your page)?

Martijn

On Thu, Oct 23, 2008 at 11:55 AM, Dipu [EMAIL PROTECTED] wrote:
 pass , sorry i have no clue

 On Thu, Oct 23, 2008 at 10:37 AM, pieter claassen [EMAIL PROTECTED]wrote:

 Ok, I added;

 public class Debug {
public static void debug(List list) {
for (Object item : list) {
System.out.println(++DEBUG++:  +
 item.getClass().toString());
}
}


 and called debug just before I returned my ArrayList of question:

public ArrayListQuestionAndAnswer getQuestions() {
Debug.debug(questions);
return questions;
}

 This is what I saw in my console. There are two objects in the list and
 they are both QuestionAndAnswer objects


 ++DEBUG++: class com.musmato.model.QuestionAndAnswer
 ++DEBUG++: class com.musmato.model.QuestionAndAnswer

 Regards,
 Pieter


 On Oct 23, 2008, at 11:18 AM, Dipu wrote:

  can't you check what exactly is being returned by template.getQuestions()
 and if its a list what are the items in it




 On Thu, Oct 23, 2008 at 10:10 AM, pieter claassen [EMAIL PROTECTED]
 wrote:

  Hi Dipu,

 I tried that but when I do the following:

  protected void populateItem(ListItem item) {
  System.out.println(+++ +
 item.getModelObject().getClass().getName());
  final QuestionAndAnswer qanda = (QuestionAndAnswer)
 item.getModelObject();

 I find that I now get the ClassCastException in the System.out.println
 line. It is clear as mud that the problem is that I am trying to force
 something into a list which is not a list?

 Regards,
 Pieter



 On Oct 23, 2008, at 10:59 AM, Dipu wrote:

 looks like template.getQuestions() is returning a list  with items in it

 which is not of the type QuestionAndAnswer

 try iterating through the list and logging the class name of each item
 in
 it

 Dipu



 On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen [EMAIL PROTECTED]

 wrote:


 I am getting a classcast exception in ListView that is stumping me.


 This is the error message (top few lines)

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = questioneditform]]

 Root cause:

 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at


 org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at


 com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm$1.populateItem(TemplateEditPage.java:93)


 This is the code that generates my ListItems:

ListView questions = new ListView(questions,
 template
.getQuestions()) {


@Override
protected void populateItem(ListItem item) {
final QuestionAndAnswer qanda =
 (QuestionAndAnswer) item
.getModelObject();
setModel(new
 CompoundPropertyModel(qanda));



 I know for a fact that template.getQuestions() produces an ArrayList.

 The arraylist works when there is only 1 item in it but when I have
 more
 than 1 item, it fails with the ClassCastException. Is this a wicket
 problem
 or am I doing something wrong?

 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]




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



  pieter claassen
 [EMAIL PROTECTED]




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



 pieter claassen
 [EMAIL PROTECTED]




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






-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: ListView broken?

2008-10-23 Thread pieter claassen
Ok, I might be doing something thats not ok but . there are not  
two ListViews on this page (there are 3 forms? Is this a problem?)  
ClassCastException is throw at System.out.println()



package com.musmato.wicket.pages.templates;

import java.util.Arrays;

import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.CompoundPropertyModel;

import com.musmato.model.QuestionAndAnswer;
import com.musmato.model.Role;
import com.musmato.model.Template;
import com.musmato.model.WebControlType;
import com.musmato.wicket.model.QuestionAndAnswerWebModel;
import com.musmato.wicket.model.TemplateWebModel;
import com.musmato.wicket.pages.AuthPage;
import com.musmato.wicket.util.WicketApplication;

public class TemplateEditPage extends AuthPage {

public TemplateEditPage(TemplateWebModel templatemodel) {

add(new TemplateEditForm(templateeditform, templatemodel));
add(new QuestionAddForm(questionaddform, templatemodel));
add(new QuestionEditForm(questioneditform, templatemodel));
}

@Override
public Role[] getAllowedRoles() {
// TODO Auto-generated method stub
return null;
}

private class TemplateEditForm extends Form {
private final Template template;

public TemplateEditForm(String id, TemplateWebModel 
templatemodel) {
super(id);
template = (Template) templatemodel.getObject();
setModel(new CompoundPropertyModel(templatemodel));
add(new RequiredTextField(name));
add(new RequiredTextField(version));
add(new TextArea(description));
}

@Override
public void onSubmit() {

WicketApplication.get().getTemplateFactory().store(template);
			setResponsePage(new TemplateEditPage(new  
TemplateWebModel(template)));

}
}

private class QuestionAddForm extends Form {
private final Template template;

public QuestionAddForm(String id, TemplateWebModel 
templatemodel) {
super(id);
template = (Template) templatemodel.getObject();
setModel(new CompoundPropertyModel(new 
QuestionAndAnswerWebModel(
(Long) null)));
add(new RequiredTextField(question));
add(new DropDownChoice(type, 
Arrays.asList(WebControlType
.values(;
}

@Override
public void onSubmit() {
QuestionAndAnswer qanda = (QuestionAndAnswer) getModel()
.getObject();

template.addQuestion(qanda);

WicketApplication.get().getTemplateFactory().store(template);
			setResponsePage(new TemplateEditPage(new  
TemplateWebModel(template)));

}
}

private class QuestionEditForm extends Form {
private Template template;

public QuestionEditForm(String id, TemplateWebModel 
templatemodel) {
super(id);
template = (Template) templatemodel.getObject();
ListView questionlist = new ListView(questions, 
template
.getQuestions()) {
@Override
protected void populateItem(ListItem item) {
System.out.println(+++
+ 
item.getModelObject().getClass().getName());
final QuestionAndAnswer qanda = 
(QuestionAndAnswer) item
.getModelObject();
setModel(new 
CompoundPropertyModel(qanda));
item.add(new 
RequiredTextField(question));
item.add(new DropDownChoice(type, 
Arrays

.asList(WebControlType.values(;
item.add(new Link(delete) {
@Override
public void onClick() {


Re: Static injection not working (wicket-guice)

2008-10-23 Thread Edgar Merino
This one seems to have no answer, I've tried googling and everything 
stopped just here, were I started, I hope someone could provide a 
solution (different than using salve).


Edgar Merino




Edgar Merino escribió:

Anyone for this?


Edgar Merino escribió:

Hello,

   I've been trying to inject a service to some classes that are not 
wicket components, I've asked here and was suggested to use static 
injection: InjectorHolder.getInjector().inject(this); however this is 
not working with guice, I always get an illegalstateexception, 
injectorholder has not been assigned an injector. I've tried 
((GuiceInjectorHolder) 
(RequestCycle.get().getApplication().getMetaData(GuiceInjectorHolder.INJECTOR_KEY))).getInjector().injectMembers(this); 
however that gives me serialization problems, since wicket is not 
creating a proxy for my service. I'm on my way to give salve a try 
but I'm having some problems there too (waiting for a response from 
the Discussion group), what suggestions can you make?


Thanks in advance,
Edgar Merino







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



Re: how to unittest a checkbox

2008-10-23 Thread Krzysztof Jelski
Try:


formTester.setValue(getCheckboxPath(), on);

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



Re: ListView broken?

2008-10-23 Thread James Carman
So, what does it print when you print out the class name?

On Thu, Oct 23, 2008 at 6:24 AM, pieter claassen [EMAIL PROTECTED] wrote:
 Ok, I might be doing something thats not ok but . there are not two
 ListViews on this page (there are 3 forms? Is this a problem?)
 ClassCastException is throw at System.out.println()


 package com.musmato.wicket.pages.templates;

 import java.util.Arrays;

 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.RequiredTextField;
 import org.apache.wicket.markup.html.form.TextArea;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.model.CompoundPropertyModel;

 import com.musmato.model.QuestionAndAnswer;
 import com.musmato.model.Role;
 import com.musmato.model.Template;
 import com.musmato.model.WebControlType;
 import com.musmato.wicket.model.QuestionAndAnswerWebModel;
 import com.musmato.wicket.model.TemplateWebModel;
 import com.musmato.wicket.pages.AuthPage;
 import com.musmato.wicket.util.WicketApplication;

 public class TemplateEditPage extends AuthPage {

public TemplateEditPage(TemplateWebModel templatemodel) {

add(new TemplateEditForm(templateeditform, templatemodel));
add(new QuestionAddForm(questionaddform, templatemodel));
add(new QuestionEditForm(questioneditform, templatemodel));
}

@Override
public Role[] getAllowedRoles() {
// TODO Auto-generated method stub
return null;
}

private class TemplateEditForm extends Form {
private final Template template;

public TemplateEditForm(String id, TemplateWebModel
 templatemodel) {
super(id);
template = (Template) templatemodel.getObject();
setModel(new CompoundPropertyModel(templatemodel));
add(new RequiredTextField(name));
add(new RequiredTextField(version));
add(new TextArea(description));
}

@Override
public void onSubmit() {

  WicketApplication.get().getTemplateFactory().store(template);
setResponsePage(new TemplateEditPage(new
 TemplateWebModel(template)));
}
}

private class QuestionAddForm extends Form {
private final Template template;

public QuestionAddForm(String id, TemplateWebModel
 templatemodel) {
super(id);
template = (Template) templatemodel.getObject();
setModel(new CompoundPropertyModel(new
 QuestionAndAnswerWebModel(
(Long) null)));
add(new RequiredTextField(question));
add(new DropDownChoice(type,
 Arrays.asList(WebControlType
.values(;
}

@Override
public void onSubmit() {
QuestionAndAnswer qanda = (QuestionAndAnswer)
 getModel()
.getObject();

template.addQuestion(qanda);

  WicketApplication.get().getTemplateFactory().store(template);
setResponsePage(new TemplateEditPage(new
 TemplateWebModel(template)));
}
}

private class QuestionEditForm extends Form {
private Template template;

public QuestionEditForm(String id, TemplateWebModel
 templatemodel) {
super(id);
template = (Template) templatemodel.getObject();
ListView questionlist = new ListView(questions,
 template
.getQuestions()) {
@Override
protected void populateItem(ListItem item) {
System.out.println(+++
+
 item.getModelObject().getClass().getName());
final QuestionAndAnswer qanda =
 (QuestionAndAnswer) item
.getModelObject();
setModel(new
 CompoundPropertyModel(qanda));
item.add(new
 RequiredTextField(question));
item.add(new DropDownChoice(type,
 Arrays

  .asList(WebControlType.values(;
item.add(new Link(delete) {
@Override

Re: ListView broken?

2008-10-23 Thread Serkan Camurcuoglu

I suspect there may be a strange interaction with compound property models,
since the name of your listview is questions and you also have a
getQuestions() method in your upper level model object.. I'm just guessing
but can you try to change the name of your listview to questionList
instead of questions and try again..

by the way are you sure that you've rebuilt and redeployed your
application..
-- 
View this message in context: 
http://www.nabble.com/ListView-broken--tp20126952p20128604.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]



Applet Wicket communication

2008-10-23 Thread Iqbal Akhtar
Hi everyone, 

I need help regarding applet to wicket communication. Any help, code, pointer 
will be appreciated.

Thanks and Regards,
Iqbal

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

Re: Applet Wicket communication

2008-10-23 Thread Francis De Brabandere
Just use an plain servlet, and talk to it using http + add the
WicketSessionFilter in front of it so you can interact with the wicket
session

http://www.wicket-framework.org/apidocs/wicket/protocol/http/servlet/WicketSessionFilter.html

On Thu, Oct 23, 2008 at 1:21 PM, Iqbal Akhtar [EMAIL PROTECTED] wrote:
 Hi everyone,

 I need help regarding applet to wicket communication. Any help, code, pointer 
 will be appreciated.

 Thanks and Regards,
 Iqbal

 _
 Explore the seven wonders of the world
 http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

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



Re: Wicket and Ext JS integration

2008-10-23 Thread Richard Allen
The licensing is a pain. We started using ExtJS when it was LGPL, then they
switched to GPL. By then we were already invested, so we bought a commercial
license -- kind of feel like we got suckered into that one. If I had a
chance to do it again I would just use YUI. We use ExtJS on top of YUI.
However, ExtJS is a good product, even though they made a poor licensing
decision.

The licensing problem is just a fact that we have to deal with now, so I'm
trying to find out what the easiest path is for integrating ExtJS 2.2 with
Wicket. If someone else has already done the effort or started the effort,
then that would help. The amount of work involved in integrating ExtJS 2.2
with Wicket is part of our new web framework evaluation criteria.

Thanks,
Richard Allen

On Wed, Oct 22, 2008 at 2:05 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 I thought there were a licensing issue! Could'nt just remember if it were
 the guy doing the wicket contrib or ext js..

 Martijn Dashorst wrote:

 The GPL licensing of ExtJS is really a brain damage inflicting mess.
 Personally I would stay very far away from JS libraries that are GPL
 licensed (it is not clear how the viral aspect infects your server
 side code, possibly requiring you to ship your server side code to
 your users—you *are* distributing the GPL licensed code, which is
 linked to your product)

 Martijn




 --
 -Wicket for love

 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: Wicket and Ext JS integration

2008-10-23 Thread Paolo Di Tommaso
I could be interested to share experience about that, but now I'm really in
early stage so I think it would be too early to share the code.


Anyway the main idea is to use the Wicket behaviour feature to attach an
Ext component to the associated Wicket component.

This is the easiest part. More complex integration like Data Store could be
always done using a Wicket ajax behavior.

But I' haven't yet tryed to integrate more complex stuff like editable
grids, groups and so on . .


Paolo




On Thu, Oct 23, 2008 at 1:41 PM, Richard Allen [EMAIL PROTECTED]wrote:

 The licensing is a pain. We started using ExtJS when it was LGPL, then they
 switched to GPL. By then we were already invested, so we bought a
 commercial
 license -- kind of feel like we got suckered into that one. If I had a
 chance to do it again I would just use YUI. We use ExtJS on top of YUI.
 However, ExtJS is a good product, even though they made a poor licensing
 decision.

 The licensing problem is just a fact that we have to deal with now, so I'm
 trying to find out what the easiest path is for integrating ExtJS 2.2 with
 Wicket. If someone else has already done the effort or started the effort,
 then that would help. The amount of work involved in integrating ExtJS 2.2
 with Wicket is part of our new web framework evaluation criteria.

 Thanks,
 Richard Allen

 On Wed, Oct 22, 2008 at 2:05 PM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:

  I thought there were a licensing issue! Could'nt just remember if it were
  the guy doing the wicket contrib or ext js..
 
  Martijn Dashorst wrote:
 
  The GPL licensing of ExtJS is really a brain damage inflicting mess.
  Personally I would stay very far away from JS libraries that are GPL
  licensed (it is not clear how the viral aspect infects your server
  side code, possibly requiring you to ship your server side code to
  your users—you *are* distributing the GPL licensed code, which is
  linked to your product)
 
  Martijn
 
 
 
 
  --
  -Wicket for love
 
  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: have anyone tried empire-DB?

2008-10-23 Thread dtoffe

Wayne:

If you come from a stored procedure heavy usage background and still
need to use them, perhaps you can take a look at JPersist. We define two
classes for each SP, one is a pojo that reflects the resultset columns (of
course this assumes no SP will return different columns in different
invocations) and the other is a wrapper for the query or execute operation,
and we do this with a code generator which grabs all the metadata from the
database. No XML, no mappings, nothing !
Of course it all depends on your needs, we had a lot of legacy DBs and
the SP issue was an important one. If you are starting a new project,
perhaps the decision criteria would be different.
Feels free to contact me if you need some samples.

Hope this helps,

Daniel



Wayne Pope wrote:
 
 
 However my original quesiton still stands - any other db frameworks that
 anyone recommends?
 
 

-- 
View this message in context: 
http://www.nabble.com/have-anyone-tried-empire-DB--tp20016534p20129739.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: Wicket and Ext JS integration

2008-10-23 Thread Richard Allen
Paolo,

Is this an open source effort? What version of ExtJS are you using?

If we were to choose to go with Wicket, we would be willing to contribute.

Thanks,
Richard Allen

On Wed, Oct 22, 2008 at 10:20 AM, Paolo Di Tommaso 
[EMAIL PROTECTED] wrote:

 I'm working on a wicket-ext integration project.

 Until now I've done just really simple stuff, like simple TextField,
 DateField, TimeField, ComboBox, AutoComplete field and basic (static) grid
 elements.

 Though my implementation is trivial I would say that is really promising
 and
 I've not found any evident obstacle to a more complete integration.


 Paolo

 On Wed, Oct 22, 2008 at 1:53 PM, Richard Allen [EMAIL PROTECTED]
 wrote:

  We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and we
 are
  considering migrating to Wicket. I have seen on the mail archive that
 some
  people have integrated Wicket and Ext JS with mixed success. In
 particular,
  I found the wicket-tools-extjs project,
  http://www.wickettools.org/index.php/extjs-integrationm, which is
 version
  0.1.0, published in February 2008.
 
  Is the wicket-tools-extjs project in active development or was that
 project
  abandoned? Is there any other significant work undergoing to integrate
  Wicket and Ext JS?
 
  Thanks,
  Richard Allen
 



Re: ListView broken?

2008-10-23 Thread Jeremy Thomerson
Johan nailed it... here are your bad lines:

   System.out.println(
item.getModelObject().getClass().getName());
   final QuestionAndAnswer qanda = (QuestionAndAnswer)
item.getModelObject();
   setModel(new CompoundPropertyModel(qanda));

That should just be changed to:

   item.setModel(new CompoundPropertyModel(item.getModel());

if that's what you want.

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Thu, Oct 23, 2008 at 6:13 AM, Johan Compagner [EMAIL PROTECTED]wrote:

 What are you doing there?
 You get a model object from the listitem
 And then you are calling setmodel(compound) on the listview itself?
 Why is that then you are changing the model of the listview inside the
 loop that it goes over them creating listitems!

 On 10/23/08, pieter claassen [EMAIL PROTECTED] wrote:
  I am getting a classcast exception in ListView that is stumping me.
 
  This is the error message (top few lines)
 
  WicketMessage: Error attaching this container for rendering:
  [MarkupContainer [Component id = questioneditform]]
 
  Root cause:
 
  java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
  at
  org
  .apache
  .wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
  at org.apache.wicket.Component.getModelObject(Component.java:1558)
  at com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm
  $1.populateItem(TemplateEditPage.java:93)
 
 
  This is the code that generates my ListItems:
 
ListView questions = new ListView(questions,
 template
.getQuestions()) {
 
 
@Override
protected void populateItem(ListItem item)
 {
final QuestionAndAnswer qanda =
 (QuestionAndAnswer) item
.getModelObject();
setModel(new
 CompoundPropertyModel(qanda));
 
 
 
  I know for a fact that template.getQuestions() produces an ArrayList.
 
  The arraylist works when there is only 1 item in it but when I have
  more than 1 item, it fails with the ClassCastException. Is this a
  wicket problem or am I doing something wrong?
 
  Regards,
  Pieter
  pieter claassen
  [EMAIL PROTECTED]
 
 
 
 
  -
  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]




RadioGroup set selection from database results

2008-10-23 Thread rossdevereux

Hi,

From a database I am retrieving two columns, the label for the radio and a
boolean value to say whether or not it should be selected. I have written
the code below to get the values from the database, the ObjectSelect class
contains the object (in this case the string label) and selected which is a
boolean value. When the page loads the none of the radio choices are
selected. 

Is it possible to set the default value in this way, if not how can it be
done?

-CODE
//Add query type radio group
queryTypes = new LoadableDetachableModel() {
@Override
protected Object load() {

QueryTypeWrapper.setObjects(queryDefDao.getQueryType(queryDefId));
return QueryTypeWrapper.getObjects();
}
};
   
//Generate list of groups with checkboxes
final RadioGroup radioGroup = new RadioGroup(radioGroup, queryTypes);
f.add(radioGroup);
ListView radioList = new ListView(queryTypes, queryTypes)
{
protected void populateItem(ListItem item)
{
ObjectSelect os = (ObjectSelect) item.getModelObject();
item.setModel(new CompoundPropertyModel(os));
item.add(new Radio(selected));
item.add(new Label(object));
}

};
radioGroup.add(radioList);
-CODE

Thanks in advanced
Ross
-- 
View this message in context: 
http://www.nabble.com/RadioGroup-set-selection-from-database-results-tp20130427p20130427.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: how to unittest a checkbox

2008-10-23 Thread Minto van der Sluis

Thx that did the trick :-)

For those who that come after me

formTester.setValue( getCheckboxPath(), on ); // check
formTester.setValue( getCheckboxPath(), off ); // uncheck

regards,

Minto

-- 
View this message in context: 
http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20130698.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: how to unittest a checkbox

2008-10-23 Thread James Carman
Since this is not so obvious, we should probably file a request in
JIRA to add a checkbox-specific method to FormTester.  Care to take
care of that, since you found the issue?

On Thu, Oct 23, 2008 at 9:15 AM, Minto van der Sluis
[EMAIL PROTECTED] wrote:

 Thx that did the trick :-)

 For those who that come after me

 formTester.setValue( getCheckboxPath(), on ); // check
 formTester.setValue( getCheckboxPath(), off ); // uncheck

 regards,

 Minto

 --
 View this message in context: 
 http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20130698.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: Possible bug in FormComponent$MessageSource regarding resource string lookups

2008-10-23 Thread Christian Oldiges

Done: WICKET-1888


igor.vaynberg wrote:
 
 request for enhancement. add it to our jria.
 
 -igor
 
 

-- 
View this message in context: 
http://www.nabble.com/Possible-bug-in-FormComponent%24MessageSource-regarding-resource-string-lookups-tp19951394p20130775.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: How to pass parameters to a BreadCrumbPanel

2008-10-23 Thread Nav Che
Hello Wayne,

Thanks for your advise, i shall try it out... I was actually planning to
write my own breadcrumbs for pages instead of panels. Not sure how
successful i would be :)

Thanks again

//Naveen

On Thu, Oct 23, 2008 at 1:53 AM, Wayne Pope 
[EMAIL PROTECTED] wrote:

 Hi Naveen,

 I do it something like this:

TabbedPanel tabbedPanel = new TabbedPanel(tabs, tabs){
@Override
protected WebMarkupContainer newLink(String linkId, final int
 index) {
PageParameters parameters = new PageParameters();
parameters.put(selected, ((ITab) getTabs().get(index))
.getTitle().getObject());
parameters.put(somethingIneedID, somethingIneedID);
return new BookmarkablePageLink(linkId, MyPage.class,
parameters);
}

};
if (found)
tabbedPanel.setSelectedTab(selected);

if (tabSelect != null)
tabbedPanel.setSelectedTab(tabSelect);
add(tabbedPanel);

 you should be able to figue it out from there.
 Wayne


 On Tue, Oct 21, 2008 at 9:06 PM, Nav Che [EMAIL PROTECTED] wrote:

  Hello All,
 
  How do i pass parameters between panels. Basically i have panels in my
  appilcation which use breadcrumb model.
 
  Say on panel A i display list of users and I want the user Id to be a
 link
  upon clickin it should show the edit panel ( panel B )  of user and for
  which it shld either pass user object or userid.
 
  Please advise.
 
  Thanks in advance
 
  Regards
  naveen
 



Re: Wicket and Ext JS integration

2008-10-23 Thread Paolo Di Tommaso
Yes, I'm working for a no-profit organization and it could be an interesting
option to release it as an OSS.

Do you have any suggestion where the project could be hosted?  Google code?
and any idea about the licence?


Thank you, Paolo


On Thu, Oct 23, 2008 at 2:19 PM, Richard Allen [EMAIL PROTECTED]wrote:

 Paolo,

 Is this an open source effort? What version of ExtJS are you using?

 If we were to choose to go with Wicket, we would be willing to contribute.

 Thanks,
 Richard Allen

 On Wed, Oct 22, 2008 at 10:20 AM, Paolo Di Tommaso 
 [EMAIL PROTECTED] wrote:

  I'm working on a wicket-ext integration project.
 
  Until now I've done just really simple stuff, like simple TextField,
  DateField, TimeField, ComboBox, AutoComplete field and basic (static)
 grid
  elements.
 
  Though my implementation is trivial I would say that is really promising
  and
  I've not found any evident obstacle to a more complete integration.
 
 
  Paolo
 
  On Wed, Oct 22, 2008 at 1:53 PM, Richard Allen 
 [EMAIL PROTECTED]
  wrote:
 
   We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and we
  are
   considering migrating to Wicket. I have seen on the mail archive that
  some
   people have integrated Wicket and Ext JS with mixed success. In
  particular,
   I found the wicket-tools-extjs project,
   http://www.wickettools.org/index.php/extjs-integrationm, which is
  version
   0.1.0, published in February 2008.
  
   Is the wicket-tools-extjs project in active development or was that
  project
   abandoned? Is there any other significant work undergoing to integrate
   Wicket and Ext JS?
  
   Thanks,
   Richard Allen
  
 



few (not only) AutoCompleteTextField questions

2008-10-23 Thread dlipski

Hi,

First, problem description:
Recently I was asked to change DropDownChoice field into
AutoCompleteTextField. 
Everything was ok untill I noticed that old DropDownChoice field has
attached OnChangeAjaxBehavior.
Ofcourse what works well with DropDownChoice doesnt work as I want with
AutoCompleteTextField. 
The problem is that I want to update a model after user selects one of
choices(from autocomplete) not after any change of text field. 
I found getOnSelectJavascriptExpression method in
AbstractAutoCompleteRenderer (since Wicket 1.4 ?) and I thought that it
would be a good place to call some JS to update text field model.
I looked at
http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html to see
how to call server side Wicket code from JavaScript. 
Next I had the idea to attach to text field
AjaxFormComponentUpdatingBehavior and call its getCallbackUrl() from
JavaScript returned from mentioned earlier
getOnSelectJavascriptExpression().
The problem is that AjaxFormComponentUpdatingBehavior expects event name in
constructor  - in this case I dont need any onXXX event because I will call
its getCallbackUrl() directly from JS.

Now few questions:
1)How to update (via Ajax) model of some FormComponents from JavaScript? Do
I have to attach AjaxFormComponentUpdatingBehavior to some dummy event and
call its getCallbackUrl() directly in JavaScript ? If so, its kind of
hacking for me and AjaxFormComponentUpdatingBehavior should provide
no-argument constructor.

2)Does JavaScript returned from getOnSelectJavascriptExpression is called
after corresponding TextField value has been set ?

3)At Wicket wiki I found description how to work with AutoCompleteTextField
and Models:
http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html
I dont understand why this problem is not solved by subclassing directly
form AutoCompleteTextField and overriding getConverter and provide some
custom converter ?

Ps. My colegue told me to attach AjaxFormComponentUpdatingBehavior to onBlur
event, maybe this is the solution ? (but still, for me better place to
update a model is in Javasript from getOnSelectJavascriptExpression() than
in onblur event handler...)

Best regards
Daniel
-- 
View this message in context: 
http://www.nabble.com/few-%28not-only%29-AutoCompleteTextField-questions-tp20131044p20131044.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: ListView broken?

2008-10-23 Thread pieter claassen

Guys, thanks for all your feedback. You were right.

Cheers,
Pieter

On Oct 23, 2008, at 2:44 PM, Jeremy Thomerson wrote:


Johan nailed it... here are your bad lines:

  System.out.println(
item.getModelObject().getClass().getName());
  final QuestionAndAnswer qanda = (QuestionAndAnswer)
item.getModelObject();
  setModel(new CompoundPropertyModel(qanda));

That should just be changed to:

  item.setModel(new CompoundPropertyModel(item.getModel());

if that's what you want.

--  
Jeremy Thomerson

http://www.wickettraining.com

On Thu, Oct 23, 2008 at 6:13 AM, Johan Compagner  
[EMAIL PROTECTED]wrote:



What are you doing there?
You get a model object from the listitem
And then you are calling setmodel(compound) on the listview itself?
Why is that then you are changing the model of the listview inside  
the

loop that it goes over them creating listitems!

On 10/23/08, pieter claassen [EMAIL PROTECTED] wrote:

I am getting a classcast exception in ListView that is stumping me.

This is the error message (top few lines)

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = questioneditform]]

Root cause:

java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
at
org
.apache
.wicket 
.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)

at org.apache.wicket.Component.getModelObject(Component.java:1558)
at com.musmato.wicket.pages.templates.TemplateEditPage 
$QuestionEditForm

$1.populateItem(TemplateEditPage.java:93)


This is the code that generates my ListItems:

 ListView questions = new ListView(questions,

template

 .getQuestions()) {


 @Override
 protected void populateItem(ListItem  
item)

{

 final QuestionAndAnswer qanda =

(QuestionAndAnswer) item
 .getModelObject 
();

 setModel(new

CompoundPropertyModel(qanda));




I know for a fact that template.getQuestions() produces an  
ArrayList.


The arraylist works when there is only 1 item in it but when I have
more than 1 item, it fails with the ClassCastException. Is this a
wicket problem or am I doing something wrong?

Regards,
Pieter
pieter claassen
[EMAIL PROTECTED]




-
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]




pieter claassen
[EMAIL PROTECTED]




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



Problems with wicket-autocomplete.js

2008-10-23 Thread Benjamin Ernst
Hi,

I have two Problems with the AutoCompleteBehavior in wicket:

1. Type-Conflict in line 287 of wicket-autocomplete.js:

 function showAutoComplete(){
var position=getPosition(wicketGet(elementId));
var container = getAutocompleteContainer();
var input=wicketGet(elementId);
var index=getOffsetParentZIndex(elementId);
container.show();
* --
container.style.zIndex=(!isNaN(Number(index))?Number(index)+1:index);*
container.style.left=position[0]+'px'
container.style.top=(input.offsetHeight+position[1])+'px';
if(cfg.adjustInputWidth)
  container.style.width=input.offsetWidth+'px';
visible=1;
hideShowCovered();
}

I believe this was introduced with wicket 1.3.5. In version 1.3.4 this line
was:


container.style.zIndex=(Number(index)!=Number.NaN?Number(index)+1:index);

2. No Object in line 77:

function initialize(){
// Remove the autocompletion menu if still present from
// a previous call. This is required to properly register
// the mouse event handler again (using the new stateful
'mouseactive'
// variable which just gets created)
var choiceDiv=document.getElementById(getMenuId());
if (choiceDiv != null) {

choiceDiv.parentNode.parentNode.removeChild(choiceDiv.parentNode);
}

var obj=wicketGet(elementId);

   --  *objonkeydown=obj.onkeydown;*
objonblur=obj.onblur;
objonkeyup=obj.onkeyup;
objonkeypress=obj.onkeypress;

This causes that the autocomplete-List is not shown. But after replacing the
autocompleteField with Ajax it works. I think that initJS, wich is called
onDomReady (see below), is called to early?

This is the AbstractAutoCompleteBehavior.java:
public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
response.renderJavascriptReference(AUTOCOMPLETE_JS);
final String id = getComponent().getMarkupId();
String initJS = constructInitJS();
response.renderOnDomReadyJavascript(initJS);
}

I use IE6 and the page with the AutocompleteField is quite big.

Has anyone an idea how to get around this?

Regards,
Benjamin


Re: ListView broken?

2008-10-23 Thread James Carman
How about just use PropertyListView?

On Thu, Oct 23, 2008 at 9:39 AM, pieter claassen [EMAIL PROTECTED] wrote:
 Guys, thanks for all your feedback. You were right.

 Cheers,
 Pieter

 On Oct 23, 2008, at 2:44 PM, Jeremy Thomerson wrote:

 Johan nailed it... here are your bad lines:

  System.out.println(
 item.getModelObject().getClass().getName());
  final QuestionAndAnswer qanda = (QuestionAndAnswer)
 item.getModelObject();
  setModel(new CompoundPropertyModel(qanda));

 That should just be changed to:

  item.setModel(new CompoundPropertyModel(item.getModel());

 if that's what you want.

 -- Jeremy Thomerson
 http://www.wickettraining.com

 On Thu, Oct 23, 2008 at 6:13 AM, Johan Compagner
 [EMAIL PROTECTED]wrote:

 What are you doing there?
 You get a model object from the listitem
 And then you are calling setmodel(compound) on the listview itself?
 Why is that then you are changing the model of the listview inside the
 loop that it goes over them creating listitems!

 On 10/23/08, pieter claassen [EMAIL PROTECTED] wrote:

 I am getting a classcast exception in ListView that is stumping me.

 This is the error message (top few lines)

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = questioneditform]]

 Root cause:

 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at
 org
 .apache
 .wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm
 $1.populateItem(TemplateEditPage.java:93)


 This is the code that generates my ListItems:

 ListView questions = new ListView(questions,

 template

 .getQuestions()) {


 @Override
 protected void populateItem(ListItem item)

 {

 final QuestionAndAnswer qanda =

 (QuestionAndAnswer) item

 .getModelObject();
 setModel(new

 CompoundPropertyModel(qanda));



 I know for a fact that template.getQuestions() produces an ArrayList.

 The arraylist works when there is only 1 item in it but when I have
 more than 1 item, it fails with the ClassCastException. Is this a
 wicket problem or am I doing something wrong?

 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]




 -
 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]



 pieter claassen
 [EMAIL PROTECTED]




 -
 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]



AjaxFallbackButton: inconsistend submit order

2008-10-23 Thread Stefan Fußenegger

Hi folks,

I just stumbled upon a problem with a Form containing a nested Form and two
AjaxFallbackButtons (submit and preview). I need to implement different
onSubmit() behavior of the nested Form depending on the clicked button.

The order of onSubmit() calls is:

without JS:
- AjaxFallbackButton.onSubmit(AjaxRequestTarget,Form)
- OuterForm.onSubmit() // not used
- Inner Form.onSubmit()

with JS:
- Inner Form.onSubmit()
- OuterForm.onSubmit() // not used
- AjaxFallbackButton.onSubmit(AjaxRequestTarget,Form)

With JS, it is therefore not possible to determine which button was clicked
from inside a form's onSubmit() method.

Is this a (known) bug?

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackButton%3A-inconsistend-submit-order-tp20131329p20131329.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: Static injection not working (wicket-guice)

2008-10-23 Thread Igor Vaynberg
why dont you debug it yourself and see what the problem is. see how
the thing actually works and you might find a solution. i dont use
guice so i wont be of much help.

-igor

On Thu, Oct 23, 2008 at 3:30 AM, Edgar Merino [EMAIL PROTECTED] wrote:
 This one seems to have no answer, I've tried googling and everything stopped
 just here, were I started, I hope someone could provide a solution
 (different than using salve).

 Edgar Merino




 Edgar Merino escribió:

 Anyone for this?


 Edgar Merino escribió:

 Hello,

   I've been trying to inject a service to some classes that are not
 wicket components, I've asked here and was suggested to use static
 injection: InjectorHolder.getInjector().inject(this); however this is not
 working with guice, I always get an illegalstateexception, injectorholder
 has not been assigned an injector. I've tried ((GuiceInjectorHolder)
 (RequestCycle.get().getApplication().getMetaData(GuiceInjectorHolder.INJECTOR_KEY))).getInjector().injectMembers(this);
 however that gives me serialization problems, since wicket is not creating a
 proxy for my service. I'm on my way to give salve a try but I'm having some
 problems there too (waiting for a response from the Discussion group), what
 suggestions can you make?

 Thanks in advance,
 Edgar Merino





 -
 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: Wicket and Ext JS integration

2008-10-23 Thread Richard Allen
Paolo,

I think wicket-stuff (
http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki) would be the place
to put the code. I would recommend the license be the Apache License,
version 2.0. As I understand, that is OK with GPL, version 3 (
http://www.gnu.org/licenses/gpl-faq.html#GPLModuleLicense), which is the
license used by ExtJS version 2.1 and up.

-Richard

On Thu, Oct 23, 2008 at 9:29 AM, Paolo Di Tommaso [EMAIL PROTECTED]
 wrote:

 Yes, I'm working for a no-profit organization and it could be an
 interesting
 option to release it as an OSS.

 Do you have any suggestion where the project could be hosted?  Google code?
 and any idea about the licence?


 Thank you, Paolo


 On Thu, Oct 23, 2008 at 2:19 PM, Richard Allen [EMAIL PROTECTED]
 wrote:

  Paolo,
 
  Is this an open source effort? What version of ExtJS are you using?
 
  If we were to choose to go with Wicket, we would be willing to
 contribute.
 
  Thanks,
  Richard Allen
 
  On Wed, Oct 22, 2008 at 10:20 AM, Paolo Di Tommaso 
  [EMAIL PROTECTED] wrote:
 
   I'm working on a wicket-ext integration project.
  
   Until now I've done just really simple stuff, like simple TextField,
   DateField, TimeField, ComboBox, AutoComplete field and basic (static)
  grid
   elements.
  
   Though my implementation is trivial I would say that is really
 promising
   and
   I've not found any evident obstacle to a more complete integration.
  
  
   Paolo
  
   On Wed, Oct 22, 2008 at 1:53 PM, Richard Allen 
  [EMAIL PROTECTED]
   wrote:
  
We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and
 we
   are
considering migrating to Wicket. I have seen on the mail archive that
   some
people have integrated Wicket and Ext JS with mixed success. In
   particular,
I found the wicket-tools-extjs project,
http://www.wickettools.org/index.php/extjs-integrationm, which is
   version
0.1.0, published in February 2008.
   
Is the wicket-tools-extjs project in active development or was that
   project
abandoned? Is there any other significant work undergoing to
 integrate
Wicket and Ext JS?
   
Thanks,
Richard Allen
   
  
 



GridView adding item after calling populate item

2008-10-23 Thread Job de Noo
Hi all,

i hava a question about the behaviour of GridView.
GridView calls the populateItem before adding the item to the rowview.
So all components i add to the gridview don't have the page reference
yet.

Is this meant to be like this?

Because it is giving me errors while adding ajax links and getting
their url. Error message i get is: No Page found for component

Job de Noo

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



Re: GridView adding item after calling populate item

2008-10-23 Thread Igor Vaynberg
you should not depend on the page being set in the constructor of your
components.

-igor

On Thu, Oct 23, 2008 at 9:08 AM, Job de Noo [EMAIL PROTECTED] wrote:
 Hi all,

 i hava a question about the behaviour of GridView.
 GridView calls the populateItem before adding the item to the rowview.
 So all components i add to the gridview don't have the page reference
 yet.

 Is this meant to be like this?

 Because it is giving me errors while adding ajax links and getting
 their url. Error message i get is: No Page found for component

 Job de Noo

 -
 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]



Override panel markup

2008-10-23 Thread Adriano dos Santos Fernandes

Hi!

I would want to override a panel markup, for instance, I want to add a 
SignInPanel to my page but don't want to use builtin SignInPanel.html.


Is there a way to do it, preferable without creating a specific html 
file for the new component, i.e., I want to override the content direct 
on the page if possible?


Thanks.


Adriano


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



listview produce duplicate value.

2008-10-23 Thread overseastars

Hi

My listview is printing duplicate valueswhy??

I found that my get method is working well. just printing result is
incorrect??? is it a bug??
-- 
View this message in context: 
http://www.nabble.com/listview-produce-duplicate-value.-tp20136280p20136280.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: Override panel markup

2008-10-23 Thread rpaul

Not sure this would work. I have not tried it.

Extend SignInPanel with subclass e.g. MySignInPanel and then create your
matching MySignInPanel.html with the custom content. 

Then use MySignInPanel instead of SignInPanel.

-- 
View this message in context: 
http://www.nabble.com/Override-panel-markup-tp20135458p20136407.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: listview produce duplicate value.

2008-10-23 Thread Igor Vaynberg
which get method are you referring to?? are you using ajax??

-igor

On Thu, Oct 23, 2008 at 10:51 AM, overseastars [EMAIL PROTECTED] wrote:

 Hi

 My listview is printing duplicate valueswhy??

 I found that my get method is working well. just printing result is
 incorrect??? is it a bug??
 --
 View this message in context: 
 http://www.nabble.com/listview-produce-duplicate-value.-tp20136280p20136280.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: Override panel markup

2008-10-23 Thread Igor Vaynberg
that will work.

-igor

On Thu, Oct 23, 2008 at 10:58 AM, rpaul [EMAIL PROTECTED] wrote:

 Not sure this would work. I have not tried it.

 Extend SignInPanel with subclass e.g. MySignInPanel and then create your
 matching MySignInPanel.html with the custom content.

 Then use MySignInPanel instead of SignInPanel.

 --
 View this message in context: 
 http://www.nabble.com/Override-panel-markup-tp20135458p20136407.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: Override panel markup

2008-10-23 Thread Martin Voigt
2008/10/23 rpaul [EMAIL PROTECTED]:

 Not sure this would work. I have not tried it.

 Extend SignInPanel with subclass e.g. MySignInPanel and then create your
 matching MySignInPanel.html with the custom content.

 Then use MySignInPanel instead of SignInPanel.
just to clear things up, this not only will work but is imho the best
practice for custom markup. it also makes clear that you are using
customized markup and where to find it by just reading the java code.


 --
 View this message in context: 
 http://www.nabble.com/Override-panel-markup-tp20135458p20136407.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: have anyone tried empire-DB?

2008-10-23 Thread Nino Saturnino Martinez Vazquez Wael

Hi Wayne

Im still in reflection mode about Hibernate, Im still a little annoyed 
about some stuff but I believe its because I do not know enough. And yes 
hibernates error reporting is not good by a long shot. If i get stuck 
with hibernate I switch to OpenJPA and get a nicer error message fix it 
and switch back to hibernate...


For now I would say stick with hibernate, and buy the book called

http://www.amazon.com/Java-Persistence-Hibernate-Christian-Bauer/dp/1932394885

I havent really looked enough into openjpa etc to say anything about 
these and performance etc...


Wayne Pope wrote:

Nino what do you recommend in terms orf DB framework. We're currently using
Hibernate and I'm personally finding it a pain - it seems to influence the
java code way too much and it create some horrible joins if we're not
carefull. Any suggestions that you've used in the real world?

On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

This is interesting:

(JaQu) Provide API level compatibility with JPA (so that JaQu can be used
as an extension of JPA).

But I think something similar are on its way for JPA 2.0..?


marco.behler wrote:



I gave empireDB a quick look a while ago and it looks interesting. Besides
JPersist I also stumbled upon JaQu
(http://www.h2database.com/html/jaqu.html), which is still in its
infancy.
I'm sure there's more LINQ-like clones out there.

As far as I'm concerned, I'd really like to have a thorough look at stuff
like db4o or couchDB, especially performance wise. I did Hibernate/iBatis
in
the past and am currently working on a project with iBatis again. Both
have
advantages and disadvantages and I don't love either. I would rather not
have to care about tables, objects,the mighty mismatch (and in Hibernate's
case the mighty session) anymore, but just shove that damn thing into an
object database ;)

*hides from enraged DBAs and their optimised queries*



Nino.Martinez wrote:


  

Yeah seems to be nice...

At WUG DK we discussed. That if using stuff like hibernate, for simple
cruds it's nice but if you have a complex object graph it becomes very
troublesome to use (if you use cascade all etc.)..

Ames, Tim wrote:




Looks like it has a lot in common with JPersist.  That is what I have
been using. No XML, all POJO.

-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2008 11:28 AM
To: users@wicket.apache.org
Subject: have anyone tried empire-DB?

So have you tried it with wicket?

http://incubator.apache.org/empire-db/

--
-Wicket for love

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]

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_
_

EMAIL CONFIDENTIALITY NOTICE
This Email message, and any attachments, may contain confidential
patient health information that is legally protected. This information is
intended only for the use of the individual or entity named above. The
authorized recipient of this information is prohibited from
disclosing this information to any other party unless required to do so
by law or regulation and is required to destroy the information after its
stated need has been fulfilled. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or action
taken in reliance on the contents of this message is strictly prohibited.
If you have received this information in error, please notify the sender
immediately by replying to this message and delete the message from your
system.


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



  

--
-Wicket for love

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]








  

--
-Wicket for love

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]





  


--
-Wicket for love

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: Page Markup Inheritance Problem...

2008-10-23 Thread Igor Vaynberg
just like in object inheritance your superpage would have to provide a
way to plug this extra component in...

-igor

On Thu, Oct 23, 2008 at 1:30 PM, James Carman
[EMAIL PROTECTED] wrote:
 Suppose I have this page hierarchy:

 BasePage - SuperPage - SubPage.

 In BasePage.html, I've got wicket:child and in SuperPage.html I've
 got wicket:extend.  Now, in SubPage.html, I can't just override
 the markup of SuperPage.html by using a wicket:extend.  Suppose I
 wanted to just add in an extra component in SubPage.html and then
 override the markup for SuperPage with the markup for SubPage, but
 still allowing myself to extend from BasePage.  I can't do that!

 -
 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: Proposal: the browser as a desktop client

2008-10-23 Thread Johan Compagner
use GWT because thats the key difference between wicket and gwt

I only see some things like validators that could be precompiled not th
complete webapp and all your current page/panel/component/html code


On Wed, Oct 22, 2008 at 3:44 PM, cowwoc [EMAIL PROTECTED] wrote:


 Hi,

 I'd like to propose we leverage existing Java to Javascript compilers to
 improve Wicket on a couple of fronts. If you think of the web browser as a
 desktop client involved in a client-server architecture then it becomes
 obvious that Wicket is currently asking the server to handle a lot of logic
 on behalf of the client. It does this because it's easier to develop in
 Java
 than in Javascript. In an ideal world, the server should only see HTML
 forms
 in two states:

 - their initial state (sent to the client)
 - their submitted state (merged into the database)

 The client would be able to communicate with web services in between to
 update the client-side state but most applications won't even need this.
 The
 vast majority of form manipulation (adding rows, data validation) can be
 handled completely on the client-end.

 I foresee the following benefits:

 - Vastly simplified logic: A lot of resources have been spent building the
 HTML parser and classes related to server-side form manipulation. All these
 are built in for free in JS. For example, interacting with HTML elements
 and
 IDs is far easier than in Java code.
 - Improved responsiveness for end-users
 - Improved server scalability
 - Nice URLs, both for humans and for web crawlers. This would also open
 up
 the door for RESTful implementations.

 This would be different from GWT. You would benefit from the modularity of
 Wicket, coding HTML and CSS in their native languages. The only difference
 is that you'd now be manipulating dynamic forms on the client-end instead
 of
 the server-end.

 Let me know what you think.

 Gili
 --
 View this message in context:
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20111040.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: Proposal: the browser as a desktop client

2008-10-23 Thread Johan Compagner
because on the server the business logic runs
Its a complete different paradigm

if thinks that are now done in onclick() or onsubmit() would run on the
client
what would be possible then? Currently many people just call DAO's there
(spring stuff and so on)

johan


On Thu, Oct 23, 2008 at 11:40 PM, cowwoc [EMAIL PROTECTED] wrote:


 GWT generates business logic, HTML and CSS from Java code; as opposed to
 letting you bind business logic written in Java against normal HTML files.
 It doesn't have a clean separation of concerns like Wicket.

 Ask yourself this, why does the client rely on the server to do dynamic
 form
 manipulation on its behalf? Is it because the server really cares about the
 intermediate form states or is it because we don't want to write this logic
 in Javascript?

 Gili


 Johan Compagner wrote:
 
  use GWT because thats the key difference between wicket and gwt
 
  I only see some things like validators that could be precompiled not th
  complete webapp and all your current page/panel/component/html code
 
 
  On Wed, Oct 22, 2008 at 3:44 PM, cowwoc [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  I'd like to propose we leverage existing Java to Javascript compilers to
  improve Wicket on a couple of fronts. If you think of the web browser as
  a
  desktop client involved in a client-server architecture then it becomes
  obvious that Wicket is currently asking the server to handle a lot of
  logic
  on behalf of the client. It does this because it's easier to develop in
  Java
  than in Javascript. In an ideal world, the server should only see HTML
  forms
  in two states:
 
  - their initial state (sent to the client)
  - their submitted state (merged into the database)
 
  The client would be able to communicate with web services in between to
  update the client-side state but most applications won't even need this.
  The
  vast majority of form manipulation (adding rows, data validation) can be
  handled completely on the client-end.
 
  I foresee the following benefits:
 
  - Vastly simplified logic: A lot of resources have been spent building
  the
  HTML parser and classes related to server-side form manipulation. All
  these
  are built in for free in JS. For example, interacting with HTML elements
  and
  IDs is far easier than in Java code.
  - Improved responsiveness for end-users
  - Improved server scalability
  - Nice URLs, both for humans and for web crawlers. This would also
 open
  up
  the door for RESTful implementations.
 
  This would be different from GWT. You would benefit from the modularity
  of
  Wicket, coding HTML and CSS in their native languages. The only
  difference
  is that you'd now be manipulating dynamic forms on the client-end
 instead
  of
  the server-end.
 
  Let me know what you think.
 
  Gili
  --
  View this message in context:
 
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20111040.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]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20140090.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: Proposal: the browser as a desktop client

2008-10-23 Thread Igor Vaynberg
so write a prototype and present it to the community. we are all eyes.

-igor

On Thu, Oct 23, 2008 at 2:40 PM, cowwoc [EMAIL PROTECTED] wrote:

 GWT generates business logic, HTML and CSS from Java code; as opposed to
 letting you bind business logic written in Java against normal HTML files.
 It doesn't have a clean separation of concerns like Wicket.

 Ask yourself this, why does the client rely on the server to do dynamic form
 manipulation on its behalf? Is it because the server really cares about the
 intermediate form states or is it because we don't want to write this logic
 in Javascript?

 Gili


 Johan Compagner wrote:

 use GWT because thats the key difference between wicket and gwt

 I only see some things like validators that could be precompiled not th
 complete webapp and all your current page/panel/component/html code


 On Wed, Oct 22, 2008 at 3:44 PM, cowwoc [EMAIL PROTECTED] wrote:


 Hi,

 I'd like to propose we leverage existing Java to Javascript compilers to
 improve Wicket on a couple of fronts. If you think of the web browser as
 a
 desktop client involved in a client-server architecture then it becomes
 obvious that Wicket is currently asking the server to handle a lot of
 logic
 on behalf of the client. It does this because it's easier to develop in
 Java
 than in Javascript. In an ideal world, the server should only see HTML
 forms
 in two states:

 - their initial state (sent to the client)
 - their submitted state (merged into the database)

 The client would be able to communicate with web services in between to
 update the client-side state but most applications won't even need this.
 The
 vast majority of form manipulation (adding rows, data validation) can be
 handled completely on the client-end.

 I foresee the following benefits:

 - Vastly simplified logic: A lot of resources have been spent building
 the
 HTML parser and classes related to server-side form manipulation. All
 these
 are built in for free in JS. For example, interacting with HTML elements
 and
 IDs is far easier than in Java code.
 - Improved responsiveness for end-users
 - Improved server scalability
 - Nice URLs, both for humans and for web crawlers. This would also open
 up
 the door for RESTful implementations.

 This would be different from GWT. You would benefit from the modularity
 of
 Wicket, coding HTML and CSS in their native languages. The only
 difference
 is that you'd now be manipulating dynamic forms on the client-end instead
 of
 the server-end.

 Let me know what you think.

 Gili
 --
 View this message in context:
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20111040.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]





 --
 View this message in context: 
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20140090.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: Proposal: the browser as a desktop client

2008-10-23 Thread cowwoc

Johan,

I'm not saying you should move *everything* over to the client. I'm saying
that most form manipulation can take place without querying the database,
especially on a per-request basis. Adding rows and cell validation tend to
rely on at most one database lookup (during the initial request). Even if
you *do* need to query the database before carrying out some operation (I
dare say this is a minority situation) you can issue a web service call to
do just that. Wicket's current implementation assumes that by default form
manipulation should take place on the server. I am saying that by default it
should take place on the client. The same functionality is still possible,
it's just your default that changes. And as I mentioned, this approach has
many benefits besides performance.

Gili


Johan Compagner wrote:
 
 because on the server the business logic runs
 Its a complete different paradigm
 
 if thinks that are now done in onclick() or onsubmit() would run on the
 client
 what would be possible then? Currently many people just call DAO's there
 (spring stuff and so on)
 
 johan
 
 
 On Thu, Oct 23, 2008 at 11:40 PM, cowwoc [EMAIL PROTECTED] wrote:
 

 GWT generates business logic, HTML and CSS from Java code; as opposed to
 letting you bind business logic written in Java against normal HTML
 files.
 It doesn't have a clean separation of concerns like Wicket.

 Ask yourself this, why does the client rely on the server to do dynamic
 form
 manipulation on its behalf? Is it because the server really cares about
 the
 intermediate form states or is it because we don't want to write this
 logic
 in Javascript?

 Gili


 Johan Compagner wrote:
 
  use GWT because thats the key difference between wicket and gwt
 
  I only see some things like validators that could be precompiled not th
  complete webapp and all your current page/panel/component/html code
 
 
  On Wed, Oct 22, 2008 at 3:44 PM, cowwoc [EMAIL PROTECTED]
 wrote:
 
 
  Hi,
 
  I'd like to propose we leverage existing Java to Javascript compilers
 to
  improve Wicket on a couple of fronts. If you think of the web browser
 as
  a
  desktop client involved in a client-server architecture then it
 becomes
  obvious that Wicket is currently asking the server to handle a lot of
  logic
  on behalf of the client. It does this because it's easier to develop
 in
  Java
  than in Javascript. In an ideal world, the server should only see HTML
  forms
  in two states:
 
  - their initial state (sent to the client)
  - their submitted state (merged into the database)
 
  The client would be able to communicate with web services in between
 to
  update the client-side state but most applications won't even need
 this.
  The
  vast majority of form manipulation (adding rows, data validation) can
 be
  handled completely on the client-end.
 
  I foresee the following benefits:
 
  - Vastly simplified logic: A lot of resources have been spent building
  the
  HTML parser and classes related to server-side form manipulation. All
  these
  are built in for free in JS. For example, interacting with HTML
 elements
  and
  IDs is far easier than in Java code.
  - Improved responsiveness for end-users
  - Improved server scalability
  - Nice URLs, both for humans and for web crawlers. This would also
 open
  up
  the door for RESTful implementations.
 
  This would be different from GWT. You would benefit from the
 modularity
  of
  Wicket, coding HTML and CSS in their native languages. The only
  difference
  is that you'd now be manipulating dynamic forms on the client-end
 instead
  of
  the server-end.
 
  Let me know what you think.
 
  Gili
  --
  View this message in context:
 
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20111040.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]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20140090.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]


 
 

-- 
View this message in context: 
http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20140645.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: Trying to create a calendar - need some guidance

2008-10-23 Thread John Krasnay
ListView is good if you already have a list of things you want to
display. For this kind of iteration you'd be better off with a
RepeatingView. Here's how I might tackle it:

- create a top-level panel to hold the calendar. The markup would
  contain your table element, and would have a RepeatingView attached
  to a tr element

- create a panel representing the row, which has a RepeatingView
  attached to a td element.

- create a panel representing a day.

- put your loop in the ctor of the top-level panel. Start by creating a
  row panel and adding it to the first RepeatingView. Then for each day,
  create a day panel and add it to the repeating view in the row. When
  you get to the Saturday, just create a new row panel as the current
  one, add it to the first RepeatingView, and continue on your way.

Now for the cool part: you could put the part where you create the day
panel into an overrideable method. Then you could re-use the component to
generate all kinds of different calendars by simply subclassing and
returning different kinds of day panels.

jk

On Thu, Oct 23, 2008 at 01:47:26PM -0700, V. Jenks wrote:
 
 Hi all.
 
 I'm trying to build a component-ized calendar that will be the centerpiece
 of a new application I'm working on.  I built one this morning in JSP and
 was able to do it with very little code.  I kept it simple and I'm hoping I
 can retro-fit the logic into a wicket page cleanly, without too much
 trouble.  I'm a little stuck because in my JSP, I simply loop through the
 days and print until Saturday is reached, then I break to a new table row
 and continue.  Doing this in Wicket seems tough because if I use a ListView,
 I can't be as flexible as far as throwing in a new row while looping and
 outputting table cells.
 
 Here's the rough idea I came up with today in JSP, can someone give me some
 pointers?
 
 %@ page contentType=text/html pageEncoding=UTF-8 %
 %@ page import=java.util.* %
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 %
   //get parameters to change date
   String monthParam = request.getParameter(month);
   String yearParam = request.getParameter(year);
   
   //create calendar object
   Calendar cal = Calendar.getInstance();
   cal.setFirstDayOfWeek(Calendar.SUNDAY); //set first day to Sunday
   
   if (monthParam != null)
 cal.set(Calendar.MONTH, (Integer.valueOf(monthParam)-1));
   
   if (yearParam != null)
 cal.set(Calendar.YEAR, Integer.valueOf(yearParam));
 
   //get total number of days in month
   int numDaysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
 
   //get current month name in English
   String monthName = cal.getDisplayName(Calendar.MONTH, Calendar.LONG,
 Locale.ENGLISH);
 
   //get current year
   int year = cal.get(Calendar.YEAR);
   
   //get array of day names
   String[] headers = {Sun, Mon, Tue, Wed, Thu, Fri, Sat};
 %
 html
   head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
 titleCalendarama!/title
   /head
   body
 table border=1
   tr
 !-- print month and year --
 th colspan=7 align=center%= monthName +   + year %/th
   /tr
   tr
 !-- loop and print days --
 %
   for (int i=0; i7; i++)
   {
 %
 td%= headers[i] %/td
 %
   }
 %
   /tr
   !-- DRAW CALENDAR --
   tr
 %
   for (int i=1; i=numDaysInMonth; i++)
   {
 //re-set calendar day in context of loop
 cal.set(Calendar.DAY_OF_MONTH, i);
 
 //get the day number of the week
 int day = cal.get(Calendar.DAY_OF_WEEK);
 
 //days without numbers count
 int blankDays = 0;
 
 //blank days before 1st of month?
 if (i == 1  day  1)
 {
   blankDays = day - i; //get count
 
   //loop through count and print blank day
   for (int x=1; x=blankDays; x++)
   {
 %
   td width=100 height=100nbsp;/td
 %
   }
 }
 %
   td width=100 height=100 valign=top%= i %/td
 %
 if (day == Calendar.SATURDAY)
 {
 %
   /tr
   tr
 %
 }  
 
 //blank days after last day of month?
 if (i == numDaysInMonth  day  7)
 {
   blankDays = 7 - day; //get count
 
   //loop through count and print blank day
   for (int x=1; x=blankDays; x++)
   {
 %
   td width=100 height=100nbsp;/td
 %
   }
 }
   }
 %
   /tr
 /table
   /body
 /html
 
 -- 
 View this message in context: 
 http://www.nabble.com/Trying-to-create-a-calendar---need-some-guidance-tp20138860p20138860.html
 Sent from the Wicket - User mailing list archive at 

Re: Trying to create a calendar - need some guidance

2008-10-23 Thread Igor Vaynberg
all you need is a gridview. set columns to 7 and generate 30 items...

-igor

On Thu, Oct 23, 2008 at 1:47 PM, V. Jenks [EMAIL PROTECTED] wrote:

 Hi all.

 I'm trying to build a component-ized calendar that will be the centerpiece
 of a new application I'm working on.  I built one this morning in JSP and
 was able to do it with very little code.  I kept it simple and I'm hoping I
 can retro-fit the logic into a wicket page cleanly, without too much
 trouble.  I'm a little stuck because in my JSP, I simply loop through the
 days and print until Saturday is reached, then I break to a new table row
 and continue.  Doing this in Wicket seems tough because if I use a ListView,
 I can't be as flexible as far as throwing in a new row while looping and
 outputting table cells.

 Here's the rough idea I came up with today in JSP, can someone give me some
 pointers?

 %@ page contentType=text/html pageEncoding=UTF-8 %
 %@ page import=java.util.* %
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 %
  //get parameters to change date
  String monthParam = request.getParameter(month);
  String yearParam = request.getParameter(year);

  //create calendar object
  Calendar cal = Calendar.getInstance();
  cal.setFirstDayOfWeek(Calendar.SUNDAY); //set first day to Sunday

  if (monthParam != null)
cal.set(Calendar.MONTH, (Integer.valueOf(monthParam)-1));

  if (yearParam != null)
cal.set(Calendar.YEAR, Integer.valueOf(yearParam));

  //get total number of days in month
  int numDaysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

  //get current month name in English
  String monthName = cal.getDisplayName(Calendar.MONTH, Calendar.LONG,
 Locale.ENGLISH);

  //get current year
  int year = cal.get(Calendar.YEAR);

  //get array of day names
  String[] headers = {Sun, Mon, Tue, Wed, Thu, Fri, Sat};
 %
 html
  head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleCalendarama!/title
  /head
  body
table border=1
  tr
!-- print month and year --
th colspan=7 align=center%= monthName +   + year %/th
  /tr
  tr
!-- loop and print days --
%
  for (int i=0; i7; i++)
  {
%
td%= headers[i] %/td
%
  }
%
  /tr
  !-- DRAW CALENDAR --
  tr
%
  for (int i=1; i=numDaysInMonth; i++)
  {
//re-set calendar day in context of loop
cal.set(Calendar.DAY_OF_MONTH, i);

//get the day number of the week
int day = cal.get(Calendar.DAY_OF_WEEK);

//days without numbers count
int blankDays = 0;

//blank days before 1st of month?
if (i == 1  day  1)
{
  blankDays = day - i; //get count

  //loop through count and print blank day
  for (int x=1; x=blankDays; x++)
  {
%
  td width=100 height=100nbsp;/td
%
  }
}
%
  td width=100 height=100 valign=top%= i %/td
%
if (day == Calendar.SATURDAY)
{
%
  /tr
  tr
%
}

//blank days after last day of month?
if (i == numDaysInMonth  day  7)
{
  blankDays = 7 - day; //get count

  //loop through count and print blank day
  for (int x=1; x=blankDays; x++)
  {
%
  td width=100 height=100nbsp;/td
%
  }
}
  }
%
  /tr
/table
  /body
 /html

 --
 View this message in context: 
 http://www.nabble.com/Trying-to-create-a-calendar---need-some-guidance-tp20138860p20138860.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: Trying to create a calendar - need some guidance

2008-10-23 Thread John Krasnay
Uh, yeah, that's what I meant to say, just use a GridView :-)

jk

On Thu, Oct 23, 2008 at 05:14:42PM -0700, Igor Vaynberg wrote:
 all you need is a gridview. set columns to 7 and generate 30 items...
 
 -igor
 
 On Thu, Oct 23, 2008 at 1:47 PM, V. Jenks [EMAIL PROTECTED] wrote:
 
  Hi all.
 
  I'm trying to build a component-ized calendar that will be the centerpiece
  of a new application I'm working on.  I built one this morning in JSP and
  was able to do it with very little code.  I kept it simple and I'm hoping I
  can retro-fit the logic into a wicket page cleanly, without too much
  trouble.  I'm a little stuck because in my JSP, I simply loop through the
  days and print until Saturday is reached, then I break to a new table row
  and continue.  Doing this in Wicket seems tough because if I use a ListView,
  I can't be as flexible as far as throwing in a new row while looping and
  outputting table cells.
 
  Here's the rough idea I came up with today in JSP, can someone give me some
  pointers?
 
  %@ page contentType=text/html pageEncoding=UTF-8 %
  %@ page import=java.util.* %
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  http://www.w3.org/TR/html4/loose.dtd;
  %
   //get parameters to change date
   String monthParam = request.getParameter(month);
   String yearParam = request.getParameter(year);
 
   //create calendar object
   Calendar cal = Calendar.getInstance();
   cal.setFirstDayOfWeek(Calendar.SUNDAY); //set first day to Sunday
 
   if (monthParam != null)
 cal.set(Calendar.MONTH, (Integer.valueOf(monthParam)-1));
 
   if (yearParam != null)
 cal.set(Calendar.YEAR, Integer.valueOf(yearParam));
 
   //get total number of days in month
   int numDaysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
 
   //get current month name in English
   String monthName = cal.getDisplayName(Calendar.MONTH, Calendar.LONG,
  Locale.ENGLISH);
 
   //get current year
   int year = cal.get(Calendar.YEAR);
 
   //get array of day names
   String[] headers = {Sun, Mon, Tue, Wed, Thu, Fri, Sat};
  %
  html
   head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
 titleCalendarama!/title
   /head
   body
 table border=1
   tr
 !-- print month and year --
 th colspan=7 align=center%= monthName +   + year %/th
   /tr
   tr
 !-- loop and print days --
 %
   for (int i=0; i7; i++)
   {
 %
 td%= headers[i] %/td
 %
   }
 %
   /tr
   !-- DRAW CALENDAR --
   tr
 %
   for (int i=1; i=numDaysInMonth; i++)
   {
 //re-set calendar day in context of loop
 cal.set(Calendar.DAY_OF_MONTH, i);
 
 //get the day number of the week
 int day = cal.get(Calendar.DAY_OF_WEEK);
 
 //days without numbers count
 int blankDays = 0;
 
 //blank days before 1st of month?
 if (i == 1  day  1)
 {
   blankDays = day - i; //get count
 
   //loop through count and print blank day
   for (int x=1; x=blankDays; x++)
   {
 %
   td width=100 height=100nbsp;/td
 %
   }
 }
 %
   td width=100 height=100 valign=top%= i %/td
 %
 if (day == Calendar.SATURDAY)
 {
 %
   /tr
   tr
 %
 }
 
 //blank days after last day of month?
 if (i == numDaysInMonth  day  7)
 {
   blankDays = 7 - day; //get count
 
   //loop through count and print blank day
   for (int x=1; x=blankDays; x++)
   {
 %
   td width=100 height=100nbsp;/td
 %
   }
 }
   }
 %
   /tr
 /table
   /body
  /html
 
  --
  View this message in context: 
  http://www.nabble.com/Trying-to-create-a-calendar---need-some-guidance-tp20138860p20138860.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]
 

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



Re: Trying to create a calendar - need some guidance

2008-10-23 Thread Edgar Merino
I've got an abstract calendar already coded, the only problem is that 
it's using a DataTable (instead of only a gridview), I have to change 
the code to use the gridview instead, I'll post the code tomorrow if 
I've got the time and you're still interested.


Edgar Merino





John Krasnay escribió:

Uh, yeah, that's what I meant to say, just use a GridView :-)

jk

On Thu, Oct 23, 2008 at 05:14:42PM -0700, Igor Vaynberg wrote:
  

all you need is a gridview. set columns to 7 and generate 30 items...

-igor

On Thu, Oct 23, 2008 at 1:47 PM, V. Jenks [EMAIL PROTECTED] wrote:


Hi all.

I'm trying to build a component-ized calendar that will be the centerpiece
of a new application I'm working on.  I built one this morning in JSP and
was able to do it with very little code.  I kept it simple and I'm hoping I
can retro-fit the logic into a wicket page cleanly, without too much
trouble.  I'm a little stuck because in my JSP, I simply loop through the
days and print until Saturday is reached, then I break to a new table row
and continue.  Doing this in Wicket seems tough because if I use a ListView,
I can't be as flexible as far as throwing in a new row while looping and
outputting table cells.

Here's the rough idea I came up with today in JSP, can someone give me some
pointers?

%@ page contentType=text/html pageEncoding=UTF-8 %
%@ page import=java.util.* %
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
%
 //get parameters to change date
 String monthParam = request.getParameter(month);
 String yearParam = request.getParameter(year);

 //create calendar object
 Calendar cal = Calendar.getInstance();
 cal.setFirstDayOfWeek(Calendar.SUNDAY); //set first day to Sunday

 if (monthParam != null)
   cal.set(Calendar.MONTH, (Integer.valueOf(monthParam)-1));

 if (yearParam != null)
   cal.set(Calendar.YEAR, Integer.valueOf(yearParam));

 //get total number of days in month
 int numDaysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

 //get current month name in English
 String monthName = cal.getDisplayName(Calendar.MONTH, Calendar.LONG,
Locale.ENGLISH);

 //get current year
 int year = cal.get(Calendar.YEAR);

 //get array of day names
 String[] headers = {Sun, Mon, Tue, Wed, Thu, Fri, Sat};
%
html
 head
   meta http-equiv=Content-Type content=text/html; charset=UTF-8
   titleCalendarama!/title
 /head
 body
   table border=1
 tr
   !-- print month and year --
   th colspan=7 align=center%= monthName +   + year %/th
 /tr
 tr
   !-- loop and print days --
   %
 for (int i=0; i7; i++)
 {
   %
   td%= headers[i] %/td
   %
 }
   %
 /tr
 !-- DRAW CALENDAR --
 tr
   %
 for (int i=1; i=numDaysInMonth; i++)
 {
   //re-set calendar day in context of loop
   cal.set(Calendar.DAY_OF_MONTH, i);

   //get the day number of the week
   int day = cal.get(Calendar.DAY_OF_WEEK);

   //days without numbers count
   int blankDays = 0;

   //blank days before 1st of month?
   if (i == 1  day  1)
   {
 blankDays = day - i; //get count

 //loop through count and print blank day
 for (int x=1; x=blankDays; x++)
 {
   %
 td width=100 height=100nbsp;/td
   %
 }
   }
   %
 td width=100 height=100 valign=top%= i %/td
   %
   if (day == Calendar.SATURDAY)
   {
   %
 /tr
 tr
   %
   }

   //blank days after last day of month?
   if (i == numDaysInMonth  day  7)
   {
 blankDays = 7 - day; //get count

 //loop through count and print blank day
 for (int x=1; x=blankDays; x++)
 {
   %
 td width=100 height=100nbsp;/td
   %
 }
   }
 }
   %
 /tr
   /table
 /body
/html

--
View this message in context: 
http://www.nabble.com/Trying-to-create-a-calendar---need-some-guidance-tp20138860p20138860.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]




-
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]