Re: CryptoMapper - Error decoding text

2011-11-12 Thread Phill
https://issues.apache.org/jira/browse/WICKET-4222

On 12/nov/2011, at 23:33, Igor Vaynberg wrote:

> go ahead and create a quickstart and stick it into a jira.
> 
> thanks,
> -igor
> 
> On Sat, Nov 12, 2011 at 11:30 AM, Phill  wrote:
>> I have now, same problem:
>> 
>> INFO  - WebApplication - [wicket.cryptest] Started Wicket 
>> version 1.5.3 in DEVELOPMENT mode
>> 
>> *** WARNING: Wicket is running in DEVELOPMENT mode.  ***
>> ***   ^^^***
>> *** Do NOT deploy to your live server(s) without changing this.  ***
>> *** See Application#getConfigurationType() for more information. ***
>> 
>> 2011-11-12 20:27:59.244:INFO:oejs.AbstractConnector:Started 
>> SelectChannelConnector@0.0.0.0:8080 STARTING
>> 2011-11-12 20:27:59.435:INFO:oejs.AbstractConnector:Started 
>> SslSocketConnector@0.0.0.0:8443 STARTING
>> [INFO] Started Jetty Server
>> ERROR - AbstractCrypt  - Error decoding text: logo.png
>> java.lang.RuntimeException: Unable to decrypt the text '??(?x'
>>at 
>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
>>at 
>> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
>>at 
>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
>>at 
>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>> 
>> Phill

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



Re: DI in wicket

2011-11-12 Thread vela
Hi,

Just like to use DAO pattern with Spring in wicket. If any other link for
references would be of great help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DI-in-wicket-tp3824880p4036039.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: CryptoMapper - Error decoding text

2011-11-12 Thread Igor Vaynberg
go ahead and create a quickstart and stick it into a jira.

thanks,
-igor

On Sat, Nov 12, 2011 at 11:30 AM, Phill  wrote:
> I have now, same problem:
>
> INFO  - WebApplication             - [wicket.cryptest] Started Wicket version 
> 1.5.3 in DEVELOPMENT mode
> 
> *** WARNING: Wicket is running in DEVELOPMENT mode.              ***
> ***                               ^^^                    ***
> *** Do NOT deploy to your live server(s) without changing this.  ***
> *** See Application#getConfigurationType() for more information. ***
> 
> 2011-11-12 20:27:59.244:INFO:oejs.AbstractConnector:Started 
> SelectChannelConnector@0.0.0.0:8080 STARTING
> 2011-11-12 20:27:59.435:INFO:oejs.AbstractConnector:Started 
> SslSocketConnector@0.0.0.0:8443 STARTING
> [INFO] Started Jetty Server
> ERROR - AbstractCrypt              - Error decoding text: logo.png
> java.lang.RuntimeException: Unable to decrypt the text '??(?x'
>        at 
> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
>        at 
> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
>        at 
> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
>        at 
> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>
> Phill
>
> On 12/nov/2011, at 19:33, Igor Vaynberg wrote:
>
>> have you tried with 1.5.3?
>>
>> -gior
>>
>> On Sat, Nov 12, 2011 at 10:27 AM, Phill  wrote:
>>> Thanks, I had put setRootRequestMapper(..) first after reading 
>>> https://issues.apache.org/jira/browse/WICKET-4139
>>> However putting it last does not seem to solve the problem, I can replicate 
>>> the error with a pristine 1.5.2 quickstart and just changing the init() to:
>>>
>>> public void init() {
>>>    super.init();
>>>    getSecuritySettings().setCryptFactory(new 
>>> KeyInSessionSunJceCryptFactory());
>>>    setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>>> }
>>>
>>> The links in the standard quickstart HomePage.html markup cause the 
>>> exceptions.
>>> Phill
>
> -
> 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: AW: AW: DropDownChoice model is not updated when wantOnSelectionChangedNotifications is overriden

2011-11-12 Thread Sven Meier

Hi,

>>setResponsePage(FormInput.class);
> all the model values are reset to default including my
> selectbox model value...is this normal?

yes, a new instance of the page will be created.


 I checked the FormInput example..The only difference ...



You should provide a quickstart, so we are able to check what you're 
doing differently.


Best regards
Sven

On 11/12/2011 05:17 PM, wholalotta wrote:

Yes I checked the FormInput example..The only difference is that example has
custem dropwdown component which stated in the same class..Also it uses the
following in onSelectionChanged method..

// force re-render by setting the page to render to the bookmarkable
// instance, so that the page will be rendered from scratch,
// re-evaluating the input patterns etc
setResponsePage(FormInput.class);

When I put this line into my code, it renders the all page and all the model
values are reset to default including my selectbox model value...is this
normal?


The point is, I used dropdown component hundred times in the forms and didnt
face any problem like this.
Because I did not need to override any methods to do some job after
selecting something..This is the first time I didnt attach this component to
a form...If I remove these two overriden methods, selectbox model value is
updated in all selections accordingly..



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-model-is-not-updated-when-wantOnSelectionChangedNotifications-is-overriden-tp4031368p4034763.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: CryptoMapper - Error decoding text

2011-11-12 Thread Phill
I have now, same problem:

INFO  - WebApplication - [wicket.cryptest] Started Wicket version 
1.5.3 in DEVELOPMENT mode

*** WARNING: Wicket is running in DEVELOPMENT mode.  ***
***   ^^^***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***

2011-11-12 20:27:59.244:INFO:oejs.AbstractConnector:Started 
SelectChannelConnector@0.0.0.0:8080 STARTING
2011-11-12 20:27:59.435:INFO:oejs.AbstractConnector:Started 
SslSocketConnector@0.0.0.0:8443 STARTING
[INFO] Started Jetty Server
ERROR - AbstractCrypt  - Error decoding text: logo.png
java.lang.RuntimeException: Unable to decrypt the text '??(?x'
at 
org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
at 
org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
at 
org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
at 
org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)

Phill

On 12/nov/2011, at 19:33, Igor Vaynberg wrote:

> have you tried with 1.5.3?
> 
> -gior
> 
> On Sat, Nov 12, 2011 at 10:27 AM, Phill  wrote:
>> Thanks, I had put setRootRequestMapper(..) first after reading 
>> https://issues.apache.org/jira/browse/WICKET-4139
>> However putting it last does not seem to solve the problem, I can replicate 
>> the error with a pristine 1.5.2 quickstart and just changing the init() to:
>> 
>> public void init() {
>>super.init();
>>getSecuritySettings().setCryptFactory(new 
>> KeyInSessionSunJceCryptFactory());
>>setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>> }
>> 
>> The links in the standard quickstart HomePage.html markup cause the 
>> exceptions.
>> Phill

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



Re: CryptoMapper - Error decoding text

2011-11-12 Thread Igor Vaynberg
have you tried with 1.5.3?

-gior

On Sat, Nov 12, 2011 at 10:27 AM, Phill  wrote:
> Thanks, I had put setRootRequestMapper(..) first after reading 
> https://issues.apache.org/jira/browse/WICKET-4139
> However putting it last does not seem to solve the problem, I can replicate 
> the error with a pristine 1.5.2 quickstart and just changing the init() to:
>
> public void init() {
>    super.init();
>    getSecuritySettings().setCryptFactory(new 
> KeyInSessionSunJceCryptFactory());
>    setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> }
>
> The links in the standard quickstart HomePage.html markup cause the 
> exceptions.
> Phill
>
> On 12/nov/2011, at 18:39, Igor Vaynberg wrote:
>
>> this:
>>
>> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>>
>> should be the last thing you do in your application#init()
>>
>> -igor
>>
>> On Sat, Nov 12, 2011 at 6:45 AM, Phill  wrote:
>>> Hi,
>>> I'm migrating a Wicket 1.4 app that uses CryptedUrlWebRequestCodingStrategy 
>>> to 1.5.2 and I'm having some issues:
>>>
>>> In my Application init() before I mount any pages I've got:
>>> getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory());
>>> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>>>
>>> Any non-wicket URLs in my markup, for example image tags >> src="/images/myimg.jpg" …./> and also any references added in 
>>> WebPage.renderHead() produce the exception below. The page displays fine 
>>> including correctly linked images and stylesheets, but the exception is 
>>> thrown.
>>>
>>> @Override
>>> public void renderHead(IHeaderResponse response) {
>>>    super.renderHead(response);
>>>    response.renderCSSReference("css/style.css");
>>> }
>>>
>>>
>>> ERROR - AbstractCrypt              - Error decoding text: css
>>> java.lang.RuntimeException: Unable to decrypt the text 'r?'
>>>        at 
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
>>>        at 
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>>>        at 
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
>>> ..snip
>>> Caused by: javax.crypto.IllegalBlockSizeException: Input length must be 
>>> multiple of 8 when decrypting with padded cipher
>>>        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:94)
>>>        at 
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:146)
>>>        ... 32 more
>>> ERROR - CryptoMapper               - Error decrypting URL
>>> java.lang.IllegalArgumentException: Argument 'url' may not be null.
>>>        at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
>>>        at org.apache.wicket.request.Url.parse(Url.java:127)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:160)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>>> ..snip
>>>
>>> How can I avoid these errors?
>>>
>>> Thanks
>>> Phill
>>>
>>>
>>> ---
>>> Lead Seeker - Lead Generation Done Right
>>> http://www.leadseeker.co.uk
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> ---

Re: CryptoMapper - Error decoding text

2011-11-12 Thread Phill
Thanks, I had put setRootRequestMapper(..) first after reading 
https://issues.apache.org/jira/browse/WICKET-4139
However putting it last does not seem to solve the problem, I can replicate the 
error with a pristine 1.5.2 quickstart and just changing the init() to:

public void init() {
super.init();
getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory());
setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
}

The links in the standard quickstart HomePage.html markup cause the exceptions.
Phill

On 12/nov/2011, at 18:39, Igor Vaynberg wrote:

> this:
> 
> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> 
> should be the last thing you do in your application#init()
> 
> -igor
> 
> On Sat, Nov 12, 2011 at 6:45 AM, Phill  wrote:
>> Hi,
>> I'm migrating a Wicket 1.4 app that uses CryptedUrlWebRequestCodingStrategy 
>> to 1.5.2 and I'm having some issues:
>> 
>> In my Application init() before I mount any pages I've got:
>> getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory());
>> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>> 
>> Any non-wicket URLs in my markup, for example image tags > src="/images/myimg.jpg" …./> and also any references added in 
>> WebPage.renderHead() produce the exception below. The page displays fine 
>> including correctly linked images and stylesheets, but the exception is 
>> thrown.
>> 
>> @Override
>> public void renderHead(IHeaderResponse response) {
>>super.renderHead(response);
>>response.renderCSSReference("css/style.css");
>> }
>> 
>> 
>> ERROR - AbstractCrypt  - Error decoding text: css
>> java.lang.RuntimeException: Unable to decrypt the text 'r?'
>>at 
>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
>>at 
>> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
>>at 
>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
>>at 
>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>>at 
>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>>at 
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>>at 
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>>at 
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>>at 
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>>at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
>> ..snip
>> Caused by: javax.crypto.IllegalBlockSizeException: Input length must be 
>> multiple of 8 when decrypting with padded cipher
>>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:94)
>>at 
>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:146)
>>... 32 more
>> ERROR - CryptoMapper   - Error decrypting URL
>> java.lang.IllegalArgumentException: Argument 'url' may not be null.
>>at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
>>at org.apache.wicket.request.Url.parse(Url.java:127)
>>at 
>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:160)
>>at 
>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>>at 
>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>>at 
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>>at 
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>>at 
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>>at 
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>> ..snip
>> 
>> How can I avoid these errors?
>> 
>> Thanks
>> Phill
>> 
>> 
>> ---
>> Lead Seeker - Lead Generation Done Right
>> http://www.leadseeker.co.uk
>> 
>> 
>> 
>> -
>> 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: CryptoMapper - Error decoding text

2011-11-12 Thread Igor Vaynberg
this:

setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));

should be the last thing you do in your application#init()

-igor

On Sat, Nov 12, 2011 at 6:45 AM, Phill  wrote:
> Hi,
> I'm migrating a Wicket 1.4 app that uses CryptedUrlWebRequestCodingStrategy 
> to 1.5.2 and I'm having some issues:
>
> In my Application init() before I mount any pages I've got:
> getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory());
> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>
> Any non-wicket URLs in my markup, for example image tags  src="/images/myimg.jpg" …./> and also any references added in 
> WebPage.renderHead() produce the exception below. The page displays fine 
> including correctly linked images and stylesheets, but the exception is 
> thrown.
>
> @Override
> public void renderHead(IHeaderResponse response) {
>    super.renderHead(response);
>    response.renderCSSReference("css/style.css");
> }
>
>
> ERROR - AbstractCrypt              - Error decoding text: css
> java.lang.RuntimeException: Unable to decrypt the text 'r?'
>        at 
> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
>        at 
> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
>        at 
> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
>        at 
> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>        at 
> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>        at 
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>        at 
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>        at 
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>        at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>        at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
> ..snip
> Caused by: javax.crypto.IllegalBlockSizeException: Input length must be 
> multiple of 8 when decrypting with padded cipher
>        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:94)
>        at 
> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:146)
>        ... 32 more
> ERROR - CryptoMapper               - Error decrypting URL
> java.lang.IllegalArgumentException: Argument 'url' may not be null.
>        at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
>        at org.apache.wicket.request.Url.parse(Url.java:127)
>        at 
> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:160)
>        at 
> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>        at 
> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>        at 
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>        at 
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>        at 
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>        at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
> ..snip
>
> How can I avoid these errors?
>
> Thanks
> Phill
>
>
> ---
> Lead Seeker - Lead Generation Done Right
> http://www.leadseeker.co.uk
>
>
>
> -
> 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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler (2)

2011-11-12 Thread hfriederichs
I solved the issue by many trial and error sessions. Maybe I can spare
someone else this ordeal.

In Firefox an Chrome it now works as in IE, by adding this statement in the
init() of my WicketApplication:

getResourceSettings().setDefaultCacheDuration(Duration.NONE);

Regards, Hans Friederichs

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-2-tp4019661p4034881.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: AW: AW: DropDownChoice model is not updated when wantOnSelectionChangedNotifications is overriden

2011-11-12 Thread wholalotta
Yes I checked the FormInput example..The only difference is that example has
custem dropwdown component which stated in the same class..Also it uses the
following in onSelectionChanged method..

// force re-render by setting the page to render to the bookmarkable
// instance, so that the page will be rendered from scratch,
// re-evaluating the input patterns etc
setResponsePage(FormInput.class);

When I put this line into my code, it renders the all page and all the model
values are reset to default including my selectbox model value...is this
normal?


The point is, I used dropdown component hundred times in the forms and didnt
face any problem like this.
Because I did not need to override any methods to do some job after
selecting something..This is the first time I didnt attach this component to
a form...If I remove these two overriden methods, selectbox model value is
updated in all selections accordingly..



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-model-is-not-updated-when-wantOnSelectionChangedNotifications-is-overriden-tp4031368p4034763.html
Sent from the Users forum mailing list archive at Nabble.com.

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



CryptoMapper - Error decoding text

2011-11-12 Thread Phill
Hi,
I'm migrating a Wicket 1.4 app that uses CryptedUrlWebRequestCodingStrategy to 
1.5.2 and I'm having some issues:

In my Application init() before I mount any pages I've got:
getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory());
setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));

Any non-wicket URLs in my markup, for example image tags  and also any references added in 
WebPage.renderHead() produce the exception below. The page displays fine 
including correctly linked images and stylesheets, but the exception is thrown.

@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderCSSReference("css/style.css");
}


ERROR - AbstractCrypt  - Error decoding text: css
java.lang.RuntimeException: Unable to decrypt the text 'r?'
at 
org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
at 
org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
at 
org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
at 
org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
at 
org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
..snip
Caused by: javax.crypto.IllegalBlockSizeException: Input length must be 
multiple of 8 when decrypting with padded cipher
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:94)
at 
org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:146)
... 32 more
ERROR - CryptoMapper   - Error decrypting URL
java.lang.IllegalArgumentException: Argument 'url' may not be null.
at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
at org.apache.wicket.request.Url.parse(Url.java:127)
at 
org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:160)
at 
org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
at 
org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
..snip

How can I avoid these errors?

Thanks
Phill


---
Lead Seeker - Lead Generation Done Right
http://www.leadseeker.co.uk



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



Re: Model isn't updated on AJAX submit link invocation

2011-11-12 Thread Станислав Савульчик
Hi,

The form components aren't updated because form processing for AjaxSubmitLink 
is set to false.
See the javadoc for AjaxSubmitLink#setDefaultFormProcessing.

BTW, when using ListView for rendering form components consider reading WARNING 
section in javadoc for ListView class.

- Исходное сообщение -
От: "Sebastian80" 
Кому: users@wicket.apache.org
Отправленные: Суббота, 12 Ноябрь 2011 г 17:46:51
Тема: Model isn't updated on AJAX submit link invocation

Hi there,

I'm trying to implement an AJAXfied Wicket list view. On my research I
stumbled upon the code on
http://www.oktech.hu/kb/adding-and-removing-rows-wicket-listview-via-ajax
and modified it a bit.

The model is not updated properly. So whenever a value is entered in a text
field, it is forgotten if the AJAX submit link is invoked (the text field is
empty again). Why does this happen? I don't see any issue with this code.
Wicket version is 1.5.2.

Here is the Java code:

// Initialization of form
...

// List all rows
ArrayList rows = new ArrayList(2);
rows.add(new String());
rows.add(new String());

final ListView lv = new ListView("rows", rows) {
@Override
protected void populateItem(ListItem item) {
int index = item.getIndex() + 1;
item.add(new Label("index", index + "."));

TextField text = new TextField("text",
item.getModel());
item.add(text);
}
};
rowPanel.add(lv);

AjaxSubmitLink addLink = new AjaxSubmitLink("addRow", form) {

@Override
protected void onError(AjaxRequestTarget target, Form form) {
if (target != null) target.add(rowPanel);
}

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
lv.getModelObject().add(new String());
if (target != null) target.add(rowPanel);
}
};
addLink.setDefaultFormProcessing(false);
rowPanel.add(addLink);
...

And the associated mark up:


1.


 # Add row


Has someone any idea on this issue? I'm completely stuck on this issue.
Thanks in advance.

Best regards,
Sebastian

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-isn-t-updated-on-AJAX-submit-link-invocation-tp4034095p4034095.html
Sent from the Users forum mailing list archive at Nabble.com.

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


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



Re: DI in wicket

2011-11-12 Thread James Carman
This is a Spring issue, not a Wicket issue.  You're not configuring
Spring correctly.  If you want a working example that uses
Spring/Hibernate, you can try Wicketopia's example application.  It
has everything configured correctly out of the box.

http://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example
(wicket 1.4 version)
https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/branches/wicketopia15main/example/
(wicket 1.5 version)

Hope that helps.

On Sat, Nov 12, 2011 at 1:26 AM, vela  wrote:
> Hi,
>
> Kindly find the stack trace below
>
>
> Root cause:java.lang.NullPointerException     at
> sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)     at
> sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)     at
> sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)     at
> java.sql.DriverManager.getDriver(Unknown Source)     at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
> at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
> at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
> at
> org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:202)
> at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
> at
> com.mycorp.chicago.user.JdbcUserDao$$EnhancerByCGLIB$$d2eaa8de.test()
> at java.lang.reflect.Method.invoke(Unknown Source)     at
> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
> at org.apache.wicket.proxy.$Proxy5.test(Unknown Source)     at
> com.wicket.pages.IndexPage.(IndexPage.java:20)     at
> java.lang.reflect.Constructor.newInstance(Unknown Source)     at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:177)
> at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:68)
> at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:101)
> at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
> at
> org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:107)
> at
> org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:263)
> at
> org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:164)
> at
> org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
> at
> org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
> at
> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
> at
> org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:147)
> at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:712)
> at
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:208)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:251)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)

Model isn't updated on AJAX submit link invocation

2011-11-12 Thread Sebastian80
Hi there,

I'm trying to implement an AJAXfied Wicket list view. On my research I
stumbled upon the code on
http://www.oktech.hu/kb/adding-and-removing-rows-wicket-listview-via-ajax
and modified it a bit.

The model is not updated properly. So whenever a value is entered in a text
field, it is forgotten if the AJAX submit link is invoked (the text field is
empty again). Why does this happen? I don't see any issue with this code.
Wicket version is 1.5.2.

Here is the Java code:

// Initialization of form
...

// List all rows
ArrayList rows = new ArrayList(2);
rows.add(new String());
rows.add(new String());

final ListView lv = new ListView("rows", rows) {
@Override
protected void populateItem(ListItem item) {
int index = item.getIndex() + 1;
item.add(new Label("index", index + "."));

TextField text = new TextField("text",
item.getModel());
item.add(text);
}
};
rowPanel.add(lv);

AjaxSubmitLink addLink = new AjaxSubmitLink("addRow", form) {

@Override
protected void onError(AjaxRequestTarget target, Form form) {
if (target != null) target.add(rowPanel);   
}

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
lv.getModelObject().add(new String());
if (target != null) target.add(rowPanel);
}
};
addLink.setDefaultFormProcessing(false);
rowPanel.add(addLink);
...

And the associated mark up:


1.


 # Add row 


Has someone any idea on this issue? I'm completely stuck on this issue.
Thanks in advance.

Best regards,
Sebastian 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-isn-t-updated-on-AJAX-submit-link-invocation-tp4034095p4034095.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: AW: AW: DropDownChoice model is not updated when wantOnSelectionChangedNotifications is overriden

2011-11-12 Thread Sven Meier

Have you taken a look at org.apache.wicket.examples.forminput.FormInput ?

On 11/12/2011 10:23 AM, wholalotta wrote:

Any suggestion?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-model-is-not-updated-when-wantOnSelectionChangedNotifications-is-overriden-tp4031368p4033965.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: AW: AW: DropDownChoice model is not updated when wantOnSelectionChangedNotifications is overriden

2011-11-12 Thread wholalotta
Any suggestion?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-model-is-not-updated-when-wantOnSelectionChangedNotifications-is-overriden-tp4031368p4033965.html
Sent from the Users forum mailing list archive at Nabble.com.

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