You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sudeivas <su...@gmail.com> on 2012/03/30 23:30:04 UTC

Version Pages by default

Hello, 
          I am just trying to make sense when to version pages and when not
to. 

I found in my application I can do something like,
getPageSettings().setVersionPagesByDefault(false);
as the default value is true. But I am not sure why we need to turn off page
version. I didn't find enough information online for page version in apache
wicket 1.5.3. 

It would be helpful if someone can share information about this. 

I believe I turned off page version some time back because I was getting too
many page expiration issue as you use a distributed session management. But
even though I use setVersionPagesByDefault(false) I still see page
expiration happening in our application. 

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520432.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: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
On Mon, Apr 2, 2012 at 6:28 PM, sudeivas <su...@gmail.com> wrote:
> Now I am using
>
> IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(),
> this);
> setRootRequestMapper(cryptoMapper);
>
> By this way the page parameters are encrypted. I hope it will not affect
> recreating the page from page mount when the page expiration happens.
>
> Also can you please answer my above question regarding StalePageException or
> any links to regarding this will also help.

See the javadoc of Page#renderCount field.

>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4526510.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
Now I am using 

IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(),
this);
setRootRequestMapper(cryptoMapper);

By this way the page parameters are encrypted. I hope it will not affect
recreating the page from page mount when the page expiration happens. 

Also can you please answer my above question regarding StalePageException or
any links to regarding this will also help.

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4526510.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: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
On Mon, Apr 2, 2012 at 6:37 AM, sudeivas <su...@gmail.com> wrote:
> I have made changes in the code to set all the parameters in the Session. Now
> the URL looks clean.
>
> http://xxxx/pageB?5
>
> But in pageB's constructor after reading values from session I am not
> clearing it as we need those values in the session. When the page expiration
> happens, when wicket tries to reload the page from mounted pages, then the
> values stored in the session will be helpful. Please correct me if I am
> wrong.

Wrong.
Most of the times PageExpirationException is caused due to expired
session. I.e. there wont be any values in the session when the page is
recreated.

>
> Another question related to these page expirations. I am also seeing lot of
> org.apache.wicket.request.mapper.StalePageException in
> production(distributed environment). What is the real cause of this? I am
> not seeing much of information from stack trace. Is this happening because
> we use lot of stateless pages? or Is this happening because we didn't
> version pages (prior to the start of this thread)? Please note I haven't
> moved the changes in this thread to production.
>
>
> Exception Stack Trace : org.apache.wicket.request.mapper.StalePageException
>        at
> org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
>        at
> org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
>        at
> org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
>        at
> org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100)
>        at
> org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
>        at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
>        at
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>        at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
>        at
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
>        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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>        at
> de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:147)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>        at java.lang.Thread.run(Thread.java:662)
>
>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4525167.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
I have made changes in the code to set all the parameters in the Session. Now
the URL looks clean.

http://xxxx/pageB?5

But in pageB's constructor after reading values from session I am not
clearing it as we need those values in the session. When the page expiration
happens, when wicket tries to reload the page from mounted pages, then the
values stored in the session will be helpful. Please correct me if I am
wrong.

Another question related to these page expirations. I am also seeing lot of
org.apache.wicket.request.mapper.StalePageException in
production(distributed environment). What is the real cause of this? I am
not seeing much of information from stack trace. Is this happening because
we use lot of stateless pages? or Is this happening because we didn't
version pages (prior to the start of this thread)? Please note I haven't
moved the changes in this thread to production.


Exception Stack Trace : org.apache.wicket.request.mapper.StalePageException
	at
org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
	at
org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
	at
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
	at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100)
	at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
	at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
	at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
	at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
	at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
	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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:147)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:662)


Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4525167.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: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
Using setResponsePage(Page) wont work. This will create url like:
.../wicket/page?6 and there is no way to find what is the type of the
page behind this url. Using setResponsePage(Class) the url will be
.../pageB and this is what is needed to find out which Page
implementation to use after session expiration.

You can put the parameters in the Session instead of in
PageParameters. This way the url will be ../pageB without parameters.
And in PageB's constructor you will read the saved params and clear
them. Just an idea.

On Sun, Apr 1, 2012 at 4:54 AM, sudeivas <su...@gmail.com> wrote:
> Most often we don't want users to see the parameters in the URL. But when I
> tried using
> setResponsePage(PageA.class, pageParameters) and after mounting the page in
> my application I see the parameters in the URL.
>
> So I was referring to
>
> http://stackoverflow.com/questions/6390953/how-can-i-create-a-wicket-url-that-hides-its-parameters
>
> and found that we can mount pages without showing the parameters in the URL.
>
> My question is what will happen when session expires. After setting
> setRecreateMountedPagesAfterExpiry(true), will it be able to recreate the
> page from mountedPages because the URL will not be having the parameters.
>
> Basically I want to achieve setRecreateMountedPagesAfterExpiry(true) and
> also want to hide parameters from the user.
>
> Please advise.
>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522696.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
Most often we don't want users to see the parameters in the URL. But when I
tried using 
setResponsePage(PageA.class, pageParameters) and after mounting the page in
my application I see the parameters in the URL. 

So I was referring to 

http://stackoverflow.com/questions/6390953/how-can-i-create-a-wicket-url-that-hides-its-parameters

and found that we can mount pages without showing the parameters in the URL. 

My question is what will happen when session expires. After setting
setRecreateMountedPagesAfterExpiry(true), will it be able to recreate the
page from mountedPages because the URL will not be having the parameters. 

Basically I want to achieve setRecreateMountedPagesAfterExpiry(true) and
also want to hide parameters from the user. 

Please advise. 

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522696.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: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
On Sat, Mar 31, 2012 at 10:05 PM, sudeivas <su...@gmail.com> wrote:
> This idea sounds good to me rather than just passing the whole JAVA object.
> But this raises an another question. Since I am just passing PageParameters
> to the page, in the beginning it will be a stateless page. But when I start
> using Ajax components inside the page, then it becomes a stateful page and
> it gets stored in the session. Please let me know if I misunderstood
> something.

Correct, Ajax component/behavior makes the page stateful.

>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522200.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
This idea sounds good to me rather than just passing the whole JAVA object.
But this raises an another question. Since I am just passing PageParameters
to the page, in the beginning it will be a stateless page. But when I start
using Ajax components inside the page, then it becomes a stateful page and
it gets stored in the session. Please let me know if I misunderstood
something. 

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522200.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: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
You need to mount PageB with mountPage("/pageb", PageB.class) and use
setResponsePage(PageB.class, parameters)

'parameters' should bring a key/value that will be used to create a
proper objectX, e.g. a key which will be used to load an entity from
DB.
And there is no need to use AjaxLink if you always redirect to another
page, use a normal Link/BookmarkablePageLink instead.

On Sat, Mar 31, 2012 at 7:53 PM, sudeivas <su...@gmail.com> wrote:
> The problem in our application is there is no fixed path except for the home
> page. From the home page the user will navigate to a different page after
> clicking on a ajax link (we use setResponsePage(new PageB(Object x)).
>
> In Page B we have lot of widgets getting populated dynamically based on
> values in Object x. In most of our cases session expires when the user is in
> Page B. Currently when we are in Page B, wicket shows something like this in
> the url,
>
> http://xxxxx/xxx/wicket/page?7
>
> How can I mount these kinds of pages where there is no fixed path to mount.
>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522016.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
The problem in our application is there is no fixed path except for the home
page. From the home page the user will navigate to a different page after
clicking on a ajax link (we use setResponsePage(new PageB(Object x)).

In Page B we have lot of widgets getting populated dynamically based on
values in Object x. In most of our cases session expires when the user is in
Page B. Currently when we are in Page B, wicket shows something like this in
the url,

http://xxxxx/xxx/wicket/page?7

How can I mount these kinds of pages where there is no fixed path to mount. 

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522016.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: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
On Sat, Mar 31, 2012 at 6:22 PM, sudeivas <su...@gmail.com> wrote:
> I believe the best solution for me is to update my project to the latest
> version of wicket, but still I am worried about the following issue,
>
> https://issues.apache.org/jira/browse/WICKET-4454
>
> since lot of our code have nested components. Any idea when 1.5.6 will be
> released? (so that I can wait for sometime and update to 1.5.6)

No specific date for now, but it will be around one month after 1.5.5
has been released.

>
> Below is my understanding, please let me know if I misunderstood something
> here.
> After 1.5.6, I need to version my pages (which is true by default) and also
> setRecreateMountedPagesAfterExpiry(which is true by default). What wicket
> does in the background is when session management fails or session expires,
> instead of just throwing run time exception (like PageExpiredException)
> wicket tries to reload the page (I am not sure how many times it retries
> ??). By this way we may not or may get only small number of run time
> exceptions. Am I right?

Right. But only for pages mounted with #mountPage() (i.e. with MountedMapper)

>
> Sorry for too many questions because I didn't find any thread regarding page
> version in latest releases.
>
> Thanks,
> Suresh
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4521893.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
I believe the best solution for me is to update my project to the latest
version of wicket, but still I am worried about the following issue,

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

since lot of our code have nested components. Any idea when 1.5.6 will be
released? (so that I can wait for sometime and update to 1.5.6)

Below is my understanding, please let me know if I misunderstood something
here.
After 1.5.6, I need to version my pages (which is true by default) and also
setRecreateMountedPagesAfterExpiry(which is true by default). What wicket
does in the background is when session management fails or session expires,
instead of just throwing run time exception (like PageExpiredException)
wicket tries to reload the page (I am not sure how many times it retries
??). By this way we may not or may get only small number of run time
exceptions. Am I right?

Sorry for too many questions because I didn't find any thread regarding page
version in latest releases. 

Thanks,
Suresh



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4521893.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: Version Pages by default

Posted by vineet semwal <vi...@gmail.com>.
 oh sorry corrected a bit

On Sat, Mar 31, 2012 at 1:50 PM, vineet semwal
<vi...@gmail.com> wrote:
> for creation ,is it done like this in wicket if(page is creatable){
> create}else{ /*throw pageexpiredexception*/ redirect to error page }
>
> else there can be a loop of pageexpiredexception just curious..
>
>
> On Sat, Mar 31, 2012 at 12:53 PM, Martin Grigorov <mg...@apache.org> wrote:
>> On Sat, Mar 31, 2012 at 12:29 AM, sudeivas <su...@gmail.com> wrote:
>>> Thanks for the information. I am currently using wicket 1.5.3.
>>>
>>> I hope this applies to wicket-1.5.3 as well.
>>
>> Yes
>>
>>>
>>> But in my case, everything works fine. But when our session management
>>> fails, then we run into the following exceptions:
>>>
>>> PageExpiredException
>>> ComponentNotFoundException
>>> StalePageException
>>
>> This is normal. If there is no page with that version in the store
>> then PageExpiredException is thrown.
>>
>>>
>>> Please let me know if enabling page version will fix any of these issues.
>>> Also in 6.x I see an API called
>>> setRecreateMountedPagesAfterExpiry()
>>>
>>> Is this option available already in wicket-1.5.3 (by default true) ? If not,
>>> what happens when a page expires?
>>
>> It is available since 1.5.4.
>> When page is expired Wicket will create a new instance of this page as
>> its javadoc explains.
>>
>>>
>>> Thanks,
>>> Suresh
>>>
>>> --
>>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520613.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
>>
>
>
>
> --
> thank you,
>
> regards,
> Vineet Semwal



-- 
thank you,

regards,
Vineet Semwal

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


Re: Version Pages by default

Posted by vineet semwal <vi...@gmail.com>.
for creation ,is it done like this in wicket if(page is creatable){
create}else{ throw pageexpiredexception}

else there can be a loop of pageexpiredexception just curious..


On Sat, Mar 31, 2012 at 12:53 PM, Martin Grigorov <mg...@apache.org> wrote:
> On Sat, Mar 31, 2012 at 12:29 AM, sudeivas <su...@gmail.com> wrote:
>> Thanks for the information. I am currently using wicket 1.5.3.
>>
>> I hope this applies to wicket-1.5.3 as well.
>
> Yes
>
>>
>> But in my case, everything works fine. But when our session management
>> fails, then we run into the following exceptions:
>>
>> PageExpiredException
>> ComponentNotFoundException
>> StalePageException
>
> This is normal. If there is no page with that version in the store
> then PageExpiredException is thrown.
>
>>
>> Please let me know if enabling page version will fix any of these issues.
>> Also in 6.x I see an API called
>> setRecreateMountedPagesAfterExpiry()
>>
>> Is this option available already in wicket-1.5.3 (by default true) ? If not,
>> what happens when a page expires?
>
> It is available since 1.5.4.
> When page is expired Wicket will create a new instance of this page as
> its javadoc explains.
>
>>
>> Thanks,
>> Suresh
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520613.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
>



-- 
thank you,

regards,
Vineet Semwal

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


Re: Version Pages by default

Posted by Martin Grigorov <mg...@apache.org>.
On Sat, Mar 31, 2012 at 12:29 AM, sudeivas <su...@gmail.com> wrote:
> Thanks for the information. I am currently using wicket 1.5.3.
>
> I hope this applies to wicket-1.5.3 as well.

Yes

>
> But in my case, everything works fine. But when our session management
> fails, then we run into the following exceptions:
>
> PageExpiredException
> ComponentNotFoundException
> StalePageException

This is normal. If there is no page with that version in the store
then PageExpiredException is thrown.

>
> Please let me know if enabling page version will fix any of these issues.
> Also in 6.x I see an API called
> setRecreateMountedPagesAfterExpiry()
>
> Is this option available already in wicket-1.5.3 (by default true) ? If not,
> what happens when a page expires?

It is available since 1.5.4.
When page is expired Wicket will create a new instance of this page as
its javadoc explains.

>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520613.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


Re: Version Pages by default

Posted by sudeivas <su...@gmail.com>.
Thanks for the information. I am currently using wicket 1.5.3.

I hope this applies to wicket-1.5.3 as well. 

But in my case, everything works fine. But when our session management
fails, then we run into the following exceptions:

PageExpiredException
ComponentNotFoundException
StalePageException

Please let me know if enabling page version will fix any of these issues.
Also in 6.x I see an API called 
setRecreateMountedPagesAfterExpiry()

Is this option available already in wicket-1.5.3 (by default true) ? If not,
what happens when a page expires? 

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520613.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: Version Pages by default

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

Check the docs from 6.x:
http://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=blob_plain;f=wicket-core/src/main/java/org/apache/wicket/settings/IPageSettings.java;hb=master

On Fri, Mar 30, 2012 at 11:30 PM, sudeivas <su...@gmail.com> wrote:
> Hello,
>          I am just trying to make sense when to version pages and when not
> to.
>
> I found in my application I can do something like,
> getPageSettings().setVersionPagesByDefault(false);
> as the default value is true. But I am not sure why we need to turn off page
> version. I didn't find enough information online for page version in apache
> wicket 1.5.3.
>
> It would be helpful if someone can share information about this.
>
> I believe I turned off page version some time back because I was getting too
> many page expiration issue as you use a distributed session management. But
> even though I use setVersionPagesByDefault(false) I still see page
> expiration happening in our application.
>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520432.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