setting response parameters in wicket 6

2014-01-31 Thread chathuraka.waas
Hi,

i'm trying to migrate my application from 1.4 to 6 and stuck in a problem. 

the current code for setting content type and other parameters for response
is, 

requestCycle.getResponse().setContentType("application/json");
requestCycle.getResponse().setCharacterEncoding("UTF-8");
requestCycle.getResponse().setContentLength(authUrl.length());

and in wicket 6 it seems response doesnt have those methods. how can i
achieve this in wicket 6. 

thanks in advance. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084.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: setting response parameters in wicket 6

2014-01-31 Thread Francois Meillet
try that ((WebResponse) 
requestCycle.getResponse()).setContentType("application/json");

François Meillet
Formation Wicket - Développement Wicket





Le 31 janv. 2014 à 09:17, "chathuraka.waas"  a écrit 
:

> Hi,
> 
> i'm trying to migrate my application from 1.4 to 6 and stuck in a problem. 
> 
> the current code for setting content type and other parameters for response
> is, 
> 
> requestCycle.getResponse().setContentType("application/json");
> requestCycle.getResponse().setCharacterEncoding("UTF-8");
> requestCycle.getResponse().setContentLength(authUrl.length());
> 
> and in wicket 6 it seems response doesnt have those methods. how can i
> achieve this in wicket 6. 
> 
> thanks in advance. 
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084.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: onchange event always being fired before onclick event

2014-01-31 Thread Martin Grigorov
Hi,

Wicket tries to preserve the focus on the the last focused element -
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L2465
So it should work out of the box.

What is the type of the element you try to focus ? input, select, div, ... ?

Martin Grigorov
Wicket Training and Consulting


On Thu, Jan 30, 2014 at 8:15 PM, Rafael Barrera Oro wrote:

> Hello everyone!
>
> I'm trying to to mantain the focus of the last component that was clicked
> regardless of the refresh of part of the page when certain text field
> changes. The problem i have is that the onchange event is always fired
> before the onclick method, and this causes that the latter is either fired
> over the wrong component or not fired at all, is there a way to delay the
> onchange event until after the onclick event takes place?
>
> My goal is to use the onclick event to save the id of the clicked
> component, then let the onchange event do its thing (refresh a part of the
> page which maybe includes the clicked component).
>
> Has anyone achieved something similiar and/or has any ideas?
>
> Thanks in advance!
> Rafael
>


Re: setting response parameters in wicket 6

2014-01-31 Thread Martin Grigorov
Hi,

As Francois suggested you need WebResponse to see these methods.
Also
check org.apache.wicket.markup.html.WebPage#configureResponse(WebResponse).

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 9:17 AM, chathuraka.waas
wrote:

> Hi,
>
> i'm trying to migrate my application from 1.4 to 6 and stuck in a problem.
>
> the current code for setting content type and other parameters for response
> is,
>
> requestCycle.getResponse().setContentType("application/json");
> requestCycle.getResponse().setCharacterEncoding("UTF-8");
> requestCycle.getResponse().setContentLength(authUrl.length());
>
> and in wicket 6 it seems response doesnt have those methods. how can i
> achieve this in wicket 6.
>
> thanks in advance.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084.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: setting response parameters in wicket 6

2014-01-31 Thread chathuraka.waas
Hi,

thanks for the replies. 

((WebResponse)
requestCycle.getResponse()).setContentType("application/json"); did resolve
the compiler issues. 

but i cant find a setCharacterEncoding("UTF-8"); method in web response. is
there a way to handle this.


Thanks and regards,

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084p4664088.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: setting response parameters in wicket 6

2014-01-31 Thread Martin Grigorov
response.setContentType("text/xml; charset=" + encoding);

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 9:48 AM, chathuraka.waas
wrote:

> Hi,
>
> thanks for the replies.
>
> ((WebResponse)
> requestCycle.getResponse()).setContentType("application/json"); did resolve
> the compiler issues.
>
> but i cant find a setCharacterEncoding("UTF-8"); method in web response. is
> there a way to handle this.
>
>
> Thanks and regards,
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084p4664088.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: setting response parameters in wicket 6

2014-01-31 Thread chathuraka.waas
Thanks for reply guys.


On Fri, Jan 31, 2014 at 2:25 PM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n4664089...@n4.nabble.com> wrote:

> response.setContentType("text/xml; charset=" + encoding);
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Fri, Jan 31, 2014 at 9:48 AM, chathuraka.waas
> <[hidden email] >wrote:
>
>
> > Hi,
> >
> > thanks for the replies.
> >
> > ((WebResponse)
> > requestCycle.getResponse()).setContentType("application/json"); did
> resolve
> > the compiler issues.
> >
> > but i cant find a setCharacterEncoding("UTF-8"); method in web response.
> is
> > there a way to handle this.
> >
> >
> > Thanks and regards,
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084p4664088.html
>
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084p4664089.html
>  To unsubscribe from setting response parameters in wicket 6, click 
> here
> .
> NAML
>



-- 
Thanks & Regards,
Chathuraka Waas


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084p4664090.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: wicket session and wildfly

2014-01-31 Thread Martin Grigorov
Hi,

I think the problem is that JBoss cannot load ObjectId class.
I remember such issues with older versions of JBoss AS.
Ask in JBoss forums and let us know what was the problem.

Martin Grigorov
Wicket Training and Consulting


On Thu, Jan 30, 2014 at 6:15 PM, miguel  wrote:

> i'm running wildfly cr1 and wicket 6.13 in a fairly simple web application
> that uses a subclass of AuthenticatedWebSession that looks a bit like this:
>
>
> public class WebSession extends AuthenticatedWebSession {
> private static final Logger log =
> Logger.getLogger(WebSession.class);
> private static final long serialVersionUID = 3L;
>
> private ObjectId userId;
> transient private User user;
>
> transient private Token twitterToken;
> transient private OAuthService twitterService;
> transient private Token googleToken;
> transient private OAuthService googleService;
> ...
> }
>
> with just the methods taken out.
>
> i find that when i redeploy a different war file -- but the session object
> is unchanged -- sessions on wildfly fail to deserialize. i get the
> following
> error:
>
>
> 2014-01-30 07:18:13,965 ERROR
> [org.infinispan.interceptors.InvocationContextInterceptor]
> (SessionExpirationScheduler - 1) ISPN000136: Execution error:
> org.infinispan.commons.CacheListenerException: ISPN000280: Caught exception
> [java.lang
> .IllegalArgumentException] while invoking method [public void
>
> org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent)]
> on listener instan
> ce:
>
> org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager@288f08b2
> at
>
> org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:211)
> at
>
> org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:22)
> at
>
> org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:229)
> at
>
> org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:192)
> at
>
> org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryActivated(CacheNotifierImpl.java:355)
> at
>
> org.infinispan.interceptors.ActivationInterceptor.sendNotification(ActivationInterceptor.java:109)
> at
>
> org.infinispan.interceptors.CacheLoaderInterceptor.recordLoadedEntry(CacheLoaderInterceptor.java:325)
> at
>
> org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:278)
> at
>
> org.infinispan.interceptors.ActivationInterceptor.loadIfNeeded(ActivationInterceptor.java:86)
> at
>
> org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:335)
> at
>
> org.infinispan.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:105)
> at
>
> org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
> ...
> Caused by: java.lang.IllegalArgumentException:
> java.io.InvalidClassException: com.mypackage.WebSession; Module load failed
> at
>
> org.wildfly.clustering.web.infinispan.session.MarshalledValueSessionAttributeMarshaller.read(MarshalledValueSessionAttributeMarshaller.java:48)
> at
>
> org.wildfly.clustering.web.infinispan.session.MarshalledValueSessionAttributeMarshaller.read(MarshalledValueSessionAttributeMarshaller.java:33)
> at
>
> org.wildfly.clustering.web.infinispan.session.coarse.CoarseImmutableSessionAttributes.getAttributes(CoarseImmutableSessionAttributes.java:46)
> at
>
> org.wildfly.clustering.web.infinispan.session.coarse.CoarseImmutableSessionAttributes.getAttributeNames(CoarseImmutableSessionAttributes.java:51)
> at
>
> org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.findListeners(InfinispanSessionManager.java:381)
> at
>
> org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.triggerPostActivationEvents(InfinispanSessionManager.java:370)
> at
>
> org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.activated(InfinispanSessionManager.java:272)
> at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
> [:1.7.0_25]
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [rt.jar:1.7.0_25]
> at java.lang.reflect.Method.invoke(Method.java:606)
> [rt.jar:1.7.0_25]
> at
>
> org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:207)
> ... 58 more
> Caused by: java.io.InvalidClassException: com.mypackage.WebSession; Module
> load failed
> at
>
> org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:108)

Iterating through the Pageparameters

2014-01-31 Thread chathuraka.waas
Hi,

i'm trying to migrate my application from 1.4 to 6.13. and i was able to
iterate through the parameter list in 1.4 as given below.

for (Map.Entry entry : parameters.entrySet()) {}

but in wicket 6.13 this is not possible. how can this be achieved.

Thanks in advance.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Iterating-through-the-Pageparameters-tp4664093.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



RedirectToUrlException in Wicket 6

2014-01-31 Thread Gereon Steffens
Hi,

I'm currently migrating a project from Wicket 1.5 to Wicket 6.13 and just
noted that RedirectToUrlException behaves differently.
In Wicket 1.5 the onDetach() callbacks get invoked on the components
throwing the exception, in Wicket 6 this does not seem to be the case
anymore.

Is this a bug or a feature?

Gereon


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



Re: RedirectToUrlException in Wicket 6

2014-01-31 Thread Martin Grigorov
Hi,

Can you please give more details ?

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 11:14 AM, Gereon Steffens <
gereon.steff...@finanzen100.de> wrote:

> Hi,
>
> I'm currently migrating a project from Wicket 1.5 to Wicket 6.13 and just
> noted that RedirectToUrlException behaves differently.
> In Wicket 1.5 the onDetach() callbacks get invoked on the components
> throwing the exception, in Wicket 6 this does not seem to be the case
> anymore.
>
> Is this a bug or a feature?
>
> Gereon
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Iterating through the Pageparameters

2014-01-31 Thread Martin Grigorov
org.apache.wicket.request.mapper.parameter.PageParameters#getAllNamed

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 11:01 AM, chathuraka.waas  wrote:

> Hi,
>
> i'm trying to migrate my application from 1.4 to 6.13. and i was able to
> iterate through the parameter list in 1.4 as given below.
>
> for (Map.Entry entry : parameters.entrySet()) {}
>
> but in wicket 6.13 this is not possible. how can this be achieved.
>
> Thanks in advance.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Iterating-through-the-Pageparameters-tp4664093.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: Iterating through the Pageparameters

2014-01-31 Thread chathuraka.waas
hi,

thanks for the reply. got it working.


On Fri, Jan 31, 2014 at 4:02 PM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n4664096...@n4.nabble.com> wrote:

> org.apache.wicket.request.mapper.parameter.PageParameters#getAllNamed
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Fri, Jan 31, 2014 at 11:01 AM, chathuraka.waas <[hidden 
> email]
> > wrote:
>
> > Hi,
> >
> > i'm trying to migrate my application from 1.4 to 6.13. and i was able to
> > iterate through the parameter list in 1.4 as given below.
> >
> > for (Map.Entry entry : parameters.entrySet()) {}
> >
> > but in wicket 6.13 this is not possible. how can this be achieved.
> >
> > Thanks in advance.
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Iterating-through-the-Pageparameters-tp4664093.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Iterating-through-the-Pageparameters-tp4664093p4664096.html
>  To unsubscribe from Iterating through the Pageparameters, click 
> here
> .
> NAML
>



-- 
Thanks & Regards,
Chathuraka Waas


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Iterating-through-the-Pageparameters-tp4664093p4664098.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: RedirectToUrlException in Wicket 6

2014-01-31 Thread Gereon Steffens
Sure.

My stripped-down test page class looks like this:

class MyPage extends WebPage
{
   MyPage(PageParameters pp)
   {
  super(pp);
  throw new RedirectToUrlException("http://example.com";, 302);
   }

   @Override
   public void onDetach()
   {
  super.onDetach();

   }
}

onDetach() gets called in Wicket 1.5, but not in Wicket 6. I didn't find
anything in the migration guide or the release notes on this change, so
I'm wondering if it is intentional.

Gereon

Am 31.01.14 11:29 schrieb "Martin Grigorov" unter :

>Hi,
>
>Can you please give more details ?
>
>Martin Grigorov
>Wicket Training and Consulting
>
>
>On Fri, Jan 31, 2014 at 11:14 AM, Gereon Steffens <
>gereon.steff...@finanzen100.de> wrote:
>
>> Hi,
>>
>> I'm currently migrating a project from Wicket 1.5 to Wicket 6.13 and
>>just
>> noted that RedirectToUrlException behaves differently.
>> In Wicket 1.5 the onDetach() callbacks get invoked on the components
>> throwing the exception, in Wicket 6 this does not seem to be the case
>> anymore.
>>
>> Is this a bug or a feature?
>>
>> Gereon
>>
>>
>> -
>> 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: Announcing DEVdev: the Deventer Developers meetup

2014-01-31 Thread Martijn Dashorst
We had a lot of fun at the DEVdev meetup, and will most certainly continue
hosting these events (though not with a pure Wicket lineup).

For anyone interested in my talk about "The State of Wicket": I have
uploaded the slides and provided inline comments.

http://wicketinaction.com/2014/01/the-state-of-wicket-2014/

You can probably follow the presentation as I gave it using the slides.

Enjoy!

Martijn



On Fri, Jan 10, 2014 at 11:28 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Graag een beige Nederlands te lessen.
>
> Hope presentation slides are in English and will be shared somewhere?
>
>
> On Fri, Jan 10, 2014 at 11:14 AM, Martijn Dashorst <
> martijn.dasho...@gmail.com> wrote:
>
> > We just launched a new meetup in Deventer, the Netherlands: the
> > DEVdev. We intend this to be a general developer oriented meetup that
> > has semi-regular events.
> >
> > We want to kick off the meetup series with a Wicket oriented evening
> > consisting of 3 presentations in dutch (we do plan to invite non-dutch
> > speakers at later events).
> >
> > Since this is a mainly Netherlands oriented event, I will continue
> > this message in dutch, with apologies to our international readers:
> >
> > Op woensdag 30 januari zal er in Deventer de eerste DEVdev meetup
> > plaatsvinden met als hoofdonderwerp Apache Wicket. Het programma:
> >
> > 17:30-18:00 Ontvangst
> > 18:00-18:30 "State of the Wicket"
> > 18:30-19:15 Pizza uit eigen oven
> > 19:15-19:45 Letting Wicket REST
> > 19:45-20:15 Wicket: What else?
> > 20:15-21:00 Afsluitende borrel
> >
> > State of the Wicket - Martijn Dashorst
> > Over het verleden, heden en de toekomst van Apache Wicket, waaronder
> > Wicket 7.
> >
> > Letting Wicket REST
> > Waarom zou je Wicket toepassen in een RESTful-architectuur en hoe zou
> > je het moeten doen?
> >
> > Wicket: What else?
> > Een kleine blik in de Wicket-stuff projecten. Wat zijn leuke, mooie,
> > handige projecten.
> >
> > De presentaties van deze avond worden gegeven in het Nederlands.
> >
> > Je kan registreren voor de meetup op onderstaand adres:
> >
> > http://www.meetup.com/DEVdev-powered-by-Topicus
> >
> > Als je je registreert voor de DEVdev groep ontvang je een
> > welkomstbericht. Je bent dan nog niet aangemeld voor 30 januari-graag
> > RSVP-en. Er zijn zo'n 80 plaatsen beschikbaar, en registratie
> > geschiedt op basis van wie het eerst komt die het eerst maalt...
> >
> > DEVdev wordt gesponsord door Topicus. De pizza, drankjes en de
> > locatie-een oud schoolgebouw recht tegenover het Deventer NS station.
> > Met z'n ligging aan de juiste kant van de IJssel en rijke historie is
> > Deventer een mooie plek om te bezoeken.
> >
> > DEVdev is sponsored by Topicus. They provide the food, drinks and the
> > venue in our new office-an old school-located right across the
> > Deventer train station. Located on the right side of the IJssel river,
> > Deventer is a great town and has a well known historic center worth a
> > visit.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com


Re: RedirectToUrlException in Wicket 6

2014-01-31 Thread Martin Grigorov
It is part of https://issues.apache.org/jira/browse/WICKET-5387
Wicket won't call any lifecycle methods on not fully initialized page.

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 12:13 PM, Gereon Steffens <
gereon.steff...@finanzen100.de> wrote:

> Sure.
>
> My stripped-down test page class looks like this:
>
> class MyPage extends WebPage
> {
>MyPage(PageParameters pp)
>{
>   super(pp);
>   throw new RedirectToUrlException("http://example.com";, 302);
>}
>
>@Override
>public void onDetach()
>{
>   super.onDetach();
>
>}
> }
>
> onDetach() gets called in Wicket 1.5, but not in Wicket 6. I didn't find
> anything in the migration guide or the release notes on this change, so
> I'm wondering if it is intentional.
>
> Gereon
>
> Am 31.01.14 11:29 schrieb "Martin Grigorov" unter :
>
> >Hi,
> >
> >Can you please give more details ?
> >
> >Martin Grigorov
> >Wicket Training and Consulting
> >
> >
> >On Fri, Jan 31, 2014 at 11:14 AM, Gereon Steffens <
> >gereon.steff...@finanzen100.de> wrote:
> >
> >> Hi,
> >>
> >> I'm currently migrating a project from Wicket 1.5 to Wicket 6.13 and
> >>just
> >> noted that RedirectToUrlException behaves differently.
> >> In Wicket 1.5 the onDetach() callbacks get invoked on the components
> >> throwing the exception, in Wicket 6 this does not seem to be the case
> >> anymore.
> >>
> >> Is this a bug or a feature?
> >>
> >> Gereon
> >>
> >>
> >> -
> >> 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: RedirectToUrlException in Wicket 6

2014-01-31 Thread Gereon Steffens
Ok, understood. Thanks!

Gereon

Am 31.01.14 12:19 schrieb "Martin Grigorov" unter :

>It is part of https://issues.apache.org/jira/browse/WICKET-5387
>Wicket won't call any lifecycle methods on not fully initialized page.
>
>Martin Grigorov
>Wicket Training and Consulting
>
>
>On Fri, Jan 31, 2014 at 12:13 PM, Gereon Steffens <
>gereon.steff...@finanzen100.de> wrote:
>
>> Sure.
>>
>> My stripped-down test page class looks like this:
>>
>> class MyPage extends WebPage
>> {
>>MyPage(PageParameters pp)
>>{
>>   super(pp);
>>   throw new RedirectToUrlException("http://example.com";, 302);
>>}
>>
>>@Override
>>public void onDetach()
>>{
>>   super.onDetach();
>>
>>}
>> }
>>
>> onDetach() gets called in Wicket 1.5, but not in Wicket 6. I didn't find
>> anything in the migration guide or the release notes on this change, so
>> I'm wondering if it is intentional.
>>
>> Gereon
>>
>> Am 31.01.14 11:29 schrieb "Martin Grigorov" unter
>>:
>>
>> >Hi,
>> >
>> >Can you please give more details ?
>> >
>> >Martin Grigorov
>> >Wicket Training and Consulting
>> >
>> >
>> >On Fri, Jan 31, 2014 at 11:14 AM, Gereon Steffens <
>> >gereon.steff...@finanzen100.de> wrote:
>> >
>> >> Hi,
>> >>
>> >> I'm currently migrating a project from Wicket 1.5 to Wicket 6.13 and
>> >>just
>> >> noted that RedirectToUrlException behaves differently.
>> >> In Wicket 1.5 the onDetach() callbacks get invoked on the components
>> >> throwing the exception, in Wicket 6 this does not seem to be the case
>> >> anymore.
>> >>
>> >> Is this a bug or a feature?
>> >>
>> >> Gereon
>> >>
>> >>
>> >> -
>> >> 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



multiple path parameters in path segment

2014-01-31 Thread Richter, Marvin
Hey geeks,

Hope you can help me.
I'm actually trying to mount a page including 2 path parameters in path segment.
What I try:
mountPage("/customer/${IdentifierType}:${Identifier}/", 
ManageCustomerPage.class);

è Should result into /customer/ID:10001/ or /customer/EMAIL:ilove%40wicket.org/

Note the colon between the two parameters.

But unfortunately this will result in not mounting the page and appending all 
parameters as query parameters

è /com.company.ManageCustomerPage?IdentifierType=ID&Identifier=10001

Did anyone try something like this before?

Thanks in advance,
Marvin


Re: multiple path parameters in path segment

2014-01-31 Thread Martin Grigorov
Hi geek,

I'm afraid this is not supported at the moment.
Placeholder can only be a complete path segment.
E.g. : .../${identifierType}/...
A segment cannot contain mixes of 'fixed' text, mandatory placeholder
and/or optional placeholders.
You will need custom IRequestMapper impl for your scheme.
See MountedMapper and its super classes for inspiration.


Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 3:33 PM, Richter, Marvin <
marvin.rich...@jestadigital.com> wrote:

> Hey geeks,
>
> Hope you can help me.
> I'm actually trying to mount a page including 2 path parameters in path
> segment.
> What I try:
> mountPage("/customer/${IdentifierType}:${Identifier}/",
> ManageCustomerPage.class);
>
> è Should result into /customer/ID:10001/ or /customer/EMAIL:ilove%
> 40wicket.org/
>
> Note the colon between the two parameters.
>
> But unfortunately this will result in not mounting the page and appending
> all parameters as query parameters
>
> è /com.company.ManageCustomerPage?IdentifierType=ID&Identifier=10001
>
> Did anyone try something like this before?
>
> Thanks in advance,
> Marvin
>


RE: multiple path parameters in path segment

2014-01-31 Thread Richter, Marvin
Too damn bad, but as long as there is possible solution ...

For now I'll stick with my solution which is a bit more dirty. I'm actually 
handling the 2 parameters as one and working with a regex to separate these two 
in the Constructor.

Thanks for your fast reply.

Best,
Marvin

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, January 31, 2014 4:20 PM
To: users@wicket.apache.org
Subject: Re: multiple path parameters in path segment

Hi geek,

I'm afraid this is not supported at the moment.
Placeholder can only be a complete path segment.
E.g. : .../${identifierType}/...
A segment cannot contain mixes of 'fixed' text, mandatory placeholder and/or 
optional placeholders.
You will need custom IRequestMapper impl for your scheme.
See MountedMapper and its super classes for inspiration.


Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 3:33 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hey geeks,
>
> Hope you can help me.
> I'm actually trying to mount a page including 2 path parameters in 
> path segment.
> What I try:
> mountPage("/customer/${IdentifierType}:${Identifier}/",
> ManageCustomerPage.class);
>
> è Should result into /customer/ID:10001/ or /customer/EMAIL:ilove% 
> 40wicket.org/
>
> Note the colon between the two parameters.
>
> But unfortunately this will result in not mounting the page and 
> appending all parameters as query parameters
>
> è /com.company.ManageCustomerPage?IdentifierType=ID&Identifier=10001
>
> Did anyone try something like this before?
>
> Thanks in advance,
> Marvin
>


Make wicket fetch js from different server

2014-01-31 Thread Chris Colman
What is involved in telling wicket to fetch its js (jquery etc) from a
different server. It doesn't have to be a true CDN server just a
different server to the one the wicket app is running on.
 
Would this require using wicket-cdn or is there an easy way to just tell
wicket to fetch its js from a different server?