Re: Nested Forms and Multipart Fileupload Issue

2010-03-12 Thread Michał Letyński
Did you add a jira issue James ? If not i can do it. Its a showstopper 
for me.


Ilja Pavkovic pisze:

Hi,

  

Hmmm...I thought the Wicket Team already implemented something similar to
this into the framework some time ago.
  

Perhaps you should provide a quickstart and perhaps put it in a jira ticket?

Best Regards,
Ilja Pavkovic

  



--
Michał Letyński
ConSol* Consulting  Solutions Software Poland Sp. z o.o.
ul. Piastowska 44c, 30-070 Krakow
mail: mi...@consol.pl
tel: +48 609 266 753 



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



Re: Interaction behavior / site

2010-03-12 Thread Thomas Kappler

On 03/11/10 22:36, Thorsten wrote:

On Thu, 11 Mar 2010, Michael O'Cleirigh wrote:

Hi Michael,


The content of the tooltip should be a panel.  The panel's model can
contain the ListInteger  of the increases you want offered and then
it can use a repeater or ListView to render each option.  If the
links were AjaxLink subclasses you could set their model to be the
particular Integer they represented and then within the
onClick(final AjaxRequestTarget target) method handle the necessary
changes to your totals.


I'm still confused. My main page looks like this:
html
 span wicket:id=tooltip  Click on me, and a tooltip will show up
 /span
/html

class MainPage extends WebPage {
 final Label tooltipHolder = new Label(tooltip, asdf);
 add(tooltipHolder);
 tooltipHolder.setOutputMarkupId(true);
 tooltipHolder.add( new QTipBehaviour( new TooltipPanel(??? ));
}

So I don't have hany markup-id for the panel. I could define it in the
html as a hidden div, but is there a way of without an additional div?


I don't know QTipbehaviour, but it should take care of that. That's how 
it works with ModalWindow, for instance.


If you just define a simple TooltipPanel and try it out, what happens?

-- Thomas

--
---
  Thomas Kapplerthomas.kapp...@isb-sib.ch
  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland  http://www.uniprot.org
---

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



Re: Application#get in WicketSessionFilter

2010-03-12 Thread Jonas
I create a JIRA issue for this:
https://issues.apache.org/jira/browse/WICKET-2778

cheers,
Jonas

On Thu, Mar 11, 2010 at 1:10 PM, Jonas barney...@gmail.com wrote:
 Hi all,

 we're using WicketSessionFilter in our product to access
 our custom WebSession, which works fine. Now we've tried
 to also access the org.apache.wicket.Application (e.g. using
 Session#getApplication or Application#get), which doesn't seem
 to work, because the application isn't bound to the ThreadLocal.
 After searching in nabble I found some old threads ([1], [2]) suggesting
 this should actually work fine, but that doesn't seem to be the case.
 Is there any special configuration trick I have to apply to make this
 work, or are those old posts just (no longer) true?
 If anybody could confirm this is actually a bug, I'd create an issue
 in JIRA to have this fixed.

 Regards,
 Jonas

 [1] 
 http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786
 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469


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



onkeyup ajax call with the key pressed

2010-03-12 Thread Istvan Soos
Hi,

Is there a way to combine onkeyup event (on a div panel, not on form
component) into an ajax call, that will contain the character of the
key pressed?

Thanks,
  Istvan

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



ClassLoader (Serialization?) error

2010-03-12 Thread Xavier López
Hi,

From time to time I see the following error in my deployed application's
log. The application is running clustered on Weblogic 9.2 MP3.

It seems to be messing up with the classloading of class mypackage.MyClass
(this error comes up in many different classes). I can guess from the stack
trace that something is going wrong maybe serializing that page, it can be
seen that the class name is being messed with some content of the page (div
tags, text displayed in the page,...).

Has anyone been in this situation before ? Any tip on how to address the
issue ?

2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
queue: 'weblogic.kernel.Default (self-tuning)']
org.apache.wicket.request.target.resource.SharedResourceRequestTarget
579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
1268343057...@192.168.131.142 - unable to lazily register shared resource
mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id=
java.lang.ClassNotFoundException:
mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35)
at
org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
at
org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
at mypacakge.MyFilter.doFilter(ANetFilter.java:37)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
queue: 'weblogic.kernel.Default (self-tuning)']
org.apache.wicket.request.target.resource.SharedResourceRequestTarget
579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
1268343057...@192.168.131.142 - shared resource
mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not
found

Thanks,
Xavier


Re: Nested Forms and Multipart Fileupload Issue

2010-03-12 Thread Michał Letyński
Jirra issue with quickstart added: 
https://issues.apache.org/jira/browse/WICKET-2779


Michał Letyński pisze:
Did you add a jira issue James ? If not i can do it. Its a showstopper 
for me.


Ilja Pavkovic pisze:

Hi,

 
Hmmm...I thought the Wicket Team already implemented something 
similar to

this into the framework some time ago.
  
Perhaps you should provide a quickstart and perhaps put it in a jira 
ticket?


Best Regards,
Ilja Pavkovic

  





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



Re: onkeyup ajax call with the key pressed

2010-03-12 Thread Pedro Santos
Yes, for example you can add an ajax behaviour to you page, and using his
callback url mount an script like

wicketAjaxGet(callbackUrl + 'key=' + event.keyCode);

on your div onkeyup event.

On Fri, Mar 12, 2010 at 6:55 AM, Istvan Soos istvan.s...@gmail.com wrote:

 Hi,

 Is there a way to combine onkeyup event (on a div panel, not on form
 component) into an ajax call, that will contain the character of the
 key pressed?

 Thanks,
   Istvan

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




-- 
Pedro Henrique Oliveira dos Santos


why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Hello, everyone!

I get the exception:

java.lang.NullPointerException
 at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
 at java.util.HashMap.putForCreate(HashMap.java:413)
 at java.util.HashMap.readObject(HashMap.java:1031)
 at java.lang.reflect.Method.invoke(Method.java:597)

  .

 at org.apache.wicket.Component.readObject(Component.java:4465)

  .

 at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:409)
 at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
 at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
 at 
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
 at org.apache.wicket.Session.getPage(Session.java:779)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
 at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)

...

the field that is null is probably because it's not loaded by Spring. Anyway, 
why should it call hashCode(), and how could I avoid it?

Best,
Martin



Re: why is hashcode() called on page deserialization?

2010-03-12 Thread Jonas
I guess you have a HashMap field in your component, which has an entry with an
SMSEvent object as key. You probably shouldn't hold on to references to spring
loaded objects. Instead, you should just have an accessor object, which knows
how to reload that spring loaded object, e.g. LoadableDetachableModel.

cheers,
Jonas

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



RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Hi, Jonas!

I only have some ListView-s with ListSMSEvent passed as an argument. You mean 
to replace the List with LoadableDetachableModel, that returns the List?

Regards,

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 3:18 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

I guess you have a HashMap field in your component, which has an entry with an
SMSEvent object as key. You probably shouldn't hold on to references to spring
loaded objects. Instead, you should just have an accessor object, which knows
how to reload that spring loaded object, e.g. LoadableDetachableModel.

cheers,
Jonas

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


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



Re: why is hashcode() called on page deserialization?

2010-03-12 Thread Jonas
Yes, exactly. But the stacktrace you posted is about a HashMap that is
directly referenced from one of your
components - you should also use e.g. LoadableDetachableModel there, I guess.

On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote:
 Hi, Jonas!

 I only have some ListView-s with ListSMSEvent passed as an argument. You 
 mean to replace the List with LoadableDetachableModel, that returns the List?

 Regards,

 -Original Message-
 From: Jonas [mailto:barney...@gmail.com]
 Sent: Friday, March 12, 2010 3:18 PM
 To: users@wicket.apache.org
 Subject: Re: why is hashcode() called on page deserialization?

 I guess you have a HashMap field in your component, which has an entry with an
 SMSEvent object as key. You probably shouldn't hold on to references to spring
 loaded objects. Instead, you should just have an accessor object, which knows
 how to reload that spring loaded object, e.g. LoadableDetachableModel.

 cheers,
 Jonas

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


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



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



RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
I don't have any HashMap-s that use SMSEvent object as a key. Only List-s

Regards,
Martin

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 3:29 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

Yes, exactly. But the stacktrace you posted is about a HashMap that is
directly referenced from one of your
components - you should also use e.g. LoadableDetachableModel there, I guess.

On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote:
 Hi, Jonas!

 I only have some ListView-s with ListSMSEvent passed as an argument. You 
 mean to replace the List with LoadableDetachableModel, that returns the List?

 Regards,

 -Original Message-
 From: Jonas [mailto:barney...@gmail.com]
 Sent: Friday, March 12, 2010 3:18 PM
 To: users@wicket.apache.org
 Subject: Re: why is hashcode() called on page deserialization?

 I guess you have a HashMap field in your component, which has an entry with an
 SMSEvent object as key. You probably shouldn't hold on to references to spring
 loaded objects. Instead, you should just have an accessor object, which knows
 how to reload that spring loaded object, e.g. LoadableDetachableModel.

 cheers,
 Jonas

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


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



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


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



Re: why is hashcode() called on page deserialization?

2010-03-12 Thread Jonas
Well, the stacktrace you posted is about a HashMap, so it must be
around somewhere...?
I guess you didn't post the full stacktrace, so it may be deeply
hidden in something you
reference from a wicket Component.
Maybe you'll find it by examining the full stacktrace, or using a debugger.

cheers,
Jonas

On Fri, Mar 12, 2010 at 2:39 PM, Martin Asenov mase...@velti.com wrote:
 I don't have any HashMap-s that use SMSEvent object as a key. Only List-s

 Regards,
 Martin

 -Original Message-
 From: Jonas [mailto:barney...@gmail.com]
 Sent: Friday, March 12, 2010 3:29 PM
 To: users@wicket.apache.org
 Subject: Re: why is hashcode() called on page deserialization?

 Yes, exactly. But the stacktrace you posted is about a HashMap that is
 directly referenced from one of your
 components - you should also use e.g. LoadableDetachableModel there, I guess.

 On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote:
 Hi, Jonas!

 I only have some ListView-s with ListSMSEvent passed as an argument. You 
 mean to replace the List with LoadableDetachableModel, that returns the List?

 Regards,

 -Original Message-
 From: Jonas [mailto:barney...@gmail.com]
 Sent: Friday, March 12, 2010 3:18 PM
 To: users@wicket.apache.org
 Subject: Re: why is hashcode() called on page deserialization?

 I guess you have a HashMap field in your component, which has an entry with 
 an
 SMSEvent object as key. You probably shouldn't hold on to references to 
 spring
 loaded objects. Instead, you should just have an accessor object, which knows
 how to reload that spring loaded object, e.g. LoadableDetachableModel.

 cheers,
 Jonas

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


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



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


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



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



Re: FormTester - submitting more than once

2010-03-12 Thread Kent Tong


Tony Wu-5 wrote:
 
 However, I can't
 do this unit test in Wicket because a FormTester can only submit once. I
 can't resetup the FormTester data because the 2nd submit button (checkout)
 requires a state that the 1st submit button sets.
 

Yes, you can make it work if you use http://wicketpagetest.sourceforge.net/

-
--
Kent Tong
Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net)
Books on CXF, Axis2, Wicket, JSF (http://agileskills2.org)
-- 
View this message in context: 
http://old.nabble.com/FormTester---submitting-more-than-once-tp27873217p27874748.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Well, Jonas, here's the stacktrace:

P.S. LoadableDetachableModel didn't help Regards and thanks,
Martin

java.lang.NullPointerException
 at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
 at java.util.HashMap.putForCreate(HashMap.java:413)
 at java.util.HashMap.readObject(HashMap.java:1031)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
 at java.util.HashMap.readObject(HashMap.java:1029)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
 at java.util.ArrayList.readObject(ArrayList.java:593)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
 at org.apache.wicket.Component.readObject(Component.java:4465)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 

Re: why is hashcode() called on page deserialization?

2010-03-12 Thread Jonas
That's odd - are you sure you restarted/redeployed/etc. your webapp properly?
Maybe you should also try clearing the directory where the DiskPageStore stores
the serialized pages - just to make sure you won't get an old page again.
From the stacktrace I can see you have a wicket component that holds on
to an ArrayList (I guess that's your ListView). The ArrayList's elements hold
in turn the HashMap in question. If that's correct, your problem should go away
if the Component no longer directly holds on to the ArrayList (e.g. by
using LoadableDetachableModel)
If this still doesn't help, I suggest you try setting an Exception
Breakpoint on NullPointerException
in your debugger and examine the objects being serialized.
You can see the Objects e.g. in as the first parameter of
ObjectInputStream.readSerialData

cheers,
Jonas

On Fri, Mar 12, 2010 at 3:36 PM, Martin Asenov mase...@velti.com wrote:
 Well, Jonas, here's the stacktrace:

 P.S. LoadableDetachableModel didn't help Regards and thanks,
 Martin

 java.lang.NullPointerException
     at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
     at java.util.HashMap.putForCreate(HashMap.java:413)
     at java.util.HashMap.readObject(HashMap.java:1031)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.HashMap.readObject(HashMap.java:1029)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.ArrayList.readObject(ArrayList.java:593)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
     at org.apache.wicket.Component.readObject(Component.java:4465)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
     at 
 

Label text wrapping

2010-03-12 Thread Marek Šabo

Hi all,

I have a question, I was doing some modal windows to display user data 
and user object contains a long string. How can I control text wrapping 
or say dynamically resize modal window according to that text length? 
Actually wrapping would be just fine I don't mind vertical scrollbars 
but horizontal ones. Can MultiLineLabel help here? I couldn't find 
anything because keyword wrap is bound to model wrapping in wicket...


TIA

Marek

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



RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Thanks, Jonas, just will try to locate the cache and remove it.

Best,
Martin

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 4:56 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

That's odd - are you sure you restarted/redeployed/etc. your webapp properly?
Maybe you should also try clearing the directory where the DiskPageStore stores
the serialized pages - just to make sure you won't get an old page again.
From the stacktrace I can see you have a wicket component that holds on
to an ArrayList (I guess that's your ListView). The ArrayList's elements hold
in turn the HashMap in question. If that's correct, your problem should go away
if the Component no longer directly holds on to the ArrayList (e.g. by
using LoadableDetachableModel)
If this still doesn't help, I suggest you try setting an Exception
Breakpoint on NullPointerException
in your debugger and examine the objects being serialized.
You can see the Objects e.g. in as the first parameter of
ObjectInputStream.readSerialData

cheers,
Jonas

On Fri, Mar 12, 2010 at 3:36 PM, Martin Asenov mase...@velti.com wrote:
 Well, Jonas, here's the stacktrace:

 P.S. LoadableDetachableModel didn't help Regards and thanks,
 Martin

 java.lang.NullPointerException
     at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
     at java.util.HashMap.putForCreate(HashMap.java:413)
     at java.util.HashMap.readObject(HashMap.java:1031)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.HashMap.readObject(HashMap.java:1029)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.ArrayList.readObject(ArrayList.java:593)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
     at org.apache.wicket.Component.readObject(Component.java:4465)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 

Re: ClassLoader (Serialization?) error

2010-03-12 Thread Jonas
Looks like a resource called 'mypackage.MyClass fi usuari --  /divdiv id'
was requested - that's the output after urldecoding the string from
your exception
message. I guess somewhere in your webapp resource url's are output incorrectly,
or someone actually entered that string as url in his browser. Maybe
you're trying
to output html comment inside html comments, where the 'inner' comments
terminate the 'outer' comments early, and leave an extra -- behind.
So, I guess you don't have a ClassLoader issue here, nor a Serialization issue.

cheers,
Jonas

On Fri, Mar 12, 2010 at 12:16 PM, Xavier López xavil...@gmail.com wrote:
 Hi,

 From time to time I see the following error in my deployed application's
 log. The application is running clustered on Weblogic 9.2 MP3.

 It seems to be messing up with the classloading of class mypackage.MyClass
 (this error comes up in many different classes). I can guess from the stack
 trace that something is going wrong maybe serializing that page, it can be
 seen that the class name is being messed with some content of the page (div
 tags, text displayed in the page,...).

 Has anyone been in this situation before ? Any tip on how to address the
 issue ?

 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
 queue: 'weblogic.kernel.Default (self-tuning)']
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget
 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
 1268343057...@192.168.131.142 - unable to lazily register shared resource
 mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id=
 java.lang.ClassNotFoundException:
 mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C
    at
 weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289)
    at
 weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262)
    at
 weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at
 weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161)
    at
 weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35)
    at
 org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
    at
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
    at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
    at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
    at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
    at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
    at mypacakge.MyFilter.doFilter(ANetFilter.java:37)
    at
 weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at
 weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242)
    at
 weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at
 weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at
 weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
    at
 weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
    at
 weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
 2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
 queue: 'weblogic.kernel.Default (self-tuning)']
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget
 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
 1268343057...@192.168.131.142 - shared resource
 mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not
 found

 Thanks,
 Xavier


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



Modal window issue

2010-03-12 Thread Jeffrey Schneller
I am running into a very odd problem with modal windows.  The problem
occurs in Firefox and not in IE7.  

 

I have a list of links which each display a modal window to create a
different type of item.  One of the links(call it item A) brings up a
modal with the same links so you can create a particular sub-item.

All but one of the links displays the modal window correctly from the
original list.  The link that does not work tries to create a modal
window for item D.The link for item D tries to open the modal as a
brand new page.  However if I click the link for modal A and then from
within that click the link for modal D, I get a message Are you sure
you want to navigate away from this page.  Reloading this page will
cause the modal window to disappear.  If I click cancel repeatedly then
the correct modal window finally displays.  I can then go back to the
original list of links and click modal D and it all works.  

 

Everything works correctly under IE 7.   Any ideas?

 

Thanks.



Re: FormTester - submitting more than once

2010-03-12 Thread Tony Wu
Any way to do it without running Selenium?

On Mar 12, 2010, at 6:01 AM, Kent Tong wrote:

 
 
 Tony Wu-5 wrote:
 
 However, I can't
 do this unit test in Wicket because a FormTester can only submit once. I
 can't resetup the FormTester data because the 2nd submit button (checkout)
 requires a state that the 1st submit button sets.
 
 
 Yes, you can make it work if you use http://wicketpagetest.sourceforge.net/
 
 -
 --
 Kent Tong
 Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net)
 Books on CXF, Axis2, Wicket, JSF (http://agileskills2.org)
 -- 
 View this message in context: 
 http://old.nabble.com/FormTester---submitting-more-than-once-tp27873217p27874748.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Re: ClassLoader (Serialization?) error

2010-03-12 Thread Igor Vaynberg
ive seen this once before on the list. also with weblogic i think.
search the list.

-igor

On Fri, Mar 12, 2010 at 3:16 AM, Xavier López xavil...@gmail.com wrote:
 Hi,

 From time to time I see the following error in my deployed application's
 log. The application is running clustered on Weblogic 9.2 MP3.

 It seems to be messing up with the classloading of class mypackage.MyClass
 (this error comes up in many different classes). I can guess from the stack
 trace that something is going wrong maybe serializing that page, it can be
 seen that the class name is being messed with some content of the page (div
 tags, text displayed in the page,...).

 Has anyone been in this situation before ? Any tip on how to address the
 issue ?

 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
 queue: 'weblogic.kernel.Default (self-tuning)']
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget
 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
 1268343057...@192.168.131.142 - unable to lazily register shared resource
 mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id=
 java.lang.ClassNotFoundException:
 mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C
    at
 weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289)
    at
 weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262)
    at
 weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at
 weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161)
    at
 weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35)
    at
 org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
    at
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
    at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
    at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
    at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
    at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
    at mypacakge.MyFilter.doFilter(ANetFilter.java:37)
    at
 weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at
 weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242)
    at
 weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at
 weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at
 weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
    at
 weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
    at
 weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
 2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
 queue: 'weblogic.kernel.Default (self-tuning)']
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget
 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
 1268343057...@192.168.131.142 - shared resource
 mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not
 found

 Thanks,
 Xavier


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



Re: onkeyup ajax call with the key pressed

2010-03-12 Thread Istvan Soos
Thanks! Is there somewhere an example for this? E.g. with Java
callback codes and like...

Thanks,
   Istvan

On Fri, Mar 12, 2010 at 1:40 PM, Pedro Santos pedros...@gmail.com wrote:
 Yes, for example you can add an ajax behaviour to you page, and using his
 callback url mount an script like

        wicketAjaxGet(callbackUrl + 'key=' + event.keyCode);

 on your div onkeyup event.

 On Fri, Mar 12, 2010 at 6:55 AM, Istvan Soos istvan.s...@gmail.com wrote:

 Hi,

 Is there a way to combine onkeyup event (on a div panel, not on form
 component) into an ajax call, that will contain the character of the
 key pressed?

 Thanks,
   Istvan

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




 --
 Pedro Henrique Oliveira dos Santos


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



TextField w/ bean as model object?

2010-03-12 Thread Nikita Tovstoles
I'd appreciate another pair of eyes on the following:

I have a US ZIP Code input text field that I'd like to bind to an Area
bean. The idea is that the component would prompt/display for a 5-digit zip
code but getModelObject() would return an Area:

class ZipInput extends RequiredTextFieldArea;

where Area is:

class Area{
int zipcode;
UsState state; //enum
String city;
}

there is also a AreaService service:

//returns true only if zipCode is a valid US zip code
boolean isValidZipCode(int zipcode);

//return Area bean for given zipCode; throws exception if 'zipCode' isn't a
valid US Zip Code
Area getArea(int zipCode);


The component needs to:

   - validate that input is present (RequiredValidator?)
   - convert input from String integer
   - at some pt call AreaService.isValidZipCode (again, a validation task)
   - call AreaService.getArea (a conversion task)


My main problem is that it seems like AreaService.getArea() should be
wrapped into a IConverter, but it, in turn, requires a validation step.
However, conversion runs before validation (ie. first I need to convert
string-int). So, I guess, I am unsure which of the above should be wrapped
into a Converter and which into a Validator (trying to maintain some
separation of responsibilities). Should I create a converter that chains
StringInt and IntArea conversions? Which would execute
AreaService.getArea(zipCode)?

thanks
-nikita


Re: TextField w/ bean as model object?

2010-03-12 Thread Igor Vaynberg
there are two ways to do this

either you do everything in the converter

take the string and convert it into the area, if the zip is incorrect
throw a conversion exception

or you split the two

have a converter that converts the string into the area and a
validator that makes sure the area is valid

-igor


On Fri, Mar 12, 2010 at 10:03 AM, Nikita Tovstoles
nikita.tovsto...@gmail.com wrote:
 I'd appreciate another pair of eyes on the following:

 I have a US ZIP Code input text field that I'd like to bind to an Area
 bean. The idea is that the component would prompt/display for a 5-digit zip
 code but getModelObject() would return an Area:

 class ZipInput extends RequiredTextFieldArea;

 where Area is:

 class Area{
 int zipcode;
 UsState state; //enum
 String city;
 }

 there is also a AreaService service:

 //returns true only if zipCode is a valid US zip code
 boolean isValidZipCode(int zipcode);

 //return Area bean for given zipCode; throws exception if 'zipCode' isn't a
 valid US Zip Code
 Area getArea(int zipCode);


 The component needs to:

   - validate that input is present (RequiredValidator?)
   - convert input from String integer
   - at some pt call AreaService.isValidZipCode (again, a validation task)
   - call AreaService.getArea (a conversion task)


 My main problem is that it seems like AreaService.getArea() should be
 wrapped into a IConverter, but it, in turn, requires a validation step.
 However, conversion runs before validation (ie. first I need to convert
 string-int). So, I guess, I am unsure which of the above should be wrapped
 into a Converter and which into a Validator (trying to maintain some
 separation of responsibilities). Should I create a converter that chains
 StringInt and IntArea conversions? Which would execute
 AreaService.getArea(zipCode)?

 thanks
 -nikita


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



datetime and yui clash

2010-03-12 Thread Josh Chappelle
Hi,

 

I am upgrading our software to use wicket 1.4.7 and have run into an issue.
We have a wicketstuff-yui menu that is using the 1.4.2 snapshot of yui. Then
I have a DatePicker from the wicket-datetime jar added to a DateTextField.
When I click the picker icon nothing happens. If I remove the main menu then
it works. 

 

My guess is that there are some overlapping javascript calls going on with
the yui stuff. I tried overriding the includeYUILibraries() method to return
false on the DatePicker but this still did not work. 

 

Any ideas? 

 

Thanks,

 

Josh



Load webapp from two different tab result in a 302

2010-03-12 Thread Daniele Dellafiore
Hi.

I cannot open the same webapp in two tab/window on the same machine.
It results in a browser crash if webapp is running in local, in a 302 if is
deployed on a remote server
On local, browser crashes due to the loop that is more clear online.

You can see it here:
http://danieledellafiore.net/artivio-stage/

First time It should open. Then try to open the same URL in another browser
window or tab and see the browser continue to reload the same page, without
never completing it.
If you inspect with firebug, you will see a endless series of 302-200.

I can't figure out how to fix this. Problem is that after the first time the
loop occur, closing tab and reopening site in another does not work. You
need to restart the browser (or jetty).

actually using wicket 1.4.3 over jetty 7.0.0.
It is behind an apache but even accessing to jetty directly have the same
result.

Thanks for any help.

-- 
Daniele Dellafiore
http://danieledellafiore.net


Re: Label text wrapping

2010-03-12 Thread Per Newgro

Isn't this a css or style issue?

Cheers
Per

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



Re: Configure wicketpagetest to multi eclipse project layout

2010-03-12 Thread Per Newgro
Thanks. Got a little trouble with missing src/main/webapp but setting 
the docbase to src/main helped.
A different way would be to create an empty src/main/webapp folder in 
the test project.


Cheers
Per

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



How to dynamtically generate an image via an Ajax link?

2010-03-12 Thread David Chang

Hello, I am playing with JCaptcha. My JCaptcha is working (thanks to WIA book). 
I also have an Ajax link for a visitor to change the displayed image if he 
wishes. 

I am new in Wicket and I am trying to follow the idea of defining a model for a 
Wicket image component. However, based on my undersstanding of WIA's 
implementation of JCaptcha, no model is explicitly set and the book code simply 
sets ImageResource.

Does anyone out there know how to dynamically updage an image via Ajax link?

Any pointer or info is really appreciated.

Regards.



  

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



inmethod DataGrid problem in IE8

2010-03-12 Thread Russell Morrisey
I am having trouble with the layout of my inmethod DataGrid in wicket.  It 
appears that the header columns and the data columns are not lining up 
correctly.  There is a thin outer layer surrounding the individual columns on 
each row that is pushing the data outside of the viewable area.  This only 
happens in IE 8, it works fine in lower versions of IE and Firefox.  The 
summary and header rows work properly but the data rows are the problem.

Marsha



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.


Re: inmethod DataGrid problem in IE8

2010-03-12 Thread Matej Knopp
If you run grid examples is the problem present?

-Matej

On Fri, Mar 12, 2010 at 9:54 PM, Russell Morrisey
russell.morri...@missionse.com wrote:
 I am having trouble with the layout of my inmethod DataGrid in wicket.  It 
 appears that the header columns and the data columns are not lining up 
 correctly.  There is a thin outer layer surrounding the individual columns on 
 each row that is pushing the data outside of the viewable area.  This only 
 happens in IE 8, it works fine in lower versions of IE and Firefox.  The 
 summary and header rows work properly but the data rows are the problem.

 Marsha


 
 This is a PRIVATE message. If you are not the intended recipient, please 
 delete without copying and kindly advise us by e-mail of the mistake in 
 delivery.
 NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
 order or other contract unless pursuant to explicit written agreement or 
 government initiative expressly permitting the use of e-mail for such purpose.


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



add link in TabbedPanel header

2010-03-12 Thread Decebal Suiu
Hello,

I need a link (Add new tab) to be placed in the TabbedPanel header
(probably in the div with class tab-row), to the end of tabs.
How can I do this?

Thanks,
Decebal

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



Prettier URLs for ResourceReference images

2010-03-12 Thread Thomas Götz
Is there a way to have prettier URLs when including images that are referenced 
with a ResourceReference?
When I add an image like that:

Image image = new Image(image, new 
ResourceReference(some.package.name.and.Class.class, my_image.gif));
add(image);

... this results in a rather technical URL 
(resources/some.package.name.and.Class/my_image.gif), and I'd also prefer 
that my internal package structure is not visible to the rest of the world.

Can this be somewhat prettier maybe? ;-)

Thanks,
   -Tom



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



Re: Prettier URLs for ResourceReference images

2010-03-12 Thread Igor Vaynberg
see sharedresources#putclassalias

-igor

On Fri, Mar 12, 2010 at 1:23 PM, Thomas Götz t...@richmountain.de wrote:
 Is there a way to have prettier URLs when including images that are 
 referenced with a ResourceReference?
 When I add an image like that:

 Image image = new Image(image, new 
 ResourceReference(some.package.name.and.Class.class, my_image.gif));
 add(image);

 ... this results in a rather technical URL 
 (resources/some.package.name.and.Class/my_image.gif), and I'd also prefer 
 that my internal package structure is not visible to the rest of the world.

 Can this be somewhat prettier maybe? ;-)

 Thanks,
   -Tom



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



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



Re: add link in TabbedPanel header

2010-03-12 Thread Igor Vaynberg
sublcass the panel, copy paste its markup into your subclass.html and
add the link there

-igor

On Fri, Mar 12, 2010 at 1:15 PM, Decebal Suiu decebal.s...@gmail.com wrote:
 Hello,

 I need a link (Add new tab) to be placed in the TabbedPanel header
 (probably in the div with class tab-row), to the end of tabs.
 How can I do this?

 Thanks,
 Decebal

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



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



Re: Prettier URLs for ResourceReference images

2010-03-12 Thread Thomas Götz
Thanks, you saved my day ;-)

   -Tom


On 12.03.2010 at 22:35 Igor Vaynberg wrote:

 see sharedresources#putclassalias
 
 -igor
 
 On Fri, Mar 12, 2010 at 1:23 PM, Thomas Götz t...@richmountain.de wrote:
 Is there a way to have prettier URLs when including images that are 
 referenced with a ResourceReference?
 When I add an image like that:
 
 Image image = new Image(image, new 
 ResourceReference(some.package.name.and.Class.class, my_image.gif));
 add(image);
 
 ... this results in a rather technical URL 
 (resources/some.package.name.and.Class/my_image.gif), and I'd also prefer 
 that my internal package structure is not visible to the rest of the world.
 
 Can this be somewhat prettier maybe? ;-)
 
 Thanks,
   -Tom
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


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



RE: datetime and yui clash

2010-03-12 Thread Josh Chappelle
This issue might be specific to IE8. I can't reproduce it in Chrome. I
haven't tried others.

Josh

-Original Message-
From: Josh Chappelle [mailto:jchappe...@4redi.com] 
Sent: Friday, March 12, 2010 12:36 PM
To: users@wicket.apache.org
Subject: datetime and yui clash

Hi,

 

I am upgrading our software to use wicket 1.4.7 and have run into an issue.
We have a wicketstuff-yui menu that is using the 1.4.2 snapshot of yui. Then
I have a DatePicker from the wicket-datetime jar added to a DateTextField.
When I click the picker icon nothing happens. If I remove the main menu then
it works. 

 

My guess is that there are some overlapping javascript calls going on with
the yui stuff. I tried overriding the includeYUILibraries() method to return
false on the DatePicker but this still did not work. 

 

Any ideas? 

 

Thanks,

 

Josh



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



Re: ClassLoader (Serialization?) error

2010-03-12 Thread François Meillet
sounds like a classloading effect. 

Have a look to the classloader hierarchy

Here is a good doc:
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html

Especially this one : Resource Loading Order 
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1097288

François


Le 12 mars 2010 à 17:30, Igor Vaynberg a écrit :

 ive seen this once before on the list. also with weblogic i think.
 search the list.
 
 -igor
 
 On Fri, Mar 12, 2010 at 3:16 AM, Xavier López xavil...@gmail.com wrote:
 Hi,
 
 From time to time I see the following error in my deployed application's
 log. The application is running clustered on Weblogic 9.2 MP3.
 
 It seems to be messing up with the classloading of class mypackage.MyClass
 (this error comes up in many different classes). I can guess from the stack
 trace that something is going wrong maybe serializing that page, it can be
 seen that the class name is being messed with some content of the page (div
 tags, text displayed in the page,...).
 
 Has anyone been in this situation before ? Any tip on how to address the
 issue ?
 
 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
 queue: 'weblogic.kernel.Default (self-tuning)']
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget
 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
 1268343057...@192.168.131.142 - unable to lazily register shared resource
 mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id=
 java.lang.ClassNotFoundException:
 mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C
at
 weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289)
at
 weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262)
at
 weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
 weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161)
at
 weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35)
at
 org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
at
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
at mypacakge.MyFilter.doFilter(ANetFilter.java:37)
at
 weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at
 weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242)
at
 weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
 weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
 weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
at
 weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
at
 weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
 2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
 queue: 'weblogic.kernel.Default (self-tuning)']
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget
 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
 1268343057...@192.168.131.142 - shared resource
 mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not
 found
 
 Thanks,
 Xavier
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 






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



Re: FormTester - submitting more than once

2010-03-12 Thread Kent Tong


Tony Wu-5 wrote:
 
 Any way to do it without running Selenium?
 

Not that I know of. What's the problem of running Selenium?

-
--
Kent Tong
Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net)
Books on CXF, Axis2, Wicket, JSF (http://agileskills2.org)
-- 
View this message in context: 
http://old.nabble.com/FormTester---submitting-more-than-once-tp27873217p27885114.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



FormTester - submitting AjaxFallbackButtons!

2010-03-12 Thread Tony Wu
I have an AjaxFallbackButton which onSubmit does some validation and then
sets a container visible. When I do:

FormTester.submit(path.to.ajaxFallbackButton);

It seems to work fine (no errors in the console or junit), but the button
doesn't actually get onSubmitted (assert container visible fails). The form
itself doesn't even process (I @Override form's process function to print
something but it never went there). If I change the AjaxFallbackButton to a
regular Button, it works fine.

Igor over at the IRC channels suggested to use tester.executeAjaxEvent with
onclick - but that doesn't work either. So opening up the question to the
list... any ideas guys?

Thanks,
Tony


Design of Locale-aware dropdown list?

2010-03-12 Thread David Chang
This question may be beyond Wicket’s scope but I would like to ask folks here. 
I am impressed by their creativity, capability, and passion.

I need to display a dropdown list which is in English or Korean. The options of 
the dropdown list MUST be stored in database. It switches between English and 
Korean depending on the locale in the session. 

How can this requirement be addressed elegantly in all three tiers: web 
(wicket), service, and database, plus the domain objects?

Any input or pointer is really appreciated.

All the best.


P.S. I played with the Locale selection example in the WIA book. It seems the 
options values in different languages are stored text files. Correct?





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



Re: Design of Locale-aware dropdown list?

2010-03-12 Thread Igor Vaynberg
the code to wire this in wicket is straight forward. i can think of
two major flavors:

flavor1: your service retrieves the localized values in which case it
is the model that retrieves the list of choices that is locale aware

add(new dropdownchoice(id, model, new loadabledetachablemodel() { list
load() { return
service.getchoicesforlocale(getsession().getlocale())

flavor2: your entities are locale aware in which case you would use
the choice renderer to localize

add(new dropdownchoice(id, model, choicesmodel, new ichoicerenderer() {
   string getdisplayvalue(choice c) { return
c.getname(getsession().getlocale());...

all this ultimately depends on how your data is stored in the database
and what the service layer to access it looks like.

-igor

On Fri, Mar 12, 2010 at 9:05 PM, David Chang david_q_zh...@yahoo.com wrote:
 This question may be beyond Wicket’s scope but I would like to ask folks 
 here. I am impressed by their creativity, capability, and passion.

 I need to display a dropdown list which is in English or Korean. The options 
 of the dropdown list MUST be stored in database. It switches between English 
 and Korean depending on the locale in the session.

 How can this requirement be addressed elegantly in all three tiers: web 
 (wicket), service, and database, plus the domain objects?

 Any input or pointer is really appreciated.

 All the best.


 P.S. I played with the Locale selection example in the WIA book. It seems the 
 options values in different languages are stored text files. Correct?





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



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