You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by LeaveNewb <my...@gmail.com> on 2012/06/20 23:01:45 UTC

Re: How to get request page in Wicket 1.5

I'm having the same problem, but passing a page through will not work for me.

I used to use the Page passed in to onRuntimeException to send an error
report to the developers that included the page the user was on.  I can't
seem to get that information with the RequestCycle.

Is this still possible with 1.5?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650140.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to get request page in Wicket 1.5

Posted by robmcguinness <ro...@gmail.com>.
i build something like this for Wicket 1.3 that can give you can idea for
Wicket 1.5

https://github.com/robmcguinness/wicket-events/blob/master/src/main/java/com/robmcguinness/WicketApplication.java#L30

https://github.com/robmcguinness/wicket-events/blob/master/src/main/java/com/robmcguinness/events/LastPageAccessedMetaData.java

i built this to send events across all pages in active session (modal =>
parent page and parent => modal)

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650153.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to get request page in Wicket 1.5

Posted by vineet semwal <vi...@gmail.com>.
hi martin,
 i can try but i am not as fast as you ;)

On Thu, Jun 21, 2012 at 1:27 PM, Martin Grigorov <mg...@apache.org> wrote:
> I think we should add an implementation of IRequestCycleListener in
> wicket-core that tracks the request and response pages and save this
> info in the request cycle's metadata
>
> @Vineet, Thomas, Andrea: do you want to contribute this ?
>
> On Thu, Jun 21, 2012 at 10:52 AM, vineet semwal
> <vi...@gmail.com> wrote:
>> i can think of these 2 ways..
>>
>> 1) you can create a requestcycle listener which
>> onRequestHandlerResolved checks if it's the pagrequesthandler ,if it's
>> set the pagename or whatever you want to into requestcycle metadata
>> and retrieve it later when you want to.
>>
>> 2) there is this another way but it will only work in case of your
>> customexception ,just save pagename or what ever you want to in your
>> customexception and onexception check if it's your customexception and
>> retrieve whatever you have saved.
>>
>> On Thu, Jun 21, 2012 at 12:37 PM, Martin Grigorov <mg...@apache.org> wrote:
>>> Hi,
>>>
>>> See https://cwiki.apache.org/confluence/display/WICKET/RequestCycle+in+Wicket+1.5
>>> Also take a look at
>>> org.apache.wicket.protocol.http.RequestLoggerRequestCycleListener. It
>>> tracks the requested requesthandler and the response requesthandler.
>>> If the handler is an instance of IPageRequestHandler then you can get
>>> the page instance with #getPage().
>>>
>>> On Thu, Jun 21, 2012 at 12:01 AM, LeaveNewb <my...@gmail.com> wrote:
>>>> I'm having the same problem, but passing a page through will not work for me.
>>>>
>>>> I used to use the Page passed in to onRuntimeException to send an error
>>>> report to the developers that included the page the user was on.  I can't
>>>> seem to get that information with the RequestCycle.
>>>>
>>>> Is this still possible with 1.5?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650140.html
>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> thanks,
>>
>> Vineet Semwal
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
thanks,

Vineet Semwal

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


Re: How to get request page in Wicket 1.5

Posted by Martin Grigorov <mg...@apache.org>.
I think we should add an implementation of IRequestCycleListener in
wicket-core that tracks the request and response pages and save this
info in the request cycle's metadata

@Vineet, Thomas, Andrea: do you want to contribute this ?

On Thu, Jun 21, 2012 at 10:52 AM, vineet semwal
<vi...@gmail.com> wrote:
> i can think of these 2 ways..
>
> 1) you can create a requestcycle listener which
> onRequestHandlerResolved checks if it's the pagrequesthandler ,if it's
> set the pagename or whatever you want to into requestcycle metadata
> and retrieve it later when you want to.
>
> 2) there is this another way but it will only work in case of your
> customexception ,just save pagename or what ever you want to in your
> customexception and onexception check if it's your customexception and
> retrieve whatever you have saved.
>
> On Thu, Jun 21, 2012 at 12:37 PM, Martin Grigorov <mg...@apache.org> wrote:
>> Hi,
>>
>> See https://cwiki.apache.org/confluence/display/WICKET/RequestCycle+in+Wicket+1.5
>> Also take a look at
>> org.apache.wicket.protocol.http.RequestLoggerRequestCycleListener. It
>> tracks the requested requesthandler and the response requesthandler.
>> If the handler is an instance of IPageRequestHandler then you can get
>> the page instance with #getPage().
>>
>> On Thu, Jun 21, 2012 at 12:01 AM, LeaveNewb <my...@gmail.com> wrote:
>>> I'm having the same problem, but passing a page through will not work for me.
>>>
>>> I used to use the Page passed in to onRuntimeException to send an error
>>> report to the developers that included the page the user was on.  I can't
>>> seem to get that information with the RequestCycle.
>>>
>>> Is this still possible with 1.5?
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650140.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> thanks,
>
> Vineet Semwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: How to get request page in Wicket 1.5

Posted by vineet semwal <vi...@gmail.com>.
i can think of these 2 ways..

1) you can create a requestcycle listener which
onRequestHandlerResolved checks if it's the pagrequesthandler ,if it's
set the pagename or whatever you want to into requestcycle metadata
and retrieve it later when you want to.

2) there is this another way but it will only work in case of your
customexception ,just save pagename or what ever you want to in your
customexception and onexception check if it's your customexception and
retrieve whatever you have saved.

On Thu, Jun 21, 2012 at 12:37 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> See https://cwiki.apache.org/confluence/display/WICKET/RequestCycle+in+Wicket+1.5
> Also take a look at
> org.apache.wicket.protocol.http.RequestLoggerRequestCycleListener. It
> tracks the requested requesthandler and the response requesthandler.
> If the handler is an instance of IPageRequestHandler then you can get
> the page instance with #getPage().
>
> On Thu, Jun 21, 2012 at 12:01 AM, LeaveNewb <my...@gmail.com> wrote:
>> I'm having the same problem, but passing a page through will not work for me.
>>
>> I used to use the Page passed in to onRuntimeException to send an error
>> report to the developers that included the page the user was on.  I can't
>> seem to get that information with the RequestCycle.
>>
>> Is this still possible with 1.5?
>>
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650140.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
thanks,

Vineet Semwal

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


Re: How to get request page in Wicket 1.5

Posted by vineet semwal <vi...@gmail.com>.
you can just log the client url in onexception if it's what you want ..
but i have written a requestcyclelistener today that registers
lastresponsepage ,i am trying to improve it..

On Thu, Jun 21, 2012 at 6:39 PM, LeaveNewb <my...@gmail.com> wrote:
> Yeah, I've been to the RequestCycle page and saw the suggestion.  I was just
> hoping for an easier solution, since the previous version worked so well.
>
> I guess I just need to get off my lazy butt and do the work.  ;)
>
> Thanks for the suggestions
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650163.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
thanks,

Vineet Semwal

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


Re: How to get request page in Wicket 1.5

Posted by LeaveNewb <my...@gmail.com>.
Yeah, I've been to the RequestCycle page and saw the suggestion.  I was just
hoping for an easier solution, since the previous version worked so well.

I guess I just need to get off my lazy butt and do the work.  ;)

Thanks for the suggestions

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650163.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to get request page in Wicket 1.5

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

See https://cwiki.apache.org/confluence/display/WICKET/RequestCycle+in+Wicket+1.5
Also take a look at
org.apache.wicket.protocol.http.RequestLoggerRequestCycleListener. It
tracks the requested requesthandler and the response requesthandler.
If the handler is an instance of IPageRequestHandler then you can get
the page instance with #getPage().

On Thu, Jun 21, 2012 at 12:01 AM, LeaveNewb <my...@gmail.com> wrote:
> I'm having the same problem, but passing a page through will not work for me.
>
> I used to use the Page passed in to onRuntimeException to send an error
> report to the developers that included the page the user was on.  I can't
> seem to get that information with the RequestCycle.
>
> Is this still possible with 1.5?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p4650140.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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