Re: How to add cookies to WicketTester?

2008-11-28 Thread Marcus Mattila
Please note this bug in WicketTester cookie handling

https://issues.apache.org/jira/browse/WICKET-1886

-Marcus


On Fri, Nov 28, 2008 at 2:30 PM, Vit Rozkovec <[EMAIL PROTECTED]> wrote:
>
> Hallo,
> I think it should work with one of those methods:
>
> public final Page startPage(final ITestPageSource testPageSource)
> public final Page startPage(final Page page)
> instead of wicketTester.startPage(FooPage.class);
>
> and also you should use wicket tester's request for adding cookies:
> wicketTester.getServletRequest()
>
> have not tried it though.
>
> Vitek
>
>
> Peter Gardfjell wrote:
>>
>> Hi all,
>>
>> does anyone know of some easy way of adding cookies to WicketTester prior
>> to
>> having it visit page?
>>
>> That is something along the line of
>>
>>WicketTester wicketTester = new WicketTester(new
>> MyApplication());
>>Cookie cookie = new Cookie("name", "value");
>>/*
>>... insert code for adding cookie to request here ...
>>*/
>>wicketTester.startPage(FooPage.class);
>>wicketTester.assertRenderedPage(FooPage.class);
>>
>> regards, Peter
>>
>
>
> -
> 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: Problem with Crypted URL

2008-11-28 Thread Marcus Mattila
We are also getting this when sessions expire. No big deal but would
still like a fix. Will it be fixed in the 1.3.x branch also? Pls make
it :)

br,
Marcus


On Mon, Nov 24, 2008 at 7:30 PM, francisco treacy
<[EMAIL PROTECTED]> wrote:
> johan, i'm not sure i understand correctly.
>
> you mean that it should have been in 1.4-rc1 but it is not?  so i
> could expect this to be fixed in 1.4-rc2 or 1.4 final?
>
> francisco
>
> On Mon, Nov 24, 2008 at 5:22 PM, Johan Compagner <[EMAIL PROTECTED]> wrote:
>> hmm weird, wasnt merged yet with 4.1
>> thought i did that with the big merge.
>>
>> On Mon, Nov 24, 2008 at 10:57 AM, francisco treacy <
>> [EMAIL PROTECTED]> wrote:
>>
>>> i updated to rc1 i'm still getting stacktraces in logs with
>>> CryptedUrlWebRequestCodingStrategy
>>>
>>>
>>> ERROR 2008-11-23 13:52:17,964 [http-8080-Processor25] Invalid URL:
>>> ?x=5M5HhZnN1b1LpMPMBO5Pmr*YBxchBZCmSdUDJCdEYzUOOBDF1Zr0DA
>>> org.apache.wicket.WicketRuntimeException: Unable to decrypt the text
>>> '??G?K???^D?O???^G^W!^E??I?^C$'Dc5^N8^P^L'
>>> at
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:145)
>>>at
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:67)
>>>at
>>> org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.decodeURL(CryptedUrlWebRequestCodingStrategy.java:256)
>>> at
>>> org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.decode(CryptedUrlWebRequestCodingStrategy.java:99)
>>> at org.apache.wicket.Request.getRequestParameters(Request.java:172)
>>> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
>>>at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
>>>at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
>>>at
>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:444)
>>>at
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
>>>at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>>>at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>at
>>> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
>>>at
>>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>>>at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>>>at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>>>at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>>at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>>at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>>>at
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>>>at
>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>>>at
>>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>>>at
>>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>>>at
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>>>at java.lang.Thread.run(Thread.java:619)
>>> Caused by: javax.crypto.BadPaddingException: Given final block not
>>> properly padded
>>>at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
>>>at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
>>>at com.sun.crypto.provider.SunJCE_ab.b(DashoA13*..)
>>>at
>>> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(DashoA13*..)
>>>at javax.crypto.Cipher.doFinal(DashoA13*..)
>>>at
>>> org.apache.wicket.util.crypt.SunJceCrypt.crypt(SunJceCrypt.java:101)
>>>at
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:141)
>>>... 27 more
>>> ERROR 2008-11-23 13:52:17,966 [http-8080-Processor25] Invalid URL
>>> Invalid URL
>>>at
>>> org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.onError(CryptedUrlWebRequestCodingStrategy.java:279)
>>>at
>>> org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.onError(CryptedUrlWebRequestCodingStrategy.java:286)
>>>at
>>> org.apache.wicket.protocol.http.request.CryptedU

Re: Why don't I get onSubmit() for my form?

2008-11-11 Thread Marcus Mattila
> Any tips for me?  I feel like I'm missing something really simple...

Override the Form's onError() -method, to check whether there's a
validation error you haven't noticed.

-Marcus

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



Re: when to save shopping basket for registered and anonymous users?

2008-06-12 Thread Marcus Mattila
Hi!

Simply because I don't want to do an if - else everytime an Object is
added to the Basket. Basket can consist of many different Domain
Objects.

-Marcus


On Wed, Jun 11, 2008 at 10:51 PM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> Why do you want to save the basket at a specific technical occurrence
> such as .detach?
>
> If you want, you can always persist changes for a "registered" user
> and on the other hand "never" persist them for "anonymous" users.
>
> Whenever the anonymous user becomes "registered" -> the basket is persisted.
>
> **
> Martin
>
> 2008/6/11 Marcus Mattila <[EMAIL PROTECTED]>:
>> Hi!
>>
>> We are developing a shopping basket in our Wicket application. We
>> would like to persist the basket as late as possible, and for
>> anonymous users only if they sign up to the service. We don't want to
>> save lots of anonymous Baskets to the database. We use Wicket 1.3.3
>> and Databinder (as a Hibernate "bridge"). What would be a good save
>> point for the Basket-object?
>>
>> One potential solution is this:
>> Override Session.detach() and save Basket there, if user is registered
>> and Basket is dirty..
>> If user is anonymous, save when user has signed up and the User
>> -domain object is created.
>>
>> Possibly in the next version:
>> For anonymous users, create a cookiebased solution Amazon-style.
>>
>> Any glaring holes in our solution? Other ways of fulfilling this need?
>>
>> br,
>> Marcus
>>
>> -
>> 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]



when to save shopping basket for registered and anonymous users?

2008-06-11 Thread Marcus Mattila
Hi!

We are developing a shopping basket in our Wicket application. We
would like to persist the basket as late as possible, and for
anonymous users only if they sign up to the service. We don't want to
save lots of anonymous Baskets to the database. We use Wicket 1.3.3
and Databinder (as a Hibernate "bridge"). What would be a good save
point for the Basket-object?

One potential solution is this:
Override Session.detach() and save Basket there, if user is registered
and Basket is dirty..
If user is anonymous, save when user has signed up and the User
-domain object is created.

Possibly in the next version:
For anonymous users, create a cookiebased solution Amazon-style.

Any glaring holes in our solution? Other ways of fulfilling this need?

br,
Marcus

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



Re: AutoCompleteTextField scrolls entire page

2008-06-08 Thread Marcus Mattila
Hi, we have reproduced the same problem with AutocompleteTextfield. We
use 1.3-SNAPSHOT. Did you get it solved?

Code and css we use is same as in Wicket Examples:
http://www.wicket-library.com/wicket-examples/ajax/?wicket:interface=sources:0:filespanel:file:2:link::ILinkListener::


br,
Marcus


On Sat, Jun 7, 2008 at 12:02 AM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> I am seeing the following problem with several AutoCompleteTextFields on
> different pages:
>
>
>
> When I type a letter and the menu items are showing I am unable to
> scroll down the list with my mouse and make a selection. What happens
> instead is that the page scrolls up towards the mouse and the
> Autocomplete plus the menu scrolls out of view.
>
>
>
> Again, two developers here have the same problem with two separate
> implementations/pages. So, I am fairly sure this has nothing to do with
> the way we integrated it. My first guess would be the style sheet, but
> we have not made any pertinent changes.
>
>
>
> Any help would be appreciated - this behavior is being encountered on
> Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
> 'type mismatch' error message. Safari on Windows doesn't do anything - I
> don't see a menu at all.
>
>
>
> Thanks,
>
>
>
> Michael
>
>

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



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Marcus Mattila
> generics for formcomponents do not make sense, most of the time they
> can figure out the type by inspecting their model. further, generics
> did not get rid of the need to specify the type as a constructor
> argument: new TextField("num", Integer.class)

Agreed.

+1 for NOT generifying everything, because most components are "set it
and forget it" => generifying everything is unnecessary clutter.

I will continue to use Wicket whatever is decided, though :)

-Marcus

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



Ajax problem with RequiredTextField in IE6/7

2008-03-16 Thread Marcus Mattila
Martijn, you're right. Probably not so thankful to fix bugs if people
then uses old versions and complain :). Ok, I tried in 1.3.2 and get
the same problem with IE. Problem seems to be Ajax. Before changing
language
in my app, everything works fine and inputting data to a field
generates the following in Wicket Ajax Debug Window:

INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:3:xyzQuestionnaireForm:customerInfo:contactInfo:streetaddress::IBehaviorListener:0:&random=0.202408963724586
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (1897 characters)
INFO:

INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: last focus id was not set

After changing language, the Ajax request does not launch. Obviously,
something is messing up it up. Problem is only with IE, Firefox works
fine. Any ideas?

Thanks!

-Marcus


On Sun, Mar 16, 2008 at 4:35 PM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> Update first, ask questions later. There are roughly 300 issues solved
>  between your version and 1.3.2.
>
>  Martijn
>
>
>
>  On 3/16/08, Marcus Mattila <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  >  strange problem: when changing language in my app which is a Form done
>  >  with Wicket 1.3.0-RC1, the Models loose their values when the browser
>  >  is IE6/7. With Firefox everything is ok.
>  >
>  >  Component streetaddress = 
> get("customerInfo"+":contactInfo"+":streetaddress");
>  >  String modelAsString = streetaddress.getModelObjectAsString();
>  >
>  >  This String is empty ("") when using IE6/7 but in FF it contains the
>  >  correct value. Is there a bug, should I update Wicket to fix this
>  >  issue?
>  >
>  >  br,
>  >  Marcus
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  --
>  Buy Wicket in Action: http://manning.com/dashorst
>  Apache Wicket 1.3.1 is released
>  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
>
>  -
>  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]



Models loosing their values problem with IE6/7 and Wicket 1.3.0-RC1

2008-03-16 Thread Marcus Mattila
Hi,

strange problem: when changing language in my app which is a Form done
with Wicket 1.3.0-RC1, the Models loose their values when the browser
is IE6/7. With Firefox everything is ok.

Component streetaddress = get("customerInfo"+":contactInfo"+":streetaddress");
String modelAsString = streetaddress.getModelObjectAsString();

This String is empty ("") when using IE6/7 but in FF it contains the
correct value. Is there a bug, should I update Wicket to fix this
issue?

br,
Marcus

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



unsubscribe

2008-02-16 Thread Marcus Mattila
unsubscribe