RE: getImageData() of Image not called on component instantiation in IE

2011-09-08 Thread martin . asenov
  


Would anyone help me with this? I'm desparate on fixing it 


Thank you,
Martin  


- Цитат от martin.ase...@mail.bg, на 06.09.2011 в 15:51 -
  


Hello, 


I have the following problem. I have a repeater which declares Images as
so: 


 NonCachingImage image1 = new NonCachingImage(image1, new
BufferedDynamicImageResource() { 


 private static final long serialVersionUID = 1L; 


 @Override
 protected byte[] getImageData() { 


 return detachable.getObject().getItem1().getThumbData(); 


 } 


 }); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the image
src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it has
never beed loaded and therefore does not retrieve the source of the image.
Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6)   


-
Mail.bg [1]: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   


-
Mail.bg [2]: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   


 

Links:
--
[1] http://mail.bg
[2] http://mail.bg


-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

RE: getImageData() of Image not called on component instantiation in IE

2011-09-08 Thread martin . asenov
   


Would anyone help me with this? I'm desparate on fixing it 


Thank you,
Martin  


- Цитат от martin.ase...@mail.bg, на 06.09.2011 в 15:51 -
  


Hello, 


I have the following problem. I have a repeater which declares Images as
so: 


 NonCachingImage image1 = new NonCachingImage(image1, new
BufferedDynamicImageResource() { 


 private static final long serialVersionUID = 1L; 


 @Override
 protected byte[] getImageData() { 


 return detachable.getObject().getItem1().getThumbData(); 


 } 


 }); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the image
src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it has
never beed loaded and therefore does not retrieve the source of the image.
Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6)   


-
Mail.bg [1]: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   


 

Links:
--
[1] http://mail.bg


-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

RE: getImageData() of Image not called on component instantiation in IE

2011-09-08 Thread martin . asenov



Would anyone help me with this? I'm desparate on fixing it 


Thank you,
Martin  


- Цитат от martin.ase...@mail.bg, на 06.09.2011 в 15:51 -
  


Hello, 


I have the following problem. I have a repeater which declares Images as
so: 


 NonCachingImage image1 = new NonCachingImage(image1, new
BufferedDynamicImageResource() { 


 private static final long serialVersionUID = 1L; 


 @Override
 protected byte[] getImageData() { 


 return detachable.getObject().getItem1().getThumbData(); 


 } 


 }); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the image
src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it has
never beed loaded and therefore does not retrieve the source of the image.
Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6)   


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

getImageData() of Image not called on component instantiation in IE

2011-09-06 Thread martin . asenov



Hello, 


I have the following problem. I have a repeater which declares Images as
so: 


 NonCachingImage image1 = new NonCachingImage(image1, new
BufferedDynamicImageResource() { 


 private static final long serialVersionUID = 1L; 


 @Override
 protected byte[] getImageData() { 


 return detachable.getObject().getItem1().getThumbData(); 


 } 


 }); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the image src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it has
never beed loaded and therefore does not retrieve the source of the image.
Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin

-

Сега е по-лесно да получиш най-добрата куриерска услуга на 
телефон *3456(*DHL6)
 http://www.dhl.bg/bg.html

Know if FileUploadField has value set before its parent form is submitted and file gets uploaded

2011-09-04 Thread martin . asenov



Hello, guys, 


I've got a FileUploadField as so: 


 image1UploadField = new FileUploadField(image1_upload, new Model()); 


I aim to know if the field has value set even before the form gets
processed and the item gets uploaded. I want to minimize traffic and memory
usage of my application. Therefore I don't want the file get uploaded
before I know if there really was file specified. 


What's the most proper way to do this in Wicket code? 


Thank you in advance,
Martin 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Re: Ultra strange behaviour AjaxButton - Form

2011-09-04 Thread martin . asenov



Thanks, Clint. I found that I had overriden the validate() method of one of
the textfields. Shame on me :) 


Best regards,
Martin  


- Цитат от Clint Checketts (checke...@gmail.com), на
04.09.2011 в 15:21 -   Are you using a custom object? A converter
could be failing to do the
conversion. As in you have a 'User' object tied to your field and Wicket
doesn't know by default how to convert the text 'Bob' into a new User
object.


On Fri, Sep 2, 2011 at 11:02 AM,  wrote:


Thanks, this is the case.


However, I've no idea why the form does validation, since I have no
required fields in it, nor have specified any validator.


Best regards,
Martin


- Цитат от Ernesto Reinaldo Barreiro (reier...@gmail.com), на
02.09.2011 в 18:55 - maybe you have validation errors and in that
case onError will be
called instead.


Regards,


Ernesto


On Fri, Sep 2, 2011 at 5:50 PM, wrote:


Hello, guys,


I'm experiencing some very strange problem - an AjaxButton's onSubmit
never
gets called.


Here are snippets of what I have:


HTML:


... some fields...


in code:


Form form = new Form(form);


AjaxButton submitButton = new AjaxButton(submit) {


public void onSubmit(ART target, Form form) {


System.out.println(clicked); // never printed


... some logic ...


}


};


form.add(submitButton);


add(form);


The above statement and logic are never reached.
The Ajax debugger prints nothing.


Any help is appreciated.


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския
пазар - 10 GB пощенска кутия, 20 MB прикрепен
файл, безплатен POP3, мобилна
версия, SMS известяване и други.


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Javascript does not detect components loaded upon panel replacement

2011-09-02 Thread martin . asenov



Hello guys, 


I've got the following issue. I have a main page that declares in its
markup . Once I replace an existing panel with another one, some JQuery
within the file scripts.js cannot detect markup that come with the new
panel and therefore does not call them. It acts just like that markup is
not present in DOM. 


Would you please assist? 


Thanks,
Martin 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Re: Javascript does not detect components loaded upon panel replacement

2011-09-02 Thread martin . asenov



Thanks, fixed it. 


- Цитат от Igor Vaynberg (igor.vaynb...@gmail.com), на
02.09.2011 в 18:20 -   google jquery live


-igor


On Fri, Sep 2, 2011 at 2:02 AM,  wrote:


Hello guys,


I've got the following issue. I have a main page that declares in its
markup . Once I replace an existing panel with another one, some JQuery
within the file scripts.js cannot detect markup that come with the new
panel and therefore does not call them. It acts just like that markup is
not present in DOM.


Would you please assist?


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov



Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ...  


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov
 


Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ...  


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin  

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

RE: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov
Sorry, HTML is:

form wicket:id=form

... some fields...

input type=submit wicket:id=submit class=some_class /

/form




- Цитат от martin.ase...@mail.bg, на 02.09.2011 в 18:50 -



Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ... 


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin 

-



-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Re: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov



Thanks, this is the case. 


However, I've no idea why the form does validation, since I have no
required fields in it, nor have specified any validator. 


Best regards,
Martin  


- Цитат от Ernesto Reinaldo Barreiro (reier...@gmail.com), на
02.09.2011 в 18:55 -   maybe you have validation errors and in that
case onError will be
called instead.


Regards,


Ernesto


On Fri, Sep 2, 2011 at 5:50 PM,  wrote:


Hello, guys,


I'm experiencing some very strange problem - an AjaxButton's onSubmit
never
gets called.


Here are snippets of what I have:


HTML:


... some fields...


in code:


Form form = new Form(form);


AjaxButton submitButton = new AjaxButton(submit) {


public void onSubmit(ART target, Form form) {


System.out.println(clicked); // never printed


... some logic ...


}


};


form.add(submitButton);


add(form);


The above statement and logic are never reached.
The Ajax debugger prints nothing.


Any help is appreciated.


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Hello, guys,

I experience a strange problem with trying to provide a custom servlet with the 
wicket session.

Here is my web.xml conf:

filter
filter-namewicketFilter/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name
param-valuecom.company.apps.appname.WebApp/param-value
/init-param
init-param
param-namefilterPath/param-name
param-value//param-value
/init-param
/filter

filter-mapping
filter-namewicketFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

filter
  filter-namewicketSessionFilter/filter-name
  
filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
  init-param
param-namefilterName/param-name
param-valuewicketFilter/param-value
  /init-param
/filter

filter-mapping
  filter-namewicketSessionFilter/filter-name
  url-pattern/friends/url-pattern
  dispatcherREQUEST/dispatcher
  dispatcherINCLUDE/dispatcher
/filter-mapping

servlet
servlet-namefriendsManager/servlet-name

servlet-classcom.company.apps.appname.servlet.FriendsManagerServlet/servlet-class
/servlet

servlet-mapping
servlet-namefriendsManager/servlet-name
url-pattern/friends/url-pattern
/servlet-mapping

The exception java.lang.IllegalStateException: you can only locate or create 
sessions in the context of a request cycle is being thrown by the 'friends' 
servlet.

Everything seems to be configured properly; however I get this error. I'm using 
wicket 1.4.17.

I would appreciate any help.

Thank you and regards,
Martin

-

Видя ли лятната промоция на СуперХостинг?
Дават цели ДВЕ години, като плащаш само ЕДНА!
Истина е, провери!
 
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBGutm_medium=FooterLinkutm_content=SummerPromo123utm_campaign=SummerPromo

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



Hi, namesake :) 


Already tried that, no result. 


Best, 


Martin 


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 -   Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM,  wrote:
   Hello, guys,


I experience a strange problem with trying to provide a custom servlet with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 wicketFilter


 wicketSessionFilter
 /friends
 REQUEST
 INCLUDE


 friendsManager
 com.company.apps.appname.servlet.FriendsManagerServlet


 friendsManager
 /friends


The exception java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle is being thrown by the
'friends' servlet.


Everything seems to be configured properly; however I get this error. I'm
using wicket 1.4.17.


I would appreciate any help.


Thank you and regards,
Martin


-


Видя ли лятната промоция на
СуперХостинг?
Дават цели ДВЕ години, като плащаш само
ЕДНА!
Истина е, провери!
 
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBGutm_medium=FooterLinkutm_content=SummerPromo123utm_campaign=SummerPromo
  


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


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


 

-

Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ, като втората е бонус!
 
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBGutm_medium=FooterLinkutm_content=SummerPromo124utm_campaign=SummerPromo

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



Here is the exception: 


java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle 


 at org.apache.wicket.Session.findOrCreate(Session.java:209) 


 at org.apache.wicket.Session.get(Session.java:253) 


 at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)



 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)



 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)



 at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)



 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)



 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)



 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)



 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
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)



 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)



 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)



 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)



 at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)



 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)



 at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) 


 at java.lang.Thread.run(Thread.java:662) 


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:17 -   paste the last few lines of the exception


On Sat, Aug 20, 2011 at 12:11 PM,  wrote:


Hi, namesake :)


Already tried that, no result.


Best,


Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM, wrote:
 Hello, guys,


I experience a strange problem with trying to provide a custom servlet
with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 wicketFilter


 wicketSessionFilter
 /friends
 REQUEST
 INCLUDE


 friendsManager
 com.company.apps.appname.servlet.FriendsManagerServlet


 friendsManager
 /friends


The exception java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle is being thrown by the
'friends' servlet.


Everything seems to be configured properly; however I get this error. I'm
using wicket 1.4.17.


I would appreciate any help.


Thank you and regards,
Martin


-


Видя ли лятната промоция на
СуперХостинг?
Дават цели ДВЕ години, като плащаш само
ЕДНА!
Истина е, провери!
 
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBGutm_medium=FooterLinkutm_content=SummerPromo123utm_campaign=SummerPromo


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


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


-


Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
 
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBGutm_medium=FooterLinkutm_content=SummerPromo124utm_campaign=SummerPromo
  


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


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


 

-

50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име. 
 http://www.icn.bg/default.icn?show=aboutstatus=about-newsnews=173

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time. 


Best,
Martin  


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:44 -   the mapping is OK. we see WicketSessionFilter
in the stack


there is the following code in WSF#bindSession():


 if (session == null)
 {
 if (logger.isDebugEnabled())
 {
 logger.debug(could not set Wicket session: key  + sessionKey +
  not found in http session for  +
 ((HttpServletRequest)request).getContextPath() + , +
request.getServerName() +
 , or http session does not exist);
 }
 }


Maybe you don't have active HttpSession yet.


On Sat, Aug 20, 2011 at 12:24 PM,  wrote:


Here is the exception:


java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle


 at org.apache.wicket.Session.findOrCreate(Session.java:209)


 at org.apache.wicket.Session.get(Session.java:253)


 at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)


 at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)


 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
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)


 at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)


 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)


 at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)


 at java.lang.Thread.run(Thread.java:662)


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:17 - paste the last few lines of the exception


On Sat, Aug 20, 2011 at 12:11 PM, wrote:


Hi, namesake :)


Already tried that, no result.


Best,


Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM, wrote:
 Hello, guys,


I experience a strange problem with trying to provide a custom servlet
with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 wicketFilter


 wicketSessionFilter
 /friends
 REQUEST
 INCLUDE


 friendsManager
 com.company.apps.appname.servlet.FriendsManagerServlet


 friendsManager
 /friends


The exception java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle is being thrown by the
'friends' servlet.


Everything seems to be configured properly; however I get this error. I'm
using wicket 1.4.17.


I would appreciate any help.


Thank you and regards,
Martin


-


Видя ли лятната промоция на
СуперХостинг?
Дават цели ДВЕ години, като плащаш само
ЕДНА!
Истина е, провери!
 
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBGutm_medium=FooterLinkutm_content=SummerPromo123utm_campaign=SummerPromo


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


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


-


Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
 

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



yes, really session is null :O 


at servlet: 


req.getSession() returns null 


and wicketsessionfilter in debug mode prints 


20-08-2011 13:25:57,753 DEBUG
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180
- could not set Wicket session: key null not found in http session for
/appname,IP_ADDRESS, or http session does not exist 


I really don't get it... null http session... could this really be true? 


Best,
Martin  


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 13:16 -   try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF


On Sat, Aug 20, 2011 at 12:54 PM,  wrote:


Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.


Best,
Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:44 - the mapping is OK. we see WicketSessionFilter
in the stack


there is the following code in WSF#bindSession():


 if (session == null)
 {
 if (logger.isDebugEnabled())
 {
 logger.debug(could not set Wicket session: key  + sessionKey +
  not found in http session for  +
 ((HttpServletRequest)request).getContextPath() + , +
request.getServerName() +
 , or http session does not exist);
 }
 }


Maybe you don't have active HttpSession yet.


On Sat, Aug 20, 2011 at 12:24 PM, wrote:


Here is the exception:


java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle


 at org.apache.wicket.Session.findOrCreate(Session.java:209)


 at org.apache.wicket.Session.get(Session.java:253)


 at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)


 at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)


 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
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)


 at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)


 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)


 at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)


 at java.lang.Thread.run(Thread.java:662)


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:17 - paste the last few lines of the exception


On Sat, Aug 20, 2011 at 12:11 PM, wrote:


Hi, namesake :)


Already tried that, no result.


Best,


Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM, wrote:
 Hello, guys,


I experience a strange problem with trying to provide a custom servlet
with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 wicketFilter


 wicketSessionFilter
 /friends
 REQUEST
 INCLUDE


 friendsManager
 com.company.apps.appname.servlet.FriendsManagerServlet


 friendsManager
 /friends


The exception java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle is being thrown by the
'friends' servlet.


Everything seems to be configured properly; however I get this error. I'm
using wicket 1.4.17.


I would appreciate any help.


Thank you and regards,
Martin



Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



Sorry, my mistake... 


Session is not null at servlet. There I have: 


session is: org.apache.catalina.session.StandardSessionFacade@412f4b 


while the statement in logs from wicketsessionfilter is: 


20-08-2011 13:25:57,753 DEBUG
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180
- could not set Wicket session: key null not found in http session for
/appname,IP_ADDRESS, or http session does not exist 


- Цитат от martin.ase...@mail.bg, на 20.08.2011 в 13:31 -
  


yes, really session is null :O 


at servlet: 


req.getSession() returns null 


and wicketsessionfilter in debug mode prints 


20-08-2011 13:25:57,753 DEBUG
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180
- could not set Wicket session: key null not found in http session for
/appname,IP_ADDRESS, or http session does not exist 


I really don't get it... null http session... could this really be true? 


Best,
Martin 


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 13:16 - try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF


On Sat, Aug 20, 2011 at 12:54 PM, wrote:


Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.


Best,
Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:44 - the mapping is OK. we see WicketSessionFilter
in the stack


there is the following code in WSF#bindSession():


 if (session == null)
 {
 if (logger.isDebugEnabled())
 {
 logger.debug(could not set Wicket session: key  + sessionKey +
  not found in http session for  +
 ((HttpServletRequest)request).getContextPath() + , +
request.getServerName() +
 , or http session does not exist);
 }
 }


Maybe you don't have active HttpSession yet.


On Sat, Aug 20, 2011 at 12:24 PM, wrote:


Here is the exception:


java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle


 at org.apache.wicket.Session.findOrCreate(Session.java:209)


 at org.apache.wicket.Session.get(Session.java:253)


 at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)


 at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)


 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
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)


 at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)


 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)


 at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)


 at java.lang.Thread.run(Thread.java:662)


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:17 - paste the last few lines of the exception


On Sat, Aug 20, 2011 at 12:11 PM, wrote:


Hi, namesake :)


Already tried that, no result.


Best,


Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM, wrote:
 Hello, guys,


I experience a strange problem with trying to provide a custom servlet
with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



In the page, which calls the servlet afterwards,
getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false)
returns null 


Do you have any ideas why this occurs? 


Thank you,
Martin  


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 13:16 -   try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF


On Sat, Aug 20, 2011 at 12:54 PM,  wrote:


Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.


Best,
Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:44 - the mapping is OK. we see WicketSessionFilter
in the stack


there is the following code in WSF#bindSession():


 if (session == null)
 {
 if (logger.isDebugEnabled())
 {
 logger.debug(could not set Wicket session: key  + sessionKey +
  not found in http session for  +
 ((HttpServletRequest)request).getContextPath() + , +
request.getServerName() +
 , or http session does not exist);
 }
 }


Maybe you don't have active HttpSession yet.


On Sat, Aug 20, 2011 at 12:24 PM, wrote:


Here is the exception:


java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle


 at org.apache.wicket.Session.findOrCreate(Session.java:209)


 at org.apache.wicket.Session.get(Session.java:253)


 at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)


 at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)


 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
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)


 at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)


 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)


 at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)


 at java.lang.Thread.run(Thread.java:662)


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:17 - paste the last few lines of the exception


On Sat, Aug 20, 2011 at 12:11 PM, wrote:


Hi, namesake :)


Already tried that, no result.


Best,


Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM, wrote:
 Hello, guys,


I experience a strange problem with trying to provide a custom servlet
with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 wicketFilter


 wicketSessionFilter
 /friends
 REQUEST
 INCLUDE


 friendsManager
 com.company.apps.appname.servlet.FriendsManagerServlet


 friendsManager
 /friends


The exception java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle is being thrown by the
'friends' servlet.


Everything seems to be configured properly; however I get this error. I'm
using wicket 1.4.17.


I would appreciate any help.


Thank you and regards,
Martin


-


Видя ли лятната промоция на
СуперХостинг?
Дават цели ДВЕ години, като плащаш само
ЕДНА!
Истина е, провери!
 

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov



Thanks a lot for your time, it did the trick :) 


Best regards,
Martin  


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 14:31 -   Call Session.get().bind() before the POST call
and it will be fine.


On Sat, Aug 20, 2011 at 1:57 PM,  wrote:


In the page, which calls the servlet afterwards,
getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false)
returns null


Do you have any ideas why this occurs?


Thank you,
Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 13:16 - try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF


On Sat, Aug 20, 2011 at 12:54 PM, wrote:


Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.


Best,
Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:44 - the mapping is OK. we see WicketSessionFilter
in the stack


there is the following code in WSF#bindSession():


 if (session == null)
 {
 if (logger.isDebugEnabled())
 {
 logger.debug(could not set Wicket session: key  + sessionKey +
  not found in http session for  +
 ((HttpServletRequest)request).getContextPath() + , +
request.getServerName() +
 , or http session does not exist);
 }
 }


Maybe you don't have active HttpSession yet.


On Sat, Aug 20, 2011 at 12:24 PM, wrote:


Here is the exception:


java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle


 at org.apache.wicket.Session.findOrCreate(Session.java:209)


 at org.apache.wicket.Session.get(Session.java:253)


 at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)


 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)


 at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)


 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
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)


 at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)


 at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)


 at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)


 at java.lang.Thread.run(Thread.java:662)


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:17 - paste the last few lines of the exception


On Sat, Aug 20, 2011 at 12:11 PM, wrote:


Hi, namesake :)


Already tried that, no result.


Best,


Martin


- Цитат от Martin Grigorov (mgrigo...@apache.org), на
20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the
session filter and the servlet


On Sat, Aug 20, 2011 at 12:03 PM, wrote:
 Hello, guys,


I experience a strange problem with trying to provide a custom servlet
with
the wicket session.


Here is my web.xml conf:


 wicketFilter
 org.apache.wicket.protocol.http.WicketFilter


 applicationClassName
 com.company.apps.appname.WebApp


 filterPath
 /


 wicketFilter
 /*


 wicketSessionFilter
 org.apache.wicket.protocol.http.servlet.WicketSessionFilter


 filterName
 wicketFilter


 wicketSessionFilter
 /friends
 REQUEST
 INCLUDE


 friendsManager
 com.company.apps.appname.servlet.FriendsManagerServlet


 friendsManager
 /friends


The exception java.lang.IllegalStateException: you can only locate or
create sessions in the context of a request cycle is being thrown by the
'friends' servlet.


Everything seems to be configured properly; however I get this error. I'm
using wicket 1.4.17.


I would appreciate any help.


Thank you and regards,
Martin



RE: Notice: PDF Creator toolbar causes modal window onShow redirect

2010-04-29 Thread Martin Asenov
Can someone assist?

Thanks in advance!

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Wednesday, April 28, 2010 2:14 PM
To: users@wicket.apache.org
Subject: Notice: PDF Creator toolbar causes modal window onShow redirect

Hello everyone!

I noticed that the PDF Creator toolbar, installed on the browser, causes 
ModalWindows to get closed and the page to be immediately redirected to some 
other page (usually a search engine page).

Please advice...

Best,
Martin



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



Notice: PDF Creator toolbar causes modal window onShow redirect

2010-04-28 Thread Martin Asenov
Hello everyone!

I noticed that the PDF Creator toolbar, installed on the browser, causes 
ModalWindows to get closed and the page to be immediately redirected to some 
other page (usually a search engine page).

Please advice...

Best,
Martin




RE: Back button

2010-04-26 Thread Martin Asenov
Hello, everyone!

I was off during the weekend, that's the reason I didn't write.

The issue occurs when:

I've got a repeater with cells (a calendar). Every cell has its own day label 
(a link that opens a modal window). The modalwindowcallback is set on the modal 
window that refreshes the repeater (actually its parent webmarkupcontainer). 
Afterwards I go to another page, and then click the back button. Looks like FF 
remembers the markup ids before the repeater refresh, and this is where the 
problem comes from. When I click on a link, I get the mentioned exception.

It doesn't occur in IE8.

Best,
Martin

-Original Message-
From: Douglas Ferguson [mailto:doug...@douglasferguson.us] 
Sent: Monday, April 26, 2010 9:26 AM
To: users@wicket.apache.org
Subject: Re: Back button

So does this mean that if you won't true BackButtom support you should swallow 
all exceptions.

That doesn't seem right..

D/

On Apr 25, 2010, at 11:26 AM, James Carman wrote:

 I meant page store, not session store.
 
 On Sun, Apr 25, 2010 at 12:26 PM, James Carman
 jcar...@carmanconsulting.com wrote:
 It would affect the back button because when Wicket tries to go get
 the specific version of the page back from the session store (only the
 current version is kept in the session and the earlier ones are in
 the store), it won't be able to find it.
 
 On Sun, Apr 25, 2010 at 11:45 AM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 No.. this is not a serialization issue, unless Igor is correct in that fact 
 that the exception prevents serialization. But how would that effect the 
 back button,
 should the page on the back button have already been serialized?
 
 Say if I get a hibernate failed to lazy load exception, then I hit the 
 back button, the links on the page all throw a component not found on page
 
 D/
 
 
 On Apr 25, 2010, at 7:45 AM, James Carman wrote:
 
 That means one of your fields might *not* be Serializable.  The error
 message usually tells you the exact field that caused the problem (in
 development mode).
 
 On Sun, Apr 25, 2010 at 8:26 AM, Nico Guba ng...@mac.com wrote:
 Hmmm, does that imply that one of the member variables may be 
 Serializable?
 
 On 25 Apr 2010, at 05:18, Igor Vaynberg wrote:
 
 the exception might have caused your page to not be serialized
 properly into the pagestore
 
 -igor
 
 On Sat, Apr 24, 2010 at 6:06 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I just saw the issue again, but this time it happened right after an 
 exception. I got an except. Hit back and then it complained that the 
 link didn't exist.
 
 D?
 
 On Apr 24, 2010, at 6:58 PM, Douglas Ferguson wrote:
 
 Ah yes..
 
 I am definitely seeing the component not found on page error.
 
 Any tips on how to get a quick start for this? Anybody got any example 
 quickstarts that deal with back button issues?
 
 D/
 
 On Apr 24, 2010, at 6:41 PM, Igor Vaynberg wrote:
 
 then you would get a page-expired error
 
 -igor
 
 On Sat, Apr 24, 2010 at 3:34 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Well something is happening, because I see it in the production logs 
 and from time to time on my dev machine.
 
 What if the server is restarted?
 
 D/
 
 On Apr 24, 2010, at 11:09 AM, Igor Vaynberg wrote:
 
 that doesnt matter because the url of the link you click contains 
 the
 version number of the page
 
 -igor
 
 On Sat, Apr 24, 2010 at 2:35 AM, Pointbreak
 pointbreak+wicketst...@ml1.net wrote:
 In firefox it doesn't. Firefox reads the page back from it's in 
 memory
 cache, which is the state before you clicked the ajax link. The 
 headers
 should be changed to force firefox to request the page from the 
 server
 (wicket). There are other threads on this subject, and frankly I 
 do not
 understand why the headers are not changed in wicket core.
 
 On Fri, 23 Apr 2010 21:45 -0700, Igor Vaynberg
 igor.vaynb...@gmail.com wrote:
 the back button should roll the page back to the state that 
 contained the
 item
 
 -igor
 
 On Fri, Apr 23, 2010 at 9:28 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Could this possibly happen if the following occurred.
 
 1) Load a page with a repeater on it
 2) Click on an ajax link that would remove an item from the 
 repeater
 3) Click the back button. Click on the link for the item you 
 removed.
 
 D/
 
 
 On Apr 23, 2010, at 10:32 AM, Martin Asenov wrote:
 
 Would someone assist me on this?
 
 Thank you in advance!
 
 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Friday, April 23, 2010 9:38 AM
 To: users@wicket.apache.org
 Subject: Back button
 
 Hello, everyone!
 
 I've got a page with a repeater with cells - every single cell 
 has a link in it. However, when you go to another page and 
 afterwards press the Back button and click one of the links, 
 the following exc is thrown:
 
 WicketMessage: org.apache.wicket.WicketRuntimeException: 
 component view_holder:view:25:cols:30:trigger_ref not found on 
 page

RE: Back button

2010-04-26 Thread Martin Asenov
I found the solution  https://issues.apache.org/jira/browse/WICKET-923

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Monday, April 26, 2010 9:36 AM
To: users@wicket.apache.org
Subject: RE: Back button

Hello, everyone!

I was off during the weekend, that's the reason I didn't write.

The issue occurs when:

I've got a repeater with cells (a calendar). Every cell has its own day label 
(a link that opens a modal window). The modalwindowcallback is set on the modal 
window that refreshes the repeater (actually its parent webmarkupcontainer). 
Afterwards I go to another page, and then click the back button. Looks like FF 
remembers the markup ids before the repeater refresh, and this is where the 
problem comes from. When I click on a link, I get the mentioned exception.

It doesn't occur in IE8.

Best,
Martin

-Original Message-
From: Douglas Ferguson [mailto:doug...@douglasferguson.us] 
Sent: Monday, April 26, 2010 9:26 AM
To: users@wicket.apache.org
Subject: Re: Back button

So does this mean that if you won't true BackButtom support you should swallow 
all exceptions.

That doesn't seem right..

D/

On Apr 25, 2010, at 11:26 AM, James Carman wrote:

 I meant page store, not session store.
 
 On Sun, Apr 25, 2010 at 12:26 PM, James Carman
 jcar...@carmanconsulting.com wrote:
 It would affect the back button because when Wicket tries to go get
 the specific version of the page back from the session store (only the
 current version is kept in the session and the earlier ones are in
 the store), it won't be able to find it.
 
 On Sun, Apr 25, 2010 at 11:45 AM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 No.. this is not a serialization issue, unless Igor is correct in that fact 
 that the exception prevents serialization. But how would that effect the 
 back button,
 should the page on the back button have already been serialized?
 
 Say if I get a hibernate failed to lazy load exception, then I hit the 
 back button, the links on the page all throw a component not found on page
 
 D/
 
 
 On Apr 25, 2010, at 7:45 AM, James Carman wrote:
 
 That means one of your fields might *not* be Serializable.  The error
 message usually tells you the exact field that caused the problem (in
 development mode).
 
 On Sun, Apr 25, 2010 at 8:26 AM, Nico Guba ng...@mac.com wrote:
 Hmmm, does that imply that one of the member variables may be 
 Serializable?
 
 On 25 Apr 2010, at 05:18, Igor Vaynberg wrote:
 
 the exception might have caused your page to not be serialized
 properly into the pagestore
 
 -igor
 
 On Sat, Apr 24, 2010 at 6:06 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I just saw the issue again, but this time it happened right after an 
 exception. I got an except. Hit back and then it complained that the 
 link didn't exist.
 
 D?
 
 On Apr 24, 2010, at 6:58 PM, Douglas Ferguson wrote:
 
 Ah yes..
 
 I am definitely seeing the component not found on page error.
 
 Any tips on how to get a quick start for this? Anybody got any example 
 quickstarts that deal with back button issues?
 
 D/
 
 On Apr 24, 2010, at 6:41 PM, Igor Vaynberg wrote:
 
 then you would get a page-expired error
 
 -igor
 
 On Sat, Apr 24, 2010 at 3:34 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Well something is happening, because I see it in the production logs 
 and from time to time on my dev machine.
 
 What if the server is restarted?
 
 D/
 
 On Apr 24, 2010, at 11:09 AM, Igor Vaynberg wrote:
 
 that doesnt matter because the url of the link you click contains 
 the
 version number of the page
 
 -igor
 
 On Sat, Apr 24, 2010 at 2:35 AM, Pointbreak
 pointbreak+wicketst...@ml1.net wrote:
 In firefox it doesn't. Firefox reads the page back from it's in 
 memory
 cache, which is the state before you clicked the ajax link. The 
 headers
 should be changed to force firefox to request the page from the 
 server
 (wicket). There are other threads on this subject, and frankly I 
 do not
 understand why the headers are not changed in wicket core.
 
 On Fri, 23 Apr 2010 21:45 -0700, Igor Vaynberg
 igor.vaynb...@gmail.com wrote:
 the back button should roll the page back to the state that 
 contained the
 item
 
 -igor
 
 On Fri, Apr 23, 2010 at 9:28 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Could this possibly happen if the following occurred.
 
 1) Load a page with a repeater on it
 2) Click on an ajax link that would remove an item from the 
 repeater
 3) Click the back button. Click on the link for the item you 
 removed.
 
 D/
 
 
 On Apr 23, 2010, at 10:32 AM, Martin Asenov wrote:
 
 Would someone assist me on this?
 
 Thank you in advance!
 
 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Friday, April 23, 2010 9:38 AM
 To: users@wicket.apache.org
 Subject: Back button
 
 Hello, everyone!
 
 I've got a page with a repeater with cells - every single cell 
 has a link in it. However, when you go

RE: Back button

2010-04-26 Thread Martin Asenov
Yes, it does...

Best,
Martin

-Original Message-
From: Steve Swinsburg [mailto:steve.swinsb...@gmail.com] 
Sent: Monday, April 26, 2010 3:19 PM
To: users@wicket.apache.org
Subject: Re: Back button

Looks like an issue with Firefox only though, as per the JIRA [1]. If you 
follow the recommendation in the JIRA, does that fix the problem?

cheers,
Steve

[1] https://issues.apache.org/jira/browse/WICKET-923


On 26/04/2010, at 5:56 PM, Pointbreak wrote:

 That browser cache issue is what I suggested as the culprit earlier on
 in this thread, for which Igor replied:
 
 that doesnt matter because the url of the link you click contains the
 version number of the page
 
 Apparently it does matter? Or am I missing something?
 
 
 On Mon, 26 Apr 2010 10:21 +0300, Martin Asenov mase...@velti.com
 wrote:
 I found the solution  https://issues.apache.org/jira/browse/WICKET-923
 
 Best,
 Martin
 
 
 -
 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



Back button

2010-04-23 Thread Martin Asenov
Hello, everyone!

I've got a page with a repeater with cells - every single cell has a link in 
it. However, when you go to another page and afterwards press the Back button 
and click one of the links, the following exc is thrown:

WicketMessage: org.apache.wicket.WicketRuntimeException: component 
view_holder:view:25:cols:30:trigger_ref not found on page 
com.company.project.ui.calendar.Calendar[id = 46], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Wicket was supposed to support the Back button, wasn't it? Or maybe I'm missing 
something.

Please advice...

Thank you,
Martin


RE: Back button

2010-04-23 Thread Martin Asenov
Would someone assist me on this?

Thank you in advance!

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Friday, April 23, 2010 9:38 AM
To: users@wicket.apache.org
Subject: Back button

Hello, everyone!

I've got a page with a repeater with cells - every single cell has a link in 
it. However, when you go to another page and afterwards press the Back button 
and click one of the links, the following exc is thrown:

WicketMessage: org.apache.wicket.WicketRuntimeException: component 
view_holder:view:25:cols:30:trigger_ref not found on page 
com.company.project.ui.calendar.Calendar[id = 46], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Wicket was supposed to support the Back button, wasn't it? Or maybe I'm missing 
something.

Please advice...

Thank you,
Martin

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



WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
Hello guys!
In a page, I have a button. The button starts a thread, just like this, but I 
get the exception in the bottom. Here is some code:
  @Override
  protected void onSubmit(final AjaxRequestTarget target, Form? form) {
final FileUpload fileUpload = fileUploadField.getFileUpload();
if (fileUpload != null) {

  final PhonebookImporter importer = new 
PhonebookImporter(((AppSession) Session.get()).getManager());

  logger.debug(User  + context.getEmail()
  +  uploaded an import file -  + fileUpload.getClientFileName());

  byte[] bytes = fileUpload.getBytes();

  String uploadFolder;

  try {
uploadFolder = System.getenv(CATALINA_HOME)
+ props.get(uploadFolder);
  } catch (SMSOfficeException e1) {
logger.error(Could not resolve property!, e1);
uploadFolder = 
/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/;
  }

  User currentUser = ((AppSession) Session.get()).getContext()
  .getUser();

  final File uploaded = new File(uploadFolder
  + String.valueOf(currentUser.getId()) + / + 
fileUpload.getClientFileName());

  uploaded.getParentFile().mkdirs();

  try {
FileOutputStream fos = new FileOutputStream(uploaded, false);
fos.write(bytes);
fos.close();
logger.info(File written on  + uploaded.getAbsolutePath());
  } catch (IOException e) {
logger.error(I/O Exception occurred!, e);
return;
  }

  final ImportListener listener = new ImportListener() {

public void info(String object, ImportMessage type) {
  textModel.append(getString(type.toString()) + object + \n);
}

  };

  importer.setUser(((AppSession) Session.get()).getContext().getUser());
  importer.setDomain(((AppSession) Session.get()).getContext()
  .getDomain());

  importer.addImportListener(listener);


  new Thread(new Runnable() {

public void run() {

  try {

boolean flag = importer.importContacts(uploaded, null);

if (flag) {
  BulkImport.this.info(BulkImport.this.getString(imported));
  logger.debug(User  + context.getEmail()
  +  managed to import the contacts!);
} else {
  BulkImport.this.error(BulkImport.this.getString(enc_error));
  logger.error(User  + context.getEmail()
  +  did NOT manage to import the contacts!);
}
  } catch (Exception e) {
logger.error(User  + context.getEmail()
+  did NOT manage to import the contacts!, e);

BulkImport.this.error(BulkImport.this.getString(not_imported));
  }

  importer.removeImportListener(listener);
  target.addComponent(feed);

}

  }).start();

} else {
  BulkImport.this.error(getString(no_uploaded_file));
}

  }
And the exception:
16-04-2010 14:44:20,175 ERROR 
com.company.project.ui.bulk.BulkImport$2$2.run:183 - User mase...@velti.com did 
NOT manage to import the contacts!
   org.apache.wicket.WicketRuntimeException: There is no application attached 
to current thread Thread-17
at org.apache.wicket.Application.get(Application.java:179)
at org.apache.wicket.Component.getApplication(Component.java:1323)
at org.apache.wicket.Component.getLocalizer(Component.java:1436)
at org.apache.wicket.Component.getString(Component.java:1903)
at org.apache.wicket.Component.getString(Component.java:1890)
at com. 
company.project.ui.bulk.BulkImport$2$1.info(BulkImport.java:153)
at com. 
company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
at com. 
company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
at com. 
company.project.core.ManagerBean$$FastClassByCGLIB$$a2c3fbf0.invoke(generated)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at 
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at 

RE: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
I already saw one in javathoughts.com, but I don't see any major differences.

Best,
Martin


-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, April 16, 2010 4:17 PM
To: users@wicket.apache.org
Subject: Re: WicketRuntimeException: There is no application attached to 
current thread

If you need an example on how to do this I can point you to a somewhat
similar example.

Ernesto

On Fri, Apr 16, 2010 at 3:15 PM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Do not use make references to components on the thread. Instead create an
 instance of runnable to which you pass all the information you need and use
 a kind of context to communicate with the Web layer if you need to pass
 back information.

 Best,

 Ernesto


 2010/4/16 Martin Asenov mase...@velti.com

 Hello guys!

 In a page, I have a button. The button starts a thread, just like this,
 but I get the exception in the bottom. Here is some code:
  @Override
  protected void onSubmit(final AjaxRequestTarget target, Form? form)
 {
final FileUpload fileUpload = fileUploadField.getFileUpload();
if (fileUpload != null) {

  final PhonebookImporter importer = new
 PhonebookImporter(((AppSession) Session.get()).getManager());

  logger.debug(User  + context.getEmail()
  +  uploaded an import file -  +
 fileUpload.getClientFileName());

  byte[] bytes = fileUpload.getBytes();

  String uploadFolder;

  try {
uploadFolder = System.getenv(CATALINA_HOME)
+ props.get(uploadFolder);
  } catch (SMSOfficeException e1) {
logger.error(Could not resolve property!, e1);
uploadFolder =
 /home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/;
  }

  User currentUser = ((AppSession) Session.get()).getContext()
  .getUser();

  final File uploaded = new File(uploadFolder
  + String.valueOf(currentUser.getId()) + / +
 fileUpload.getClientFileName());

  uploaded.getParentFile().mkdirs();

  try {
FileOutputStream fos = new FileOutputStream(uploaded, false);
fos.write(bytes);
fos.close();
logger.info(File written on  + uploaded.getAbsolutePath());
  } catch (IOException e) {
logger.error(I/O Exception occurred!, e);
return;
  }

  final ImportListener listener = new ImportListener() {

public void info(String object, ImportMessage type) {
  textModel.append(getString(type.toString()) + object + \n);
}

  };

  importer.setUser(((AppSession)
 Session.get()).getContext().getUser());
  importer.setDomain(((AppSession) Session.get()).getContext()
  .getDomain());

  importer.addImportListener(listener);


  new Thread(new Runnable() {

public void run() {

  try {

boolean flag = importer.importContacts(uploaded, null);

if (flag) {
  BulkImport.this.info
 (BulkImport.this.getString(imported));
  logger.debug(User  + context.getEmail()
  +  managed to import the contacts!);
} else {

  BulkImport.this.error(BulkImport.this.getString(enc_error));
  logger.error(User  + context.getEmail()
  +  did NOT manage to import the contacts!);
}
  } catch (Exception e) {
logger.error(User  + context.getEmail()
+  did NOT manage to import the contacts!, e);

  BulkImport.this.error(BulkImport.this.getString(not_imported));
  }

  importer.removeImportListener(listener);
  target.addComponent(feed);

}

  }).start();

} else {
  BulkImport.this.error(getString(no_uploaded_file));
}

  }
 And the exception:
 16-04-2010 14:44:20,175 ERROR
 com.company.project.ui.bulk.BulkImport$2$2.run:183 - User
 mase...@velti.com did NOT manage to import the contacts!
   org.apache.wicket.WicketRuntimeException: There is no application
 attached to current thread Thread-17
at org.apache.wicket.Application.get(Application.java:179)
at
 org.apache.wicket.Component.getApplication(Component.java:1323)
at
 org.apache.wicket.Component.getLocalizer(Component.java:1436)
at org.apache.wicket.Component.getString(Component.java:1903)
at org.apache.wicket.Component.getString(Component.java:1890)
at com. company.project.ui.bulk.BulkImport$2$1.info
 (BulkImport.java:153)
at com.
 company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
at com.
 company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
at com

RE: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
Should I pass the application's instance to the thread, which I can split in a 
separate class?

Best,
Martin


-Original Message-
From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal 
Bayramoglu
Sent: Friday, April 16, 2010 4:09 PM
To: users
Subject: Re: WicketRuntimeException: There is no application attached to 
current thread

Component's getString method will try to get the laocalizer from the
Application, and the Application instance (singleton for a Wicket
web-app) is bound to the thread processing your request, not to the
one you have spawned off of it

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com
.

2010/4/16 Martin Asenov mase...@velti.com:
 Hello guys!
 In a page, I have a button. The button starts a thread, just like this, but I 
 get the exception in the bottom. Here is some code:
     �...@override
      protected void onSubmit(final AjaxRequestTarget target, Form? form) {
        final FileUpload fileUpload = fileUploadField.getFileUpload();
        if (fileUpload != null) {

          final PhonebookImporter importer = new 
 PhonebookImporter(((AppSession) Session.get()).getManager());

          logger.debug(User  + context.getEmail()
              +  uploaded an import file -  + 
 fileUpload.getClientFileName());

          byte[] bytes = fileUpload.getBytes();

          String uploadFolder;

          try {
            uploadFolder = System.getenv(CATALINA_HOME)
                + props.get(uploadFolder);
          } catch (SMSOfficeException e1) {
            logger.error(Could not resolve property!, e1);
            uploadFolder = 
 /home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/;
          }

          User currentUser = ((AppSession) Session.get()).getContext()
              .getUser();

          final File uploaded = new File(uploadFolder
              + String.valueOf(currentUser.getId()) + / + 
 fileUpload.getClientFileName());

          uploaded.getParentFile().mkdirs();

          try {
            FileOutputStream fos = new FileOutputStream(uploaded, false);
            fos.write(bytes);
            fos.close();
            logger.info(File written on  + uploaded.getAbsolutePath());
          } catch (IOException e) {
            logger.error(I/O Exception occurred!, e);
            return;
          }

          final ImportListener listener = new ImportListener() {

            public void info(String object, ImportMessage type) {
              textModel.append(getString(type.toString()) + object + \n);
            }

          };

          importer.setUser(((AppSession) 
 Session.get()).getContext().getUser());
          importer.setDomain(((AppSession) Session.get()).getContext()
              .getDomain());

          importer.addImportListener(listener);


          new Thread(new Runnable() {

            public void run() {

              try {

                boolean flag = importer.importContacts(uploaded, null);

                if (flag) {
                  BulkImport.this.info(BulkImport.this.getString(imported));
                  logger.debug(User  + context.getEmail()
                      +  managed to import the contacts!);
                } else {
                  
 BulkImport.this.error(BulkImport.this.getString(enc_error));
                  logger.error(User  + context.getEmail()
                      +  did NOT manage to import the contacts!);
                }
              } catch (Exception e) {
                logger.error(User  + context.getEmail()
                    +  did NOT manage to import the contacts!, e);
                
 BulkImport.this.error(BulkImport.this.getString(not_imported));
              }

              importer.removeImportListener(listener);
              target.addComponent(feed);

            }

          }).start();

        } else {
          BulkImport.this.error(getString(no_uploaded_file));
        }

      }
 And the exception:
 16-04-2010 14:44:20,175 ERROR 
 com.company.project.ui.bulk.BulkImport$2$2.run:183 - User mase...@velti.com 
 did NOT manage to import the contacts!
   org.apache.wicket.WicketRuntimeException: There is no application attached 
 to current thread Thread-17
            at org.apache.wicket.Application.get(Application.java:179)
            at org.apache.wicket.Component.getApplication(Component.java:1323)
            at org.apache.wicket.Component.getLocalizer(Component.java:1436)
            at org.apache.wicket.Component.getString(Component.java:1903)
            at org.apache.wicket.Component.getString(Component.java:1890)
            at com. 
 company.project.ui.bulk.BulkImport$2$1.info(BulkImport.java:153)
            at com. 
 company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
            at com. 
 company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
            at com. 
 company.project.core.ManagerBean$$FastClassByCGLIB

BookmarkablePageLink functionality in a Button

2010-04-12 Thread Martin Asenov
Hello, everyone!

I've got this logout page:

public class LogoutPage extends WebPage {

  public LogoutPage() {
add(new FormObject(form).add(new AjaxButton(home) {

  private static final long serialVersionUID = 1L;

  @Override
  protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
setResponsePage(Calendar.class);
  }

}));
  }

  @Override
  protected void onAfterRender() {

super.onAfterRender();

getSession().invalidate();
RequestCycle.get().setRedirect(true);

  }

}

I used to have a BookmarkablePageLink instead of this button, that pointed to 
the very same page. However, obviously this button is related to the session 
and instead of sending me to the login page, it sends me to pageExpiredPage. 
Unfortunately, the new UI I have to use uses a button, so I had to use a button 
as well.
Can anyone assist me on this?

Best,
Martin


RE: BookmarkablePageLink functionality in a Button

2010-04-12 Thread Martin Asenov
You mean to put an anchor inside the button's body?

Best,
Martin

-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Monday, April 12, 2010 1:41 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLink functionality in a Button

Have you tried just attaching your link to a button?

button wicket:id=myButtonSomeText/button


On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov mase...@velti.com wrote:
 Hello, everyone!

 I've got this logout page:

 public class LogoutPage extends WebPage {

  public LogoutPage() {
    add(new FormObject(form).add(new AjaxButton(home) {

      private static final long serialVersionUID = 1L;

     �...@override
      protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
        setResponsePage(Calendar.class);
      }

    }));
  }

 �...@override
  protected void onAfterRender() {

    super.onAfterRender();

    getSession().invalidate();
    RequestCycle.get().setRedirect(true);

  }

 }

 I used to have a BookmarkablePageLink instead of this button, that pointed to 
 the very same page. However, obviously this button is related to the session 
 and instead of sending me to the login page, it sends me to pageExpiredPage. 
 Unfortunately, the new UI I have to use uses a button, so I had to use a 
 button as well.
 Can anyone assist me on this?

 Best,
 Martin


-
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: BookmarkablePageLink functionality in a Button

2010-04-12 Thread Martin Asenov
James :) I can't get it... Put what where?

Best,
Martin

-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Monday, April 12, 2010 3:26 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLink functionality in a Button

No, do exactly what I put.

2010/4/12 Martin Asenov mase...@velti.com:
 You mean to put an anchor inside the button's body?

 Best,
 Martin

 -Original Message-
 From: James Carman [mailto:jcar...@carmanconsulting.com]
 Sent: Monday, April 12, 2010 1:41 PM
 To: users@wicket.apache.org
 Subject: Re: BookmarkablePageLink functionality in a Button

 Have you tried just attaching your link to a button?

 button wicket:id=myButtonSomeText/button


 On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov mase...@velti.com wrote:
 Hello, everyone!

 I've got this logout page:

 public class LogoutPage extends WebPage {

  public LogoutPage() {
    add(new FormObject(form).add(new AjaxButton(home) {

      private static final long serialVersionUID = 1L;

     �...@override
      protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
        setResponsePage(Calendar.class);
      }

    }));
  }

 �...@override
  protected void onAfterRender() {

    super.onAfterRender();

    getSession().invalidate();
    RequestCycle.get().setRedirect(true);

  }

 }

 I used to have a BookmarkablePageLink instead of this button, that pointed 
 to the very same page. However, obviously this button is related to the 
 session and instead of sending me to the login page, it sends me to 
 pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so I 
 had to use a button as well.
 Can anyone assist me on this?

 Best,
 Martin


 -
 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


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



RE: BookmarkablePageLink functionality in a Button

2010-04-12 Thread Martin Asenov
Never knew I could put a wicket link in a button tag... :-)

Thank you, James!

Best,
Martin


-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Monday, April 12, 2010 3:55 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLink functionality in a Button

In your code...

add(new BookmarkablePageLink(mylink, myurl));

In your markup:

button wicket:id=mylinkWhatever You Want the Button to Say/button

2010/4/12 Martin Asenov mase...@velti.com:
 James :) I can't get it... Put what where?

 Best,
 Martin

 -Original Message-
 From: James Carman [mailto:jcar...@carmanconsulting.com]
 Sent: Monday, April 12, 2010 3:26 PM
 To: users@wicket.apache.org
 Subject: Re: BookmarkablePageLink functionality in a Button

 No, do exactly what I put.

 2010/4/12 Martin Asenov mase...@velti.com:
 You mean to put an anchor inside the button's body?

 Best,
 Martin

 -Original Message-
 From: James Carman [mailto:jcar...@carmanconsulting.com]
 Sent: Monday, April 12, 2010 1:41 PM
 To: users@wicket.apache.org
 Subject: Re: BookmarkablePageLink functionality in a Button

 Have you tried just attaching your link to a button?

 button wicket:id=myButtonSomeText/button


 On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov mase...@velti.com wrote:
 Hello, everyone!

 I've got this logout page:

 public class LogoutPage extends WebPage {

  public LogoutPage() {
    add(new FormObject(form).add(new AjaxButton(home) {

      private static final long serialVersionUID = 1L;

     �...@override
      protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
        setResponsePage(Calendar.class);
      }

    }));
  }

 �...@override
  protected void onAfterRender() {

    super.onAfterRender();

    getSession().invalidate();
    RequestCycle.get().setRedirect(true);

  }

 }

 I used to have a BookmarkablePageLink instead of this button, that pointed 
 to the very same page. However, obviously this button is related to the 
 session and instead of sending me to the login page, it sends me to 
 pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so 
 I had to use a button as well.
 Can anyone assist me on this?

 Best,
 Martin


 -
 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


 -
 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



BookmarkablePageLink functionality in a Button

2010-04-09 Thread Martin Asenov
Hello, everyone!

I've got this logout page:

public class LogoutPage extends WebPage {

  public LogoutPage() {
add(new FormObject(form).add(new AjaxButton(home) {

  private static final long serialVersionUID = 1L;

  @Override
  protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
setResponsePage(Calendar.class);
  }

}));
  }

  @Override
  protected void onAfterRender() {

super.onAfterRender();

getSession().invalidate();
RequestCycle.get().setRedirect(true);

  }

}

I used to have a BookmarkablePageLink instead of this button, that pointed to 
the very same page. However, obviously this button is related to the session 
and instead of sending me to the login page, it sends me to pageExpiredPage. 
Unfortunately, the new UI I have to use uses a button, so I had to use a button 
as well.
Can anyone assist me on this?

Best,
Martin


RE: IE6 issue regarding Wicket JS and Ajax

2010-04-09 Thread Martin Asenov
Is anyone able to give me some more assistance with the below mentioned issues?

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Thursday, April 08, 2010 5:18 PM
To: users@wicket.apache.org
Subject: IE6 issue regarding Wicket JS and Ajax

Hello, everyone!
I just noticed that my DatePicker doesn't work in IE6 - it doesn't even get 
displayed on mouse click. Also, when I close a modal window, the mask isn't 
hidden and the underlying page is not intractable, so I'm forced to refresh the 
whole page.
Also, ajax components update cause some screen flickering and misplacing some 
components (images, dropdown choices, etc.)
All problems occur in IE6.
Any ideas?
Best,


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



RE: IE6 issue regarding Wicket JS and Ajax

2010-04-09 Thread Martin Asenov
Some users might use IE6 for our webapp - how could I force them to upgrade?

P.S. Need some serious answers, please.

Best,
Martin

-Original Message-
From: Tim L Casey [mailto:tca...@cataphora.com] 
Sent: Friday, April 09, 2010 2:58 PM
To: users@wicket.apache.org
Subject: RE: IE6 issue regarding Wicket JS and Ajax



Upgrade.

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Friday, April 09, 2010 4:42 AM
To: users@wicket.apache.org
Subject: RE: IE6 issue regarding Wicket JS and Ajax

Is anyone able to give me some more assistance with the below mentioned
issues?

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Thursday, April 08, 2010 5:18 PM
To: users@wicket.apache.org
Subject: IE6 issue regarding Wicket JS and Ajax

Hello, everyone!
I just noticed that my DatePicker doesn't work in IE6 - it doesn't even get
displayed on mouse click. Also, when I close a modal window, the mask isn't
hidden and the underlying page is not intractable, so I'm forced to refresh
the whole page.
Also, ajax components update cause some screen flickering and misplacing
some components (images, dropdown choices, etc.)
All problems occur in IE6.
Any ideas?
Best,


-
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



RE: IE6 issue regarding Wicket JS and Ajax

2010-04-09 Thread Martin Asenov
I doubt I can reproduce it. The point is probably that I ajax refresh some div 
that holds a repeater. The modal window's mask stays in place, instead of 
getting removed. The modal window itself gets closed and the repeater is 
refreshed.

Regarding the DatePicker - it is not even clickable. 

Best,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, April 09, 2010 3:44 PM
To: users@wicket.apache.org
Subject: Re: IE6 issue regarding Wicket JS and Ajax

Martin,

Can you reproduce the issue with ModalWindow in a simple page. I'm using
it at some places and I do not have the issue (even if my pages are
complex).

Best,

Ernesto

On Fri, Apr 9, 2010 at 2:04 PM, Martin Asenov mase...@velti.com wrote:

 Some users might use IE6 for our webapp - how could I force them to
 upgrade?

 P.S. Need some serious answers, please.

 Best,
 Martin

 -Original Message-
 From: Tim L Casey [mailto:tca...@cataphora.com]
 Sent: Friday, April 09, 2010 2:58 PM
 To: users@wicket.apache.org
 Subject: RE: IE6 issue regarding Wicket JS and Ajax



 Upgrade.

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Friday, April 09, 2010 4:42 AM
 To: users@wicket.apache.org
 Subject: RE: IE6 issue regarding Wicket JS and Ajax

 Is anyone able to give me some more assistance with the below mentioned
 issues?

 Best,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Thursday, April 08, 2010 5:18 PM
 To: users@wicket.apache.org
 Subject: IE6 issue regarding Wicket JS and Ajax

 Hello, everyone!
 I just noticed that my DatePicker doesn't work in IE6 - it doesn't even get
 displayed on mouse click. Also, when I close a modal window, the mask isn't
 hidden and the underlying page is not intractable, so I'm forced to refresh
 the whole page.
 Also, ajax components update cause some screen flickering and misplacing
 some components (images, dropdown choices, etc.)
 All problems occur in IE6.
 Any ideas?
 Best,


 -
 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



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



IE6 issue regarding Wicket JS and Ajax

2010-04-08 Thread Martin Asenov
Hello, everyone!
I just noticed that my DatePicker doesn't work in IE6 - it doesn't even get 
displayed on mouse click. Also, when I close a modal window, the mask isn't 
hidden and the underlying page is not intractable, so I'm forced to refresh the 
whole page.
Also, ajax components update cause some screen flickering and misplacing some 
components (images, dropdown choices, etc.)
All problems occur in IE6.
Any ideas?
Best,



RE: IE6 issue regarding Wicket JS and Ajax

2010-04-08 Thread Martin Asenov
Hi, T Ames!

The datepicker is not in a modal window, but in a page. I was saying that when 
a modal window is closed, the mask it creates is never removed. Anyway, we'll 
probably not support IE6

Best,
Martin

Martin Asenov | Software Developer
Velti
Mob: +359.89.986.6745 | Tel: +359.2.933.5541 | Fax: +359.2.933.5502
Email: mase...@velti.com | Web: www.velti.com
Velti is a global leader in the provision of mobile marketing solutions and 
value added services for mobile
operators, ad agencies, brands, and media groups.
London | New York | San Francisco | Boston | Athens | Madrid | Sofia | Nicosia 
| Moscow | Dubai | 

New Delhi | Mumbai | Beijing | Shanghai


-Original Message-
From: T Ames [mailto:tamesw...@gmail.com] 
Sent: Thursday, April 08, 2010 6:03 PM
To: users@wicket.apache.org
Subject: Re: IE6 issue regarding Wicket JS and Ajax

Sadly in the corporate world these things move  very, very slowly.  We have
vendor apps that require IE6 so we are at their mercy.

Anyways, we use IE6 and DatePicker is working although I don't think I have
tried in on a ModalWindow.



On Thu, Apr 8, 2010 at 10:23 AM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 IE6's not pinin,' it's passed on! This browser is no more! It has
 ceased to be! It's expired and gone to meet its maker! This is a late
 browser! It's a stiff! Bereft of life, it rests in peace! If you
 hadn't nailed him to the perch he would be pushing up the daisies! Its
 metabolical processes are of interest only to historians! It's hopped
 the twig! It's shuffled off this mortal coil! It's run down the
 curtain and joined the choir invisible! This is an EX-BROWSER!

 http://ie6funeral.com

 Martijn

 On Thu, Apr 8, 2010 at 4:17 PM, Martin Asenov mase...@velti.com wrote:
  Hello, everyone!
  I just noticed that my DatePicker doesn't work in IE6 - it doesn't even
 get displayed on mouse click. Also, when I close a modal window, the mask
 isn't hidden and the underlying page is not intractable, so I'm forced to
 refresh the whole page.
  Also, ajax components update cause some screen flickering and misplacing
 some components (images, dropdown choices, etc.)
  All problems occur in IE6.
  Any ideas?
  Best,
 
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.4 increases type safety for web applications
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

 -
 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



How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
And RequestCycle.get().getRequestTarget() returns null;

Please help...

Best,
Martin

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



RE: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
No, it's something like:

new Timer().schedule(new TimerTask() {
public void run() {
modal.close(the target);
}
}, 12);

Best,
Martin


-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Friday, March 19, 2010 5:23 PM
To: users@wicket.apache.org
Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, without 
explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

Yes .. don't do new AjaxTarget... use the one you are given, why not?
It is an ajax event, no?

**
Martin

2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

 -
 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



RE: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
Here's the issue: 

Modal window is displayed. The user gets idle for a while. I've registered the 
modal by its session ID.

When the user clicks on some AjaxLink/AjaxButton and I want to see if session 
is invalid, so I've overridden sessionDestroyed() in the webapp, which calls a 
method that should close the modal, just like this:

modal.close((AjaxRequestTarget) RequestCycle.get().getRequestTarget());

but it doesn't work.

Best,
Martin

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Friday, March 19, 2010 5:42 PM
To: users@wicket.apache.org
Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, without 
explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

So how does the server communicate the close call to the client?

Martijn

On Fri, Mar 19, 2010 at 4:29 PM, Martin Asenov mase...@velti.com wrote:
 No, it's something like:

 new Timer().schedule(new TimerTask() {
        public void run() {
                modal.close(the target);
        }
 }, 12);

 Best,
 Martin


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Friday, March 19, 2010 5:23 PM
 To: users@wicket.apache.org
 Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, 
 without explicitly being fired from 
 AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

 Yes .. don't do new AjaxTarget... use the one you are given, why not?
 It is an ajax event, no?

 **
 Martin

 2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

 -
 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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
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: Prevent SessionExpiredPage from opening in a modal window

2010-03-18 Thread Martin Asenov
Unfortunately, the session expired page still opens in a modal window...

Any further help will be appreciated.

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Wednesday, March 17, 2010 6:34 PM
To: users@wicket.apache.org
Subject: RE: Prevent SessionExpiredPage from opening in a modal window

Thanks , Igor!

I did it that way:


head
script type=text/javascript
function checkIfParentIsModal() {
if (window.opener!=null) { window.opener.location=window.location; }
}
/script
/head

body onload=checkIfParentIsModal()/body

Hopefully that works!

Best,
Martin

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Wednesday, March 17, 2010 5:45 PM
To: users@wicket.apache.org
Subject: Re: Prevent SessionExpiredPage from opening in a modal window

you can add a bit of js to your custom pageexpiredpage, something that
looks like this:

if (window.opener!=null) { window.opener.location=window.location; }

-igor

On Wed, Mar 17, 2010 at 2:23 AM, Martin Asenov mase...@velti.com wrote:
 Hello, guys!

 I'm, wondering if I could prevent my sessionExpiredPage from opening in a 
 modal window. In case the user opens a modal window and goes away for a while 
 and in the meantime the session gets expired, I don't want when he comes back 
 and clicks inside the modal window to see the session expired page with a 
 button 'Go to home page in the modal. Afterwards, of course, if he clicks on 
 the link he'll get home page shown inside the modal. I want to prevent this.

 Any hints or ideas?

 Best,
 Martin


-
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



RE: Prevent SessionExpiredPage from opening in a modal window

2010-03-18 Thread Martin Asenov
I have an idea: in my every modal dialog will put a listener that checks if 
session.isExpired() on user interaction with the modal window. 

Can someone tell me please what's the event fired when a user makes some action 
on a page, like clicking a link or a button. I want to listen for this.

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Thursday, March 18, 2010 10:02 AM
To: users@wicket.apache.org
Subject: RE: Prevent SessionExpiredPage from opening in a modal window

Unfortunately, the session expired page still opens in a modal window...

Any further help will be appreciated.

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Wednesday, March 17, 2010 6:34 PM
To: users@wicket.apache.org
Subject: RE: Prevent SessionExpiredPage from opening in a modal window

Thanks , Igor!

I did it that way:


head
script type=text/javascript
function checkIfParentIsModal() {
if (window.opener!=null) { window.opener.location=window.location; }
}
/script
/head

body onload=checkIfParentIsModal()/body

Hopefully that works!

Best,
Martin

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Wednesday, March 17, 2010 5:45 PM
To: users@wicket.apache.org
Subject: Re: Prevent SessionExpiredPage from opening in a modal window

you can add a bit of js to your custom pageexpiredpage, something that
looks like this:

if (window.opener!=null) { window.opener.location=window.location; }

-igor

On Wed, Mar 17, 2010 at 2:23 AM, Martin Asenov mase...@velti.com wrote:
 Hello, guys!

 I'm, wondering if I could prevent my sessionExpiredPage from opening in a 
 modal window. In case the user opens a modal window and goes away for a while 
 and in the meantime the session gets expired, I don't want when he comes back 
 and clicks inside the modal window to see the session expired page with a 
 button 'Go to home page in the modal. Afterwards, of course, if he clicks on 
 the link he'll get home page shown inside the modal. I want to prevent this.

 Any hints or ideas?

 Best,
 Martin


-
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


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



using IBehaviorListener

2010-03-18 Thread Martin Asenov
Hello, guys!

I'm experiencing troubles with implementing IBehaviorListener on a ModalWindow.

I want to detect every single user interaction with to components inside the 
modal window and the close button itself , as well.

Would you give me some hints?

Best,
Martin



RE: using IBehaviorListener

2010-03-18 Thread Martin Asenov
Please, any help?!

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Thursday, March 18, 2010 1:11 PM
To: users@wicket.apache.org
Subject: using IBehaviorListener

Hello, guys!

I'm experiencing troubles with implementing IBehaviorListener on a ModalWindow.

I want to detect every single user interaction with to components inside the 
modal window and the close button itself , as well.

Would you give me some hints?

Best,
Martin


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



RE: using IBehaviorListener

2010-03-18 Thread Martin Asenov
Hi, Fernando!

This is not my question... I was asking how could I know every time when the 
user interacts with the system.

Best,
Martin

-Original Message-
From: Fernando Wermus [mailto:fernando.wer...@gmail.com] 
Sent: Thursday, March 18, 2010 4:57 PM
To: users@wicket.apache.org
Subject: Re: using IBehaviorListener

Martin,
 You can have any container, such as a Panel, into de Modal Window. You
can program as you have always done with Wicket. No need of IBehaviorListener.
The close button has its corresponding programming design. Take a look at
the modal window documentation in the web.



On Thu, Mar 18, 2010 at 12:27 PM, Martin Asenov mase...@velti.com wrote:

 Please, any help?!

 Best,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Thursday, March 18, 2010 1:11 PM
 To: users@wicket.apache.org
 Subject: using IBehaviorListener

 Hello, guys!

 I'm experiencing troubles with implementing IBehaviorListener on a
 ModalWindow.

 I want to detect every single user interaction with to components inside
 the modal window and the close button itself , as well.

 Would you give me some hints?

 Best,
 Martin


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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

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



Prevent SessionExpiredPage from opening in a modal window

2010-03-17 Thread Martin Asenov
Hello, guys!

I'm, wondering if I could prevent my sessionExpiredPage from opening in a modal 
window. In case the user opens a modal window and goes away for a while and in 
the meantime the session gets expired, I don't want when he comes back and 
clicks inside the modal window to see the session expired page with a button 
'Go to home page in the modal. Afterwards, of course, if he clicks on the link 
he'll get home page shown inside the modal. I want to prevent this.

Any hints or ideas?

Best,
Martin


RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Asenov
Hi, David!

Let's presume your webapplication class is called WebApp.java. In the same 
directory where it is present, create WebApp.properties with the following line:

null=

that way every single 'choose one' label will be replaced with .

P.S. Don't forget to include the props files in the pom as a resource.

Best,
Martin

-Original Message-
From: David Chang [mailto:david_q_zh...@yahoo.com] 
Sent: Wednesday, March 17, 2010 3:03 PM
To: users@wicket.apache.org
Subject: Replace Choose one from DropDownChoice?


Hello, I understand that there must be a solution for this. I googled for some 
time and found one or two results that seem to match what I am looking but they 
did not answer my question. Tried myself, not successful. So I want to ask 
folks here. I have a form and it has a dropdown list. Here are my requirements:

1. Replace Choose one with a blank line

2. This blank line is the first option and it is always listed no matter 
whether a value is selected or not, no matter whether the form field of this 
dropdown list is required or not.

3. I am using ChoiceRenderer to convert between selection and objects.

4. This behavior is applicable to all DropDownChoice. 

How can meet these requirement?

Thanks for your help!

Regards.


  

-
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: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Asenov
I don't understand , Chang...

If you want non selection to be  , then say

null=  (without the quotes)

Otherwise if you don't want null selection, you say 
component.setNullValid(false); and you're fine

Best,
Martin

-Original Message-
From: David Chang [mailto:david_q_zh...@yahoo.com] 
Sent: Wednesday, March 17, 2010 3:48 PM
To: users@wicket.apache.org
Subject: RE: Replace Choose one from DropDownChoice?

Martin,

Thanks so much for chiming in. I tried the 

null=

approach. The blank line in the dropdown list simply disappears. As I said in 
my requirements, I hope to have it there no matter whether a value is selected 
or not, no matter whether it is a required field or not.

Again, thanks for help!
Best,
David

--- On Wed, 3/17/10, Martin Asenov mase...@velti.com wrote:

 From: Martin Asenov mase...@velti.com
 Subject: RE: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 9:08 AM
 Hi, David!
 
 Let's presume your webapplication class is called
 WebApp.java. In the same directory where it is present,
 create WebApp.properties with the following line:
 
 null=
 
 that way every single 'choose one' label will be replaced
 with .
 
 P.S. Don't forget to include the props files in the pom as
 a resource.
 
 Best,
 Martin
 
 -Original Message-
 From: David Chang [mailto:david_q_zh...@yahoo.com]
 
 Sent: Wednesday, March 17, 2010 3:03 PM
 To: users@wicket.apache.org
 Subject: Replace Choose one from DropDownChoice?
 
 
 Hello, I understand that there must be a solution for this.
 I googled for some time and found one or two results that
 seem to match what I am looking but they did not answer my
 question. Tried myself, not successful. So I want to ask
 folks here. I have a form and it has a dropdown list. Here
 are my requirements:
 
 1. Replace Choose one with a blank line
 
 2. This blank line is the first option and it is always
 listed no matter whether a value is selected or not, no
 matter whether the form field of this dropdown list is
 required or not.
 
 3. I am using ChoiceRenderer to convert between selection
 and objects.
 
 4. This behavior is applicable to all DropDownChoice. 
 
 How can meet these requirement?
 
 Thanks for your help!
 
 Regards.
 
 
       
 
 -
 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


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



RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Asenov
David, please describe the use case in more depths.

1)
You want a dropdownchoice with null selection, which is  ?

2)
You don't want a null selection to be there at all, but show the first element.

Best,
Martin

-Original Message-
From: David Chang [mailto:david_q_zh...@yahoo.com] 
Sent: Wednesday, March 17, 2010 4:31 PM
To: users@wicket.apache.org
Subject: Re: Replace Choose one from DropDownChoice?

Martin, 

According to what you said, do I need to add special processing in 
ChoiceRenderer if this blank line is the selected and I need to convert 
selected value to object?

Thanks,
David

--- On Wed, 3/17/10, Martin Phee mp...@objectivearts.com wrote:

 From: Martin Phee mp...@objectivearts.com
 Subject: Re: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 10:05 AM
 You have to add a selection choice
 that is just a blank line option.
 
 This is a typical requirement for any dropdown if you wan
 the use to be able to clear their choice.
 
 
 On Mar 17, 2010, at 8:47 AM, David Chang wrote:
 
  Martin,
  
  Thanks so much for chiming in. I tried the
  
  null=
  
  approach. The blank line in the dropdown list simply
 disappears. As I said in my requirements, I hope to have it
 there no matter whether a value is selected or not, no
 matter whether it is a required field or not.
  
  Again, thanks for help!
  Best,
  David
  
  --- On Wed, 3/17/10, Martin Asenov mase...@velti.com
 wrote:
 
 
 -
 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



RE: Prevent SessionExpiredPage from opening in a modal window

2010-03-17 Thread Martin Asenov
Thanks , Igor!

I did it that way:


head
script type=text/javascript
function checkIfParentIsModal() {
if (window.opener!=null) { window.opener.location=window.location; }
}
/script
/head

body onload=checkIfParentIsModal()/body

Hopefully that works!

Best,
Martin

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Wednesday, March 17, 2010 5:45 PM
To: users@wicket.apache.org
Subject: Re: Prevent SessionExpiredPage from opening in a modal window

you can add a bit of js to your custom pageexpiredpage, something that
looks like this:

if (window.opener!=null) { window.opener.location=window.location; }

-igor

On Wed, Mar 17, 2010 at 2:23 AM, Martin Asenov mase...@velti.com wrote:
 Hello, guys!

 I'm, wondering if I could prevent my sessionExpiredPage from opening in a 
 modal window. In case the user opens a modal window and goes away for a while 
 and in the meantime the session gets expired, I don't want when he comes back 
 and clicks inside the modal window to see the session expired page with a 
 button 'Go to home page in the modal. Afterwards, of course, if he clicks on 
 the link he'll get home page shown inside the modal. I want to prevent this.

 Any hints or ideas?

 Best,
 Martin


-
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



Does AjaxSelfUpdatingBehavior simulate user actions and prevent session from expiration?

2010-03-16 Thread Martin Asenov
Hello, everyone!

In my webapp it looks like the session never expires, although I've set timeout 
of 30 seconds. But I have a digital clock in my right lower corner of the 
screen, that has an AjaxSelfUpdatingBehavior activated on it. Does it simulate 
user actions, that may cause session not to expiry?

Thank you,
Martin



RE: Does AjaxSelfUpdatingBehavior simulate user actions and prevent session from expiration?

2010-03-16 Thread Martin Asenov
And why is that? Shouldn't Wicket session filter such events and not consider 
them user interaction with the system?

Thank you both for the replies, and for the link also! Great help!

Regards,
Martin 

-Original Message-
From: nino martinez wael [mailto:nino.martinez.w...@gmail.com] 
Sent: Tuesday, March 16, 2010 3:39 PM
To: users@wicket.apache.org
Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and prevent 
session from expiration?

yes. Ajax contacts the server. And on each request the timer are reset.

So your ajax behavior are also functioning as a heartbeat or keepalive
feature.

2010/3/16 Martin Asenov mase...@velti.com

 Hello, everyone!

 In my webapp it looks like the session never expires, although I've set
 timeout of 30 seconds. But I have a digital clock in my right lower corner
 of the screen, that has an AjaxSelfUpdatingBehavior activated on it. Does it
 simulate user actions, that may cause session not to expiry?

 Thank you,
 Martin



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



RE: Does AjaxSelfUpdatingBehavior simulate user actions and prevent session from expiration?

2010-03-16 Thread Martin Asenov
My idea is to disable the ajaxselfupdatingtimerbehavior if the user hasn't do 
anything for 15 mins for instance... and set session timeout to another 15, so 
that the session really lasts 30 mins. But I'm just wondering how to do that 
exactly... Any ideas?

Best,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, March 16, 2010 4:08 PM
To: users@wicket.apache.org
Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and prevent 
session from expiration?

Maybe you can disable your clock if the user haven´t performed any other
activity for a while... That way session will expire...

Ernesto

On Tue, Mar 16, 2010 at 2:46 PM, Martin Asenov mase...@velti.com wrote:

 And why is that? Shouldn't Wicket session filter such events and not
 consider them user interaction with the system?

 Thank you both for the replies, and for the link also! Great help!

 Regards,
 Martin

 -Original Message-
 From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
 Sent: Tuesday, March 16, 2010 3:39 PM
 To: users@wicket.apache.org
 Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and
 prevent session from expiration?

 yes. Ajax contacts the server. And on each request the timer are reset.

 So your ajax behavior are also functioning as a heartbeat or keepalive
 feature.

 2010/3/16 Martin Asenov mase...@velti.com

  Hello, everyone!
 
  In my webapp it looks like the session never expires, although I've set
  timeout of 30 seconds. But I have a digital clock in my right lower
 corner
  of the screen, that has an AjaxSelfUpdatingBehavior activated on it. Does
 it
  simulate user actions, that may cause session not to expiry?
 
  Thank you,
  Martin
 
 

 -
 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: Does AjaxSelfUpdatingBehavior simulate user actions and prevent session from expiration?

2010-03-16 Thread Martin Asenov
Thanks, Michael!

But how could I know if the user hasn't done anything? Does it have something 
to do with the RequestCycle? 

Regards,
Martin

-Original Message-
From: Michael O'Cleirigh [mailto:michael.ocleir...@rivulet.ca] 
Sent: Tuesday, March 16, 2010 5:45 PM
To: users@wicket.apache.org
Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and prevent 
session from expiration?

Hi Martin,

AjaxSelfUpdatingTimerBehavior has an method called 
onPostProcessTarget(...); its is called each time the ajax request hits 
the server side.

You will want to add your timeout detection here.

You don't need to turn off the behavior.  You can just invalidate the 
session directly like:

class ExpiringAjaxTimerBehavior extends AjaxSelfUpdatingTimerBehaviour {

protected void onPostProcessTarget(final AjaxRequestTarget target)
 {

 if (userHasntDoneAnyThingLimitReached) {
 this.stop();
 Session.get().invalidate();
 }
 }

}

This way if the timer is active it can leverage application state to 
determine when to expire and if its not running the standard expiry will 
take place.

Regards,

Mike



 My idea is to disable the ajaxselfupdatingtimerbehavior if the user hasn't do 
 anything for 15 mins for instance... and set session timeout to another 15, 
 so that the session really lasts 30 mins. But I'm just wondering how to do 
 that exactly... Any ideas?

 Best,
 Martin

 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Tuesday, March 16, 2010 4:08 PM
 To: users@wicket.apache.org
 Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and prevent 
 session from expiration?

 Maybe you can disable your clock if the user haven´t performed any other
 activity for a while... That way session will expire...

 Ernesto

 On Tue, Mar 16, 2010 at 2:46 PM, Martin Asenovmase...@velti.com  wrote:


 And why is that? Shouldn't Wicket session filter such events and not
 consider them user interaction with the system?

 Thank you both for the replies, and for the link also! Great help!

 Regards,
 Martin

 -Original Message-
 From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
 Sent: Tuesday, March 16, 2010 3:39 PM
 To: users@wicket.apache.org
 Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and
 prevent session from expiration?

 yes. Ajax contacts the server. And on each request the timer are reset.

 So your ajax behavior are also functioning as a heartbeat or keepalive
 feature.

 2010/3/16 Martin Asenovmase...@velti.com

  
 Hello, everyone!

 In my webapp it looks like the session never expires, although I've set
 timeout of 30 seconds. But I have a digital clock in my right lower

 corner
  
 of the screen, that has an AjaxSelfUpdatingBehavior activated on it. Does

 it
  
 simulate user actions, that may cause session not to expiry?

 Thank you,
 Martin



 -
 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


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



RE: why is hashcode() called on page deserialization?

2010-03-15 Thread Martin Asenov
The issue is that the object that hashCode() is called on contains a @Lob 
object, I think it has to do with it...

Regards,

-Original Message-
From: Wilhelmsen Tor Iver [mailto:toriv...@arrive.no] 
Sent: Monday, March 15, 2010 10:01 AM
To: users@wicket.apache.org
Subject: SV: why is hashcode() called on page deserialization?

 java.lang.NullPointerException
  at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)

This looks a lot like an exception we get in one project as well, where a bean 
serialized into the DiskPageStore comes back with all properties set to null 
(including the ones tested for in hashCode() thus the NPE). Could this have 
happened during serialization, i.e. that the object write operation somehow 
failed to write any properties? The bean in question does not have any 
transient fields, and there is no custom object writer or reader.

- Tor Iver

-
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



why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Hello, everyone!

I get the exception:

java.lang.NullPointerException
 at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
 at java.util.HashMap.putForCreate(HashMap.java:413)
 at java.util.HashMap.readObject(HashMap.java:1031)
 at java.lang.reflect.Method.invoke(Method.java:597)

  .

 at org.apache.wicket.Component.readObject(Component.java:4465)

  .

 at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:409)
 at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
 at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
 at 
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
 at org.apache.wicket.Session.getPage(Session.java:779)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
 at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)

...

the field that is null is probably because it's not loaded by Spring. Anyway, 
why should it call hashCode(), and how could I avoid it?

Best,
Martin



RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Hi, Jonas!

I only have some ListView-s with ListSMSEvent passed as an argument. You mean 
to replace the List with LoadableDetachableModel, that returns the List?

Regards,

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 3:18 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

I guess you have a HashMap field in your component, which has an entry with an
SMSEvent object as key. You probably shouldn't hold on to references to spring
loaded objects. Instead, you should just have an accessor object, which knows
how to reload that spring loaded object, e.g. LoadableDetachableModel.

cheers,
Jonas

-
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: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
I don't have any HashMap-s that use SMSEvent object as a key. Only List-s

Regards,
Martin

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 3:29 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

Yes, exactly. But the stacktrace you posted is about a HashMap that is
directly referenced from one of your
components - you should also use e.g. LoadableDetachableModel there, I guess.

On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote:
 Hi, Jonas!

 I only have some ListView-s with ListSMSEvent passed as an argument. You 
 mean to replace the List with LoadableDetachableModel, that returns the List?

 Regards,

 -Original Message-
 From: Jonas [mailto:barney...@gmail.com]
 Sent: Friday, March 12, 2010 3:18 PM
 To: users@wicket.apache.org
 Subject: Re: why is hashcode() called on page deserialization?

 I guess you have a HashMap field in your component, which has an entry with an
 SMSEvent object as key. You probably shouldn't hold on to references to spring
 loaded objects. Instead, you should just have an accessor object, which knows
 how to reload that spring loaded object, e.g. LoadableDetachableModel.

 cheers,
 Jonas

 -
 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


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



RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
 at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:409)
 at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
 at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
 at 
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
 at org.apache.wicket.Session.getPage(Session.java:779)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
 at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301)
 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 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 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:849)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:619)

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 3:51 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

Well, the stacktrace you posted is about a HashMap, so it must be
around somewhere...?
I guess you didn't post the full stacktrace, so it may be deeply
hidden in something you
reference from a wicket Component.
Maybe you'll find it by examining the full stacktrace, or using a debugger.

cheers,
Jonas

On Fri, Mar 12, 2010 at 2:39 PM, Martin Asenov mase...@velti.com wrote:
 I don't have any HashMap-s that use SMSEvent object as a key. Only List-s

 Regards,
 Martin

 -Original Message-
 From: Jonas [mailto:barney...@gmail.com]
 Sent: Friday, March 12, 2010 3:29 PM
 To: users@wicket.apache.org
 Subject: Re: why is hashcode() called on page deserialization?

 Yes, exactly. But the stacktrace you posted is about a HashMap that is
 directly referenced from one of your
 components - you should also use e.g. LoadableDetachableModel there, I guess.

 On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote:
 Hi, Jonas!

 I only have some ListView-s with ListSMSEvent passed as an argument. You 
 mean to replace

RE: why is hashcode() called on page deserialization?

2010-03-12 Thread Martin Asenov
Thanks, Jonas, just will try to locate the cache and remove it.

Best,
Martin

-Original Message-
From: Jonas [mailto:barney...@gmail.com] 
Sent: Friday, March 12, 2010 4:56 PM
To: users@wicket.apache.org
Subject: Re: why is hashcode() called on page deserialization?

That's odd - are you sure you restarted/redeployed/etc. your webapp properly?
Maybe you should also try clearing the directory where the DiskPageStore stores
the serialized pages - just to make sure you won't get an old page again.
From the stacktrace I can see you have a wicket component that holds on
to an ArrayList (I guess that's your ListView). The ArrayList's elements hold
in turn the HashMap in question. If that's correct, your problem should go away
if the Component no longer directly holds on to the ArrayList (e.g. by
using LoadableDetachableModel)
If this still doesn't help, I suggest you try setting an Exception
Breakpoint on NullPointerException
in your debugger and examine the objects being serialized.
You can see the Objects e.g. in as the first parameter of
ObjectInputStream.readSerialData

cheers,
Jonas

On Fri, Mar 12, 2010 at 3:36 PM, Martin Asenov mase...@velti.com wrote:
 Well, Jonas, here's the stacktrace:

 P.S. LoadableDetachableModel didn't help Regards and thanks,
 Martin

 java.lang.NullPointerException
     at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
     at java.util.HashMap.putForCreate(HashMap.java:413)
     at java.util.HashMap.readObject(HashMap.java:1031)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.HashMap.readObject(HashMap.java:1029)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.ArrayList.readObject(ArrayList.java:593)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
     at org.apache.wicket.Component.readObject(Component.java:4465)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at 
 java.io.ObjectInputStream.readOrdinaryObject

RE: modal window problem

2010-03-11 Thread Martin Asenov
Hi, Fernando,

Тhe code's too big , about 500 lines, and the html is another 62 lines. I can 
paste it anyway, but is this problem related to the code itself? 
The string http://:/; , which Matthias mentioned about is not present anywhere 
in the page sources, as I view the pages that cause the problems only on 
certain PCs...

Regards,
Martin

-Original Message-
From: Fernando Wermus [mailto:fernando.wer...@gmail.com] 
Sent: Thursday, March 11, 2010 3:34 PM
To: users@wicket.apache.org
Subject: Re: modal window problem

The link is no more functional. Could you show the code?

On Thu, Mar 11, 2010 at 5:55 AM, Martin Asenov mase...@velti.com wrote:

 Please, anyone give some support on this one?

 Thank you,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Monday, March 08, 2010 6:23 PM
 To: users@wicket.apache.org
 Subject: RE: modal window problem

 Hi, Matthias!

 Well, I viewed the page source, and there is no text that says http://:/;
 . However, this happens only on two PCs from 10. Also, I typed on the one of
 the computers that have this error the above mentioned text in the browser
 and it led to the very same page with the very same parameters. Do you have
 any further ideas?

 Thanks,
 Martin

 -Original Message-
 From: Matthias Keller [mailto:matthias.kel...@ergon.ch]
 Sent: Monday, March 08, 2010 6:10 PM
 To: users@wicket.apache.org
 Subject: Re: modal window problem

 On 2010-03-08 17:07, Martin Asenov wrote:
  It's me again. I just noticed some very strange error that I have no
 explanation about. When I open a wicket modal window then it appears for a
 while and closes and the entire page gets redirected to some browser related
 pages, for instance ask.com, or some thing like this:
 
 
 http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12
 
  This is a modal window issue. Any help regarding the question will be
 highly appreciated!
 
 Hi

 It appears that something on your page/modal window is referencing an
 URL http://:/; (or maybe just :/) so your browser bar takes over
 control since that host cannot be found. Maybe check the source of that
 page for such an URL...

 Matt


 -
 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

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



RE: modal window problem

2010-03-10 Thread Martin Asenov
Please, anyone give some support on this one?

Thank you,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Monday, March 08, 2010 6:23 PM
To: users@wicket.apache.org
Subject: RE: modal window problem

Hi, Matthias! 

Well, I viewed the page source, and there is no text that says http://:/; . 
However, this happens only on two PCs from 10. Also, I typed on the one of the 
computers that have this error the above mentioned text in the browser and it 
led to the very same page with the very same parameters. Do you have any 
further ideas?

Thanks,
Martin

-Original Message-
From: Matthias Keller [mailto:matthias.kel...@ergon.ch] 
Sent: Monday, March 08, 2010 6:10 PM
To: users@wicket.apache.org
Subject: Re: modal window problem

On 2010-03-08 17:07, Martin Asenov wrote:
 It's me again. I just noticed some very strange error that I have no 
 explanation about. When I open a wicket modal window then it appears for a 
 while and closes and the entire page gets redirected to some browser related 
 pages, for instance ask.com, or some thing like this:

 http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12

 This is a modal window issue. Any help regarding the question will be highly 
 appreciated!

Hi

It appears that something on your page/modal window is referencing an 
URL http://:/; (or maybe just :/) so your browser bar takes over 
control since that host cannot be found. Maybe check the source of that 
page for such an URL...

Matt


-
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



Session expired drives me mad!

2010-03-08 Thread Martin Asenov
Hello everyone!

The session expired problem really drives me mad, because it's been couple of 
months or so since it started bothering me. Please advice me on what to do, 
because I'm despaired. Wicket tries to serialize every single class in my 
opinion.

I enabled the DEBUG of Wicket and messages like the following one are flooding 
the log. Here it is:

08-03-2010 17:30:03,445 ERROR 
org.apache.wicket.util.lang.Objects.objectToByteArray:1134 - Error serializing 
object class com.mycompany.myapp.ui.users.Users [object=[Page class = 
com.mycompany.myapp.ui.users.Users, id = 21, version = 0]]
   
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
Unable to serialize class: 
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler
Field hierarchy is:
  21 [class=com.mycompany.myapp.ui.users.Users, path=21]
private java.lang.Object org.apache.wicket.MarkupContainer.children 
[class=[Ljava.lang.Object;]
  protected java.lang.Object com.mycompany.myapp.ui.MyFormPanel.model[15] 
[class=org.apache.wicket.markup.html.WebMarkupContainer, path=21:holder]
private java.lang.Object org.apache.wicket.MarkupContainer.children 
[class=[Ljava.lang.Object;]
  private java.lang.Object 
org.apache.wicket.MarkupContainer.children[0] 
[class=com.mycompany.myapp.ui.users.Users$2, path=21:holder:view]
private java.lang.Object org.apache.wicket.MarkupContainer.children 
[class=[Ljava.lang.Object;]
  private java.lang.Object 
org.apache.wicket.MarkupContainer.children[0] 
[class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1]
private java.lang.Object 
org.apache.wicket.MarkupContainer.children 
[class=org.apache.wicket.markup.repeater.RepeatingView, 
path=21:holder:view:1:cols]
  private java.lang.Object 
org.apache.wicket.MarkupContainer.children 
[class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1:cols:2]
java.lang.Object org.apache.wicket.Component.data 
[class=com.mycompany.myapp.ui.users.SortedUsersProvider$1]
  final com.mycompany.myapp.ui.users.SortedUsersProvider 
com.mycompany.myapp.ui.users.SortedUsersProvider$1.this$0 
[class=com.mycompany.myapp.ui.users.SortedUsersProvider]
private com.mycompany.myapp.session.UserContext 
com.mycompany.myapp.ui.users.SortedUsersProvider.context 
[class=com.mycompany.myapp.session.UserContext]
  private com.mycompany.myapp.ui.util.Utilities 
com.mycompany.myapp.session.UserContext.utilities 
[class=com.mycompany.myapp.ui.util.Utilities]
private com.mycompany.myapp.admin.ManagementBean 
com.mycompany.myapp.ui.util.Utilities.domainAndUsersManagement 
[class=com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a]
  private net.sf.cglib.proxy.MethodInterceptor 
com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a.CGLIB$CALLBACK_0
 
[class=org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor]
private 
org.springframework.aop.framework.AdvisedSupport 
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.advised
 [class=org.springframework.aop.framework.ProxyFactory]
  private org.springframework.aop.Advisor[] 
org.springframework.aop.framework.AdvisedSupport.advisorArray 
[class=[Lorg.springframework.aop.Advisor;]
private org.springframework.aop.Advisor[] 
org.springframework.aop.framework.AdvisedSupport.advisorArray[0] 
[class=org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]
  private org.aopalliance.aop.Advice 
org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice 
[class=org.springframework.transaction.interceptor.TransactionInterceptor]
private org.aopalliance.aop.Advice 
org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice[write:1]
 [class=org.springframework.orm.jpa.JpaTransactionManager]
  private 
javax.persistence.EntityManagerFactory 
org.springframework.orm.jpa.JpaTransactionManager.entityManagerFactory 
[class=$Proxy29]
protected 
java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h 
[class=org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler]
 - field that is not serializable

Thank you in advance!

Regards,
Martin



RE: Session expired drives me mad!

2010-03-08 Thread Martin Asenov
Hello,

Well, I do use Spring Beans, and as shown in the stack trace, there is a field 
relation to the beans themselves. I don't think I can avoid it, do I? I create 
the beans by casting from the ApplicationContext.

Thank you,
Martin 

-Original Message-
From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal 
Bayramoglu
Sent: Monday, March 08, 2010 5:39 PM
To: users
Subject: Re: Session expired drives me mad!

Martin,

It looks like your page is holding on to Spring benas.
Are you using @SpringBean to inject Spring beans into your pages? That
way you would get a proxy to the beans so you don't need to worry
about them being serialisable.

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com


2010/3/8 Martin Asenov mase...@velti.com:
 Hello everyone!

 The session expired problem really drives me mad, because it's been couple of 
 months or so since it started bothering me. Please advice me on what to do, 
 because I'm despaired. Wicket tries to serialize every single class in my 
 opinion.

 I enabled the DEBUG of Wicket and messages like the following one are 
 flooding the log. Here it is:

 08-03-2010 17:30:03,445 ERROR 
 org.apache.wicket.util.lang.Objects.objectToByteArray:1134 - Error 
 serializing object class com.mycompany.myapp.ui.users.Users [object=[Page 
 class = com.mycompany.myapp.ui.users.Users, id = 21, version = 0]]
   
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
 Unable to serialize class: 
 org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler
 Field hierarchy is:
  21 [class=com.mycompany.myapp.ui.users.Users, path=21]
    private java.lang.Object org.apache.wicket.MarkupContainer.children 
 [class=[Ljava.lang.Object;]
      protected java.lang.Object com.mycompany.myapp.ui.MyFormPanel.model[15] 
 [class=org.apache.wicket.markup.html.WebMarkupContainer, path=21:holder]
        private java.lang.Object org.apache.wicket.MarkupContainer.children 
 [class=[Ljava.lang.Object;]
          private java.lang.Object 
 org.apache.wicket.MarkupContainer.children[0] 
 [class=com.mycompany.myapp.ui.users.Users$2, path=21:holder:view]
            private java.lang.Object 
 org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
              private java.lang.Object 
 org.apache.wicket.MarkupContainer.children[0] 
 [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1]
                private java.lang.Object 
 org.apache.wicket.MarkupContainer.children 
 [class=org.apache.wicket.markup.repeater.RepeatingView, 
 path=21:holder:view:1:cols]
                  private java.lang.Object 
 org.apache.wicket.MarkupContainer.children 
 [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1:cols:2]
                    java.lang.Object org.apache.wicket.Component.data 
 [class=com.mycompany.myapp.ui.users.SortedUsersProvider$1]
                      final com.mycompany.myapp.ui.users.SortedUsersProvider 
 com.mycompany.myapp.ui.users.SortedUsersProvider$1.this$0 
 [class=com.mycompany.myapp.ui.users.SortedUsersProvider]
                        private com.mycompany.myapp.session.UserContext 
 com.mycompany.myapp.ui.users.SortedUsersProvider.context 
 [class=com.mycompany.myapp.session.UserContext]
                          private com.mycompany.myapp.ui.util.Utilities 
 com.mycompany.myapp.session.UserContext.utilities 
 [class=com.mycompany.myapp.ui.util.Utilities]
                            private com.mycompany.myapp.admin.ManagementBean 
 com.mycompany.myapp.ui.util.Utilities.domainAndUsersManagement 
 [class=com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a]
                              private net.sf.cglib.proxy.MethodInterceptor 
 com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a.CGLIB$CALLBACK_0
  
 [class=org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor]
                                private 
 org.springframework.aop.framework.AdvisedSupport 
 org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.advised
  [class=org.springframework.aop.framework.ProxyFactory]
                                  private org.springframework.aop.Advisor[] 
 org.springframework.aop.framework.AdvisedSupport.advisorArray 
 [class=[Lorg.springframework.aop.Advisor;]
                                    private org.springframework.aop.Advisor[] 
 org.springframework.aop.framework.AdvisedSupport.advisorArray[0] 
 [class=org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]
                                      private org.aopalliance.aop.Advice 
 org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice 
 [class=org.springframework.transaction.interceptor.TransactionInterceptor]
                                        private org.aopalliance.aop.Advice

RE: Session expired drives me mad!

2010-03-08 Thread Martin Asenov
Thank you all for the help!

-Original Message-
From: Sigmar Muuga [mailto:meedi...@gmail.com] 
Sent: Monday, March 08, 2010 5:50 PM
To: users@wicket.apache.org
Subject: Re: Session expired drives me mad!

I have had no problems with @SpringBean

Also try to use them like this:
@SpringBean(name=yourBeanName)

This way you can avoid some mess that may occur in the future :)

On Mon, Mar 8, 2010 at 5:46 PM, James Carman
jcar...@carmanconsulting.comwrote:

 No, you need to use the @SpringBean annotation:

 http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach


 2010/3/8 Martin Asenov mase...@velti.com:
  Hello,
 
  Well, I do use Spring Beans, and as shown in the stack trace, there is a
 field relation to the beans themselves. I don't think I can avoid it, do I?
 I create the beans by casting from the ApplicationContext.
 
  Thank you,
  Martin
 
  -Original Message-
  From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal
 Bayramoglu
  Sent: Monday, March 08, 2010 5:39 PM
  To: users
  Subject: Re: Session expired drives me mad!
 
  Martin,
 
  It looks like your page is holding on to Spring benas.
  Are you using @SpringBean to inject Spring beans into your pages? That
  way you would get a proxy to the beans so you don't need to worry
  about them being serialisable.
 
  Regards - Cemal
  jWeekend
  OO  Java Technologies, Wicket
  Consulting, Development, Training
  http://jWeekend.com
 
 
  2010/3/8 Martin Asenov mase...@velti.com:
  Hello everyone!
 
  The session expired problem really drives me mad, because it's been
 couple of months or so since it started bothering me. Please advice me on
 what to do, because I'm despaired. Wicket tries to serialize every single
 class in my opinion.
 
  I enabled the DEBUG of Wicket and messages like the following one are
 flooding the log. Here it is:
 
  08-03-2010 17:30:03,445 ERROR
 org.apache.wicket.util.lang.Objects.objectToByteArray:1134 - Error
 serializing object class com.mycompany.myapp.ui.users.Users [object=[Page
 class = com.mycompany.myapp.ui.users.Users, id = 21, version = 0]]
 
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class:
 org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler
  Field hierarchy is:
   21 [class=com.mycompany.myapp.ui.users.Users, path=21]
 private java.lang.Object org.apache.wicket.MarkupContainer.children
 [class=[Ljava.lang.Object;]
   protected java.lang.Object
 com.mycompany.myapp.ui.MyFormPanel.model[15]
 [class=org.apache.wicket.markup.html.WebMarkupContainer, path=21:holder]
 private java.lang.Object
 org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
   private java.lang.Object
 org.apache.wicket.MarkupContainer.children[0]
 [class=com.mycompany.myapp.ui.users.Users$2, path=21:holder:view]
 private java.lang.Object
 org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
   private java.lang.Object
 org.apache.wicket.MarkupContainer.children[0]
 [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1]
 private java.lang.Object
 org.apache.wicket.MarkupContainer.children
 [class=org.apache.wicket.markup.repeater.RepeatingView,
 path=21:holder:view:1:cols]
   private java.lang.Object
 org.apache.wicket.MarkupContainer.children
 [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1:cols:2]
 java.lang.Object org.apache.wicket.Component.data
 [class=com.mycompany.myapp.ui.users.SortedUsersProvider$1]
   final
 com.mycompany.myapp.ui.users.SortedUsersProvider
 com.mycompany.myapp.ui.users.SortedUsersProvider$1.this$0
 [class=com.mycompany.myapp.ui.users.SortedUsersProvider]
 private com.mycompany.myapp.session.UserContext
 com.mycompany.myapp.ui.users.SortedUsersProvider.context
 [class=com.mycompany.myapp.session.UserContext]
   private com.mycompany.myapp.ui.util.Utilities
 com.mycompany.myapp.session.UserContext.utilities
 [class=com.mycompany.myapp.ui.util.Utilities]
 private
 com.mycompany.myapp.admin.ManagementBean
 com.mycompany.myapp.ui.util.Utilities.domainAndUsersManagement
 [class=com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a]
   private
 net.sf.cglib.proxy.MethodInterceptor
 com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a.CGLIB$CALLBACK_0
 [class=org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor]
 private
 org.springframework.aop.framework.AdvisedSupport
 org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.advised
 [class=org.springframework.aop.framework.ProxyFactory]
   private
 org.springframework.aop.Advisor

modal window problem

2010-03-08 Thread Martin Asenov
It's me again. I just noticed some very strange error that I have no 
explanation about. When I open a wicket modal window then it appears for a 
while and closes and the entire page gets redirected to some browser related 
pages, for instance ask.com, or some thing like this:

http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12

This is a modal window issue. Any help regarding the question will be highly 
appreciated!

P.S. It's happening on Firefox 3.5.8

Regards,
Martin



RE: modal window problem

2010-03-08 Thread Martin Asenov
Hi, Matthias! 

Well, I viewed the page source, and there is no text that says http://:/; . 
However, this happens only on two PCs from 10. Also, I typed on the one of the 
computers that have this error the above mentioned text in the browser and it 
led to the very same page with the very same parameters. Do you have any 
further ideas?

Thanks,
Martin

-Original Message-
From: Matthias Keller [mailto:matthias.kel...@ergon.ch] 
Sent: Monday, March 08, 2010 6:10 PM
To: users@wicket.apache.org
Subject: Re: modal window problem

On 2010-03-08 17:07, Martin Asenov wrote:
 It's me again. I just noticed some very strange error that I have no 
 explanation about. When I open a wicket modal window then it appears for a 
 while and closes and the entire page gets redirected to some browser related 
 pages, for instance ask.com, or some thing like this:

 http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12

 This is a modal window issue. Any help regarding the question will be highly 
 appreciated!

Hi

It appears that something on your page/modal window is referencing an 
URL http://:/; (or maybe just :/) so your browser bar takes over 
control since that host cannot be found. Maybe check the source of that 
page for such an URL...

Matt


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



RE: Session expired drives me mad!

2010-03-08 Thread Martin Asenov
Well I did see it, but not in that deep detail like this...

Regards,
Martin

-Original Message-
From: Martin Grigorov [mailto:mcgreg...@e-card.bg] 
Sent: Monday, March 08, 2010 6:25 PM
To: users@wicket.apache.org
Subject: Re: Session expired drives me mad!

On Mon, 2010-03-08 at 17:36 +0200, Martin Asenov wrote:
 Hello everyone!
 
 The session expired problem really drives me mad, because it's been couple of 
 months or so since it started bothering me. Please advice me on what to do, 
 because I'm despaired. Wicket tries to serialize every single class in my 
 opinion.
 
 I enabled the DEBUG of Wicket and messages like the following one are 
 flooding the log. Here it is:
 
 08-03-2010 17:30:03,445 ERROR 
 org.apache.wicket.util.lang.Objects.objectToByteArray:1134 - Error 
 serializing object class com.mycompany.myapp.ui.users.Users [object=[Page 
 class = com.mycompany.myapp.ui.users.Users, id = 21, version = 0]]
This is an ERROR! 
You had to see it long time before enabling DEBUG. 
Unless you disable everything but FATALs.

 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
 Unable to serialize class: 
 org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler
 Field hierarchy is:
   21 [class=com.mycompany.myapp.ui.users.Users, path=21]
 private java.lang.Object org.apache.wicket.MarkupContainer.children 
 [class=[Ljava.lang.Object;]
   protected java.lang.Object com.mycompany.myapp.ui.MyFormPanel.model[15] 
 [class=org.apache.wicket.markup.html.WebMarkupContainer, path=21:holder]
 private java.lang.Object org.apache.wicket.MarkupContainer.children 
 [class=[Ljava.lang.Object;]
   private java.lang.Object 
 org.apache.wicket.MarkupContainer.children[0] 
 [class=com.mycompany.myapp.ui.users.Users$2, path=21:holder:view]
 private java.lang.Object 
 org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
   private java.lang.Object 
 org.apache.wicket.MarkupContainer.children[0] 
 [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1]
 private java.lang.Object 
 org.apache.wicket.MarkupContainer.children 
 [class=org.apache.wicket.markup.repeater.RepeatingView, 
 path=21:holder:view:1:cols]
   private java.lang.Object 
 org.apache.wicket.MarkupContainer.children 
 [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1:cols:2]
 java.lang.Object org.apache.wicket.Component.data 
 [class=com.mycompany.myapp.ui.users.SortedUsersProvider$1]
   final com.mycompany.myapp.ui.users.SortedUsersProvider 
 com.mycompany.myapp.ui.users.SortedUsersProvider$1.this$0 
 [class=com.mycompany.myapp.ui.users.SortedUsersProvider]
 private com.mycompany.myapp.session.UserContext 
 com.mycompany.myapp.ui.users.SortedUsersProvider.context 
 [class=com.mycompany.myapp.session.UserContext]
   private com.mycompany.myapp.ui.util.Utilities 
 com.mycompany.myapp.session.UserContext.utilities 
 [class=com.mycompany.myapp.ui.util.Utilities]
 private com.mycompany.myapp.admin.ManagementBean 
 com.mycompany.myapp.ui.util.Utilities.domainAndUsersManagement 
 [class=com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a]
   private net.sf.cglib.proxy.MethodInterceptor 
 com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a.CGLIB$CALLBACK_0
  
 [class=org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor]
 private 
 org.springframework.aop.framework.AdvisedSupport 
 org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.advised
  [class=org.springframework.aop.framework.ProxyFactory]
   private org.springframework.aop.Advisor[] 
 org.springframework.aop.framework.AdvisedSupport.advisorArray 
 [class=[Lorg.springframework.aop.Advisor;]
 private org.springframework.aop.Advisor[] 
 org.springframework.aop.framework.AdvisedSupport.advisorArray[0] 
 [class=org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]
   private org.aopalliance.aop.Advice 
 org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice 
 [class=org.springframework.transaction.interceptor.TransactionInterceptor]
 private org.aopalliance.aop.Advice 
 org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice[write:1]
  [class=org.springframework.orm.jpa.JpaTransactionManager]
   private 
 javax.persistence.EntityManagerFactory 
 org.springframework.orm.jpa.JpaTransactionManager.entityManagerFactory 
 [class=$Proxy29]
 protected

DownloadLink problem

2010-03-02 Thread Martin Asenov
Hi, guys!

I experience some DownloadLink problem - I have these fields:

File linkModel;
DownloadLink theLink = new DownloadLink(link_id, new ModelFile(linkModel));
theLink.setOutputMarkupId(true);

After another button click I have the linkModel field pointing to real file on 
the file system. And then I say:

target.addComponent(theLink);

the link name is still invisible, and when I click on the small clickable area, 
Wicket comes up with:

WicketMessage: Method onLinkClicked of interface 
org.apache.wicket.markup.html.link.ILinkListener targeted at component 
[MarkupContainer [Component id = exported_file_link]] threw an exception

Root cause:

java.lang.IllegalStateException: 
org.apache.wicket.markup.html.link.DownloadLink failed to retrieve a File 
object from model
 at 
org.apache.wicket.markup.html.link.DownloadLink.onClick(DownloadLink.java:141)
 at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:224)
 at java.lang.reflect.Method.invoke(Method.java:597)
I thought I've made everything perfect, but it seems that I haven't.
Any help is appreciated!

Best regards,
Martin



RE: RE: How can i know when a users redirects to other page

2010-03-02 Thread Martin Asenov
Hi, Ernesto!

This is most likely the way I'll do the thing. I have a quartz scheduler and 
will arrange a recurring job that will clean files older than a day for 
instance.

Thank you all!
Best regards,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, March 02, 2010 12:35 PM
To: users@wicket.apache.org
Subject: Re: RE: How can i know when a users redirects to other page

just answered what he was asking;-). Another thing is if this is the best
solution for the use case. Maybe another possibility is to have a
background job that does clean unused files from time to time.

Best,

Ernesto

On Tue, Mar 2, 2010 at 11:28 AM, Sergey Olefir solf.li...@gmail.com wrote:



 I'm not sure if session invalidation will be carried out if server
 stops/crashes. Although I think the session invalidation mechanism is still
 the most reliable of all that was proposed (my personal first reaction was
 you can't do it reliably -- although after reading the thread I have to
 agree that e.g. session invalidation might work).

 Anyway, if going session invalidation route, it might be necessary to clean
 up the directory at the server startup to make sure all stray files are
 cleaned up.


 reiern70 wrote:
 
 
 http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSessionListener.html
 
  Ernesto
 

 --
 View this message in context:
 http://old.nabble.com/How-can-i-know-when-a-users-redirects-to-other-page-tp27742803p27754252.html
 Sent from the Wicket - User 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: DownloadLink problem

2010-03-02 Thread Martin Asenov
Unfortunately doesn't work this way... The model is never refreshed...

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, March 02, 2010 2:31 PM
To: users@wicket.apache.org
Subject: Re: DownloadLink problem

Not sure... but could you try something like:

DownloadLink downloadLink = new DownloadLink(link_id, new
AbstractReadOnlyModelFile(){
public File getObject() {
return this.linkModel;
};
},myfile.xxx);
downloadLink.setOutputMarkupId(true);

and make linkModel a member variable? This way file will be refreshed.

Best,

Ernnesto

On Tue, Mar 2, 2010 at 1:14 PM, Martin Asenov mase...@velti.com wrote:

 Hi, guys!

 I experience some DownloadLink problem - I have these fields:

 File linkModel;
 DownloadLink theLink = new DownloadLink(link_id, new
 ModelFile(linkModel));
 theLink.setOutputMarkupId(true);

 After another button click I have the linkModel field pointing to real file
 on the file system. And then I say:

 target.addComponent(theLink);

 the link name is still invisible, and when I click on the small clickable
 area, Wicket comes up with:

 WicketMessage: Method onLinkClicked of interface
 org.apache.wicket.markup.html.link.ILinkListener targeted at component
 [MarkupContainer [Component id = exported_file_link]] threw an exception

 Root cause:

 java.lang.IllegalStateException:
 org.apache.wicket.markup.html.link.DownloadLink failed to retrieve a File
 object from model
 at
 org.apache.wicket.markup.html.link.DownloadLink.onClick(DownloadLink.java:141)
 at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:224)
 at java.lang.reflect.Method.invoke(Method.java:597)
 I thought I've made everything perfect, but it seems that I haven't.
 Any help is appreciated!

 Best regards,
 Martin



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



RE: DownloadLink problem

2010-03-02 Thread Martin Asenov
Thanks Ernesto!

But I want to have the link invisible on startup (because the file's empty). So 
I have this: (doesn't work, but has to)

exportedFileLink = new DownloadLink(exported_file_link, new 
LoadableDetachableModelFile() {

  private static final long serialVersionUID = 1L;

  @Override
  protected File load() {
return exportedFile;
  }
}, PhonebookExporter.OUTPUT_FILE_NAME) {

  private static final long serialVersionUID = 1L;

  @Override
  public boolean isVisible() {
return exportedFile != null;
  }
};
final WebMarkupContainer exportedFileLinkHolder = new 
WebMarkupContainer(link_holder);
exportedFileLinkHolder.setOutputMarkupId(true);
exportedFileLinkHolder.add(exportedFileLink);

rightForm.add(exportedFileLinkHolder);
rightForm.add(new AjaxButton(export_button) {

  private static final long serialVersionUID = 1L;

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form? form) {

PhonebookExporter exporter = getExporter();
exportedFile = exporter.export(uploadFolder);

if (exportedFile == null) {
  error(getString(not_exported));
} else {
  info(getString(exported));
}

target.addComponent(exportedFileLinkHolder);
target.addComponent(feed);
  }
  
});

I really start to get pissed off by this one!!! g

Regards,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, March 02, 2010 3:50 PM
To: users@wicket.apache.org
Subject: Re: DownloadLink problem

Weird. Just try this example:

import java.io.File;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.link.DownloadLink;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.AbstractReadOnlyModel;

/**
 * @author Ernesto Reinaldo Barreiro (reier...@gmail.com)
 *
 */
public class TestDownLoadLink extends Panel {


private static final long serialVersionUID = 1L;

private File test = null;

private DownloadLink download;
/**
 * @param id
 */
public TestDownLoadLink(String id) {
super(id);

this.download = new DownloadLink(download, new
AbstractReadOnlyModelFile(){

 private static final long
serialVersionUID = 1L;

@Override
public File getObject() {
return test;
}

 },TestDownLoadLink.html) {

private static final long serialVersionUID = 1L;

@Override
public boolean isEnabled() {

return test != null;
}
 };
 download.setOutputMarkupId(true);
 add(download);

 AjaxLinkVoid update = new AjaxLinkVoid(update) {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
test = new
File(TestDownLoadLink.class.getResource(TestDownLoadLink.html).getFile());
if(target != null) {
target.addComponent(TestDownLoadLink.this.download);
}
}
 };

 add(update);
}
}

and the HTML

html xmlns:wicket=org.apache.wicket
head
/head
body
wicket:panel
a wicket:id=downloaddownload/a
a wicket:id=updateClick me to update download/a
/wicket:panel
/body
/html

Just place them somewhere and do

new TestDownLoadLink(xxx);

It works for me. First time the download link is disable and when you click
on the AJAX link file is assigned, link is refreshed and you can download
your file;-)

Best,

Ernesto

On Tue, Mar 2, 2010 at 2:24 PM, Martin Asenov mase...@velti.com wrote:

 Unfortunately doesn't work this way... The model is never refreshed...

 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Tuesday, March 02, 2010 2:31 PM
 To: users@wicket.apache.org
 Subject: Re: DownloadLink problem

 Not sure... but could you try something like:

 DownloadLink downloadLink = new DownloadLink(link_id, new
 AbstractReadOnlyModelFile(){
public File getObject() {
return this.linkModel;
};
},myfile.xxx);
downloadLink.setOutputMarkupId(true);

 and make linkModel a member variable? This way file will be refreshed.

 Best,

 Ernnesto

 On Tue, Mar 2, 2010 at 1:14 PM, Martin Asenov mase...@velti.com wrote:

  Hi, guys!
 
  I experience some DownloadLink problem - I have these fields:
 
  File linkModel;
  DownloadLink theLink = new DownloadLink(link_id, new
  ModelFile(linkModel));
  theLink.setOutputMarkupId(true);
 
  After another button click I have the linkModel field pointing to real
 file
  on the file system. And then I say

RE: DownloadLink problem

2010-03-02 Thread Martin Asenov
Oh my God!!! The problem was that the button that is supposed to do the export 
was of type submit and it reloads the page, instead of refreshing components. I 
changed to type=button and everything's fine...

As people say - there is no patch for human stupidity...

Thank you all for the help!

Best,
Martin

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Tuesday, March 02, 2010 4:34 PM
To: users@wicket.apache.org
Subject: RE: DownloadLink problem

Thanks Ernesto!

But I want to have the link invisible on startup (because the file's empty). So 
I have this: (doesn't work, but has to)

exportedFileLink = new DownloadLink(exported_file_link, new 
LoadableDetachableModelFile() {

  private static final long serialVersionUID = 1L;

  @Override
  protected File load() {
return exportedFile;
  }
}, PhonebookExporter.OUTPUT_FILE_NAME) {

  private static final long serialVersionUID = 1L;

  @Override
  public boolean isVisible() {
return exportedFile != null;
  }
};
final WebMarkupContainer exportedFileLinkHolder = new 
WebMarkupContainer(link_holder);
exportedFileLinkHolder.setOutputMarkupId(true);
exportedFileLinkHolder.add(exportedFileLink);

rightForm.add(exportedFileLinkHolder);
rightForm.add(new AjaxButton(export_button) {

  private static final long serialVersionUID = 1L;

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form? form) {

PhonebookExporter exporter = getExporter();
exportedFile = exporter.export(uploadFolder);

if (exportedFile == null) {
  error(getString(not_exported));
} else {
  info(getString(exported));
}

target.addComponent(exportedFileLinkHolder);
target.addComponent(feed);
  }
  
});

I really start to get pissed off by this one!!! g

Regards,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, March 02, 2010 3:50 PM
To: users@wicket.apache.org
Subject: Re: DownloadLink problem

Weird. Just try this example:

import java.io.File;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.link.DownloadLink;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.AbstractReadOnlyModel;

/**
 * @author Ernesto Reinaldo Barreiro (reier...@gmail.com)
 *
 */
public class TestDownLoadLink extends Panel {


private static final long serialVersionUID = 1L;

private File test = null;

private DownloadLink download;
/**
 * @param id
 */
public TestDownLoadLink(String id) {
super(id);

this.download = new DownloadLink(download, new
AbstractReadOnlyModelFile(){

 private static final long
serialVersionUID = 1L;

@Override
public File getObject() {
return test;
}

 },TestDownLoadLink.html) {

private static final long serialVersionUID = 1L;

@Override
public boolean isEnabled() {

return test != null;
}
 };
 download.setOutputMarkupId(true);
 add(download);

 AjaxLinkVoid update = new AjaxLinkVoid(update) {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
test = new
File(TestDownLoadLink.class.getResource(TestDownLoadLink.html).getFile());
if(target != null) {
target.addComponent(TestDownLoadLink.this.download);
}
}
 };

 add(update);
}
}

and the HTML

html xmlns:wicket=org.apache.wicket
head
/head
body
wicket:panel
a wicket:id=downloaddownload/a
a wicket:id=updateClick me to update download/a
/wicket:panel
/body
/html

Just place them somewhere and do

new TestDownLoadLink(xxx);

It works for me. First time the download link is disable and when you click
on the AJAX link file is assigned, link is refreshed and you can download
your file;-)

Best,

Ernesto

On Tue, Mar 2, 2010 at 2:24 PM, Martin Asenov mase...@velti.com wrote:

 Unfortunately doesn't work this way... The model is never refreshed...

 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Tuesday, March 02, 2010 2:31 PM
 To: users@wicket.apache.org
 Subject: Re: DownloadLink problem

 Not sure... but could you try something like:

 DownloadLink downloadLink = new DownloadLink(link_id, new
 AbstractReadOnlyModelFile(){
public File getObject() {
return this.linkModel;
};
},myfile.xxx);
downloadLink.setOutputMarkupId(true);

 and make linkModel a member

RE: DownloadLink problem

2010-03-02 Thread Martin Asenov
It doesn't... :-)

Thank you anyway! :-)
-Original Message-
From: Riyad Kalla [mailto:rka...@gmail.com] 
Sent: Tuesday, March 02, 2010 6:35 PM
To: users@wicket.apache.org
Subject: Re: DownloadLink problem

Martin,

If it makes you feel any better, it would have been a week or longer before
I thought to change that, good fine :)

-R

On Tue, Mar 2, 2010 at 9:32 AM, Martin Asenov mase...@velti.com wrote:

 Oh my God!!! The problem was that the button that is supposed to do the
 export was of type submit and it reloads the page, instead of refreshing
 components. I changed to type=button and everything's fine...

 As people say - there is no patch for human stupidity...

 Thank you all for the help!

 Best,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Tuesday, March 02, 2010 4:34 PM
 To: users@wicket.apache.org
 Subject: RE: DownloadLink problem

 Thanks Ernesto!

 But I want to have the link invisible on startup (because the file's
 empty). So I have this: (doesn't work, but has to)

exportedFileLink = new DownloadLink(exported_file_link, new
 LoadableDetachableModelFile() {

  private static final long serialVersionUID = 1L;

  @Override
  protected File load() {
return exportedFile;
  }
}, PhonebookExporter.OUTPUT_FILE_NAME) {

  private static final long serialVersionUID = 1L;

  @Override
  public boolean isVisible() {
return exportedFile != null;
  }
};
final WebMarkupContainer exportedFileLinkHolder = new
 WebMarkupContainer(link_holder);
exportedFileLinkHolder.setOutputMarkupId(true);
exportedFileLinkHolder.add(exportedFileLink);

rightForm.add(exportedFileLinkHolder);
rightForm.add(new AjaxButton(export_button) {

  private static final long serialVersionUID = 1L;

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form? form) {

PhonebookExporter exporter = getExporter();
exportedFile = exporter.export(uploadFolder);

if (exportedFile == null) {
  error(getString(not_exported));
} else {
  info(getString(exported));
}

target.addComponent(exportedFileLinkHolder);
target.addComponent(feed);
  }

});

 I really start to get pissed off by this one!!! g

 Regards,
 Martin

 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Tuesday, March 02, 2010 3:50 PM
 To: users@wicket.apache.org
 Subject: Re: DownloadLink problem

 Weird. Just try this example:

 import java.io.File;

 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.markup.html.link.DownloadLink;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.AbstractReadOnlyModel;

 /**
  * @author Ernesto Reinaldo Barreiro (reier...@gmail.com)
  *
  */
 public class TestDownLoadLink extends Panel {


private static final long serialVersionUID = 1L;

private File test = null;

private DownloadLink download;
/**
 * @param id
 */
public TestDownLoadLink(String id) {
super(id);

this.download = new DownloadLink(download, new
 AbstractReadOnlyModelFile(){

 private static final long
 serialVersionUID = 1L;

@Override
public File getObject() {
return test;
}

 },TestDownLoadLink.html) {

private static final long serialVersionUID = 1L;

@Override
public boolean isEnabled() {

return test != null;
}
 };
 download.setOutputMarkupId(true);
 add(download);

 AjaxLinkVoid update = new AjaxLinkVoid(update) {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
test = new

 File(TestDownLoadLink.class.getResource(TestDownLoadLink.html).getFile());
if(target != null) {
target.addComponent(TestDownLoadLink.this.download);
}
}
 };

 add(update);
}
 }

 and the HTML

 html xmlns:wicket=org.apache.wicket
 head
 /head
 body
 wicket:panel
 a wicket:id=downloaddownload/a
 a wicket:id=updateClick me to update download/a
 /wicket:panel
 /body
 /html

 Just place them somewhere and do

 new TestDownLoadLink(xxx);

 It works for me. First time the download link is disable and when you click
 on the AJAX link file is assigned, link is refreshed and you can download
 your file;-)

 Best,

 Ernesto

 On Tue, Mar 2, 2010 at 2:24 PM, Martin Asenov mase...@velti.com wrote:

  Unfortunately doesn't work this way... The model is never refreshed...
 
  -Original Message-
  From: Ernesto Reinaldo Barreiro [mailto:reier

How can i know when a users redirects to other page

2010-03-01 Thread Martin Asenov
Hello, everyone!

I was wondering if there's a way to know for instance if the user is on a page 
is there an event fired that indicates that the user is no longer on this page. 
I saw the method 'onRedirect()', but it's fired when the user comes to the 
page. I want to know when the user changes the page.

Thanks in advance!

Regards,
Martin



RE: How can i know when a users redirects to other page

2010-03-01 Thread Martin Asenov
Thank you all for the support, I highly appreciate it!

Regards,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Monday, March 01, 2010 5:31 PM
To: users@wicket.apache.org
Subject: Re: How can i know when a users redirects to other page

Just an idea... Use a component instantiation listener and delete the
file, if it exists, whenever any other page is created.

Regards,

Ernesto

On Mon, Mar 1, 2010 at 4:09 PM, Martin Asenov mase...@velti.com wrote:

 The use case is that I generate a file located in a temp folder that
 appears on page under a download link. I want to delete the file when the
 user goes in another page.

 Regards,
 Martin

 -Original Message-
 From: Riyad Kalla [mailto:rka...@gmail.com]
 Sent: Monday, March 01, 2010 4:31 PM
 To: users@wicket.apache.org
 Subject: Re: How can i know when a users redirects to other page

 Martin can you explain your use-case, namely what is the importance of
 seeing which page a user is no-longer on?

 Seems like a super-easy way to do this would be to extend a base-page that
 updates a Session metadata element with the current page the user is on and
 allow a listener to be notified when this changes?

 But depending on who you want listening to this I suppose you could do away
 with the whole listener/metadata thing and just have your basepage call
 some
 trigger method onRender that would do some work?

 -R

 On Mon, Mar 1, 2010 at 5:31 AM, Martin Asenov mase...@velti.com wrote:

  Hello, everyone!
 
  I was wondering if there's a way to know for instance if the user is on a
  page is there an event fired that indicates that the user is no longer on
  this page. I saw the method 'onRedirect()', but it's fired when the user
  comes to the page. I want to know when the user changes the page.
 
  Thanks in advance!
 
  Regards,
  Martin
 
 

 -
 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: RE: How can i know when a users redirects to other page

2010-03-01 Thread Martin Asenov
Hi, Ed!

How do I know when the session expires? I can't see a method onInvalidate() for 
instance. Would you give me a hint on this?

Thank you all for the help!

Best regards,
Martin

-Original Message-
From: Edward Zarecor [mailto:edw...@indeterminate.org] 
Sent: Tuesday, March 02, 2010 1:46 AM
To: users@wicket.apache.org
Subject: Re: RE: How can i know when a users redirects to other page

Would on session expiry be a better place to handle this?  Implementation
would be simple and you could avoid ever needing to regenerate a file if
that is useful to you.  It also naturally handles the case where a user
doesn't leave the page.

Ed.

On Mar 1, 2010 10:09 AM, Martin Asenov mase...@velti.com wrote:

The use case is that I generate a file located in a temp folder that appears
on page under a download link. I want to delete the file when the user goes
in another page.

Regards,
Martin


-Original Message-
From: Riyad Kalla [mailto:rka...@gmail.com]
Sent: Monday, March 01, 201...
-
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



How to ajax update a component without triggered ajaxrequesttarget

2010-02-15 Thread Martin Asenov
Hello guys!

How can I update a component without having AjaxRequestTarget triggered from a 
button or a link?

I tried this:
myComponent.renderComponent();
new AjaxRequestTarget(getPage()).addComponent(myComponent)

myComponent has output markup id set to true

both didn't work for me...

Thanks in advance for your help!

Regards,
Martin


RE: How to ajax update a component without triggered ajaxrequesttarget

2010-02-15 Thread Martin Asenov
Hello, Ernesto!

The use case is that I have modal in a modal. 

The first modal displays some information and the second modal is a 
confirmation dialog that asks the user if he really wants to remove the entry.

when I say in the conf dialog under the 'yes' button; 
dialog.setWindowClosedCallback(...);
dialog.close(target);

the dialog really gets closed, but the callback is never executed.
this error occurs only in this specific case, when the parent page is in 
another modal. When it's not, everything works fine.

So I replaced the above mentioned paragraph with:

parentPage.executeSomeMethod(target);
dialog.close(target);

of course the target isn't a valid one, because it comes from another window 
(or so I think)

so my idea is to trigger ajaxrequesttarget for a page, without having to 
trigger it from a ajax button/link or a modal window callback

Thanks,
Martin

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Monday, February 15, 2010 5:42 PM
To: users@wicket.apache.org
Subject: Re: How to ajax update a component without triggered ajaxrequesttarget

Can you explain a bit more what you want to achieve? Or your use case?

Ernesto

On Mon, Feb 15, 2010 at 4:38 PM, Martin Asenov mase...@velti.com wrote:

 Hello guys!

 How can I update a component without having AjaxRequestTarget triggered
 from a button or a link?

 I tried this:
 myComponent.renderComponent();
 new AjaxRequestTarget(getPage()).addComponent(myComponent)

 myComponent has output markup id set to true

 both didn't work for me...

 Thanks in advance for your help!

 Regards,
 Martin


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



modal in a modal problem

2010-02-12 Thread Martin Asenov
Hello, everyone!

I experience a problem when triggering a modal window from another modal 
window. When a removal icon is clicked in the first modal, there's a 
confirmation dialog, that pops up. Although I've set everything up, the 
windowClosedCallback gets activated only when I confirm removal twice. I have 
no idea why it happens this way. The confirmation dialog works fine for all 
RepeaterHoldingPage-s I have, excluding the one I have placed in another modal. 
Here's the code of the conf dialog:

   public ConfirmationDialog(String question, final ModalWindow parent, 
final RepeaterHoldingPage page, final Object entry) {

 System.out.println(confirmation dialog called);

 questionLabel = new Label(question, question);
 yesButton = new AjaxButton(yes_button, new 
ModelString(getString(yes))) {

private static final long serialVersionUID = 1l;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? 
form) {
   System.out.println(yes button clicked);
   parent.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {

  private static final long serialVersionUID = 
1L;

  @Override
  public void onClose(AjaxRequestTarget target) 
{
page.removeItem(entry, target);
System.out.println(removal supposed to 
be called);
  }
   });

   parent.close(target);
}
 };

What happens is that I trigger the conf dialog, press the 'yes' button and in 
the console the following gets printed:
confirmation dialog called;



RE: modal in a modal problem

2010-02-12 Thread Martin Asenov
I forgot to mention that the first time I click yes, I get:

confirmation dialog called
yes button clicked

in console, and the conf dialog closes itself. when I open it for second time, 
I get
confirmation dialog called
yes button clicked
removal supposed to be called

and the item really gets removed, but why triggering it twice?

Thanks in advance!

From: Martin Asenov
Sent: Friday, February 12, 2010 10:20 AM
To: 'users@wicket.apache.org'
Subject: modal in a modal problem

Hello, everyone!

I experience a problem when triggering a modal window from another modal 
window. When a removal icon is clicked in the first modal, there's a 
confirmation dialog, that pops up. Although I've set everything up, the 
windowClosedCallback gets activated only when I confirm removal twice. I have 
no idea why it happens this way. The confirmation dialog works fine for all 
RepeaterHoldingPage-s I have, excluding the one I have placed in another modal. 
Here's the code of the conf dialog:

   public ConfirmationDialog(String question, final ModalWindow parent, 
final RepeaterHoldingPage page, final Object entry) {

 System.out.println(confirmation dialog called);

 questionLabel = new Label(question, question);
 yesButton = new AjaxButton(yes_button, new 
ModelString(getString(yes))) {

private static final long serialVersionUID = 1l;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? 
form) {
   System.out.println(yes button clicked);
   parent.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {

  private static final long serialVersionUID = 
1L;

  @Override
  public void onClose(AjaxRequestTarget target) 
{
page.removeItem(entry, target);
System.out.println(removal supposed to 
be called);
  }
   });

   parent.close(target);
}
 };

What happens is that I trigger the conf dialog, press the 'yes' button and in 
the console the following gets printed:
confirmation dialog called;



RE: modal in a modal problem

2010-02-12 Thread Martin Asenov
Does anyone know? Please, people, I'm getting despaired of this...

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Friday, February 12, 2010 10:23 AM
To: users@wicket.apache.org
Subject: RE: modal in a modal problem

I forgot to mention that the first time I click yes, I get:

confirmation dialog called
yes button clicked

in console, and the conf dialog closes itself. when I open it for second time, 
I get
confirmation dialog called
yes button clicked
removal supposed to be called

and the item really gets removed, but why triggering it twice?

Thanks in advance!

From: Martin Asenov
Sent: Friday, February 12, 2010 10:20 AM
To: 'users@wicket.apache.org'
Subject: modal in a modal problem

Hello, everyone!

I experience a problem when triggering a modal window from another modal 
window. When a removal icon is clicked in the first modal, there's a 
confirmation dialog, that pops up. Although I've set everything up, the 
windowClosedCallback gets activated only when I confirm removal twice. I have 
no idea why it happens this way. The confirmation dialog works fine for all 
RepeaterHoldingPage-s I have, excluding the one I have placed in another modal. 
Here's the code of the conf dialog:

   public ConfirmationDialog(String question, final ModalWindow parent, 
final RepeaterHoldingPage page, final Object entry) {

 System.out.println(confirmation dialog called);

 questionLabel = new Label(question, question);
 yesButton = new AjaxButton(yes_button, new 
ModelString(getString(yes))) {

private static final long serialVersionUID = 1l;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? 
form) {
   System.out.println(yes button clicked);
   parent.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {

  private static final long serialVersionUID = 
1L;

  @Override
  public void onClose(AjaxRequestTarget target) 
{
page.removeItem(entry, target);
System.out.println(removal supposed to 
be called);
  }
   });

   parent.close(target);
}
 };

What happens is that I trigger the conf dialog, press the 'yes' button and in 
the console the following gets printed:
confirmation dialog called;


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



setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Martin Asenov
Hello guys!

I've got three pages, where I do certain check in the beginning and if the 
criteria is not met, I redirect to home page. I make it that way:

public MyPageClass {

if (something) {
system.out.println(mypageclass - we're in);
setResponsePage(getApplication().getHomePage());
}

 page initialization afterwards
}

The strange thing is that it works for one of the pages, for another two - it 
does not - there is no redirection at all; it goes on with further 
initializing. The criteria check block is the very same one in each of the 
pages.

Appreciate if someone helps!

Regards,
Martin


RE: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Martin Asenov
Thanks friend! Works great! You saved me a lot of time!

Best regards,
Martin

-Original Message-
From: Major Péter [mailto:majorpe...@sch.bme.hu] 
Sent: Thursday, February 04, 2010 3:21 PM
To: users@wicket.apache.org
Subject: Re: setResponsePage in the beggining of a constructor does not work

Hi,

the setresponsepage only marks, that the pagetarget is something else on
the end of the cycle, but it isn't stopping the execution of the current
page. If you want that, then use:
throw new RestartResponseException(getApplication().getHomePage());

Regards,
Peter

2010-02-04 14:16 keltezéssel, Martin Asenov írta:
 Hello guys!
 
 I've got three pages, where I do certain check in the beginning and if the 
 criteria is not met, I redirect to home page. I make it that way:
 
 public MyPageClass {
 
 if (something) {
 system.out.println(mypageclass - we're in);
 setResponsePage(getApplication().getHomePage());
 }
 
  page initialization afterwards
 }
 
 The strange thing is that it works for one of the pages, for another two - it 
 does not - there is no redirection at all; it goes on with further 
 initializing. The criteria check block is the very same one in each of the 
 pages.
 
 Appreciate if someone helps!
 
 Regards,
 Martin

-
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: Very strange exception

2010-02-03 Thread Martin Asenov
Hi, Wilhelmsen!

Yes, this is pretty clear. I've got enough experience in order to know this :) 
Maybe the problem is the wicket:id, which I've named 'label'. Maybe this is 
problem, since I heard certain 'ids' cause problems, like buttons with 
id=submit, links with id=link and so on.

Thank you, anyway!

Regards, Martin

-Original Message-
From: Wilhelmsen Tor Iver [mailto:toriv...@arrive.no] 
Sent: Wednesday, February 03, 2010 10:05 AM
To: users@wicket.apache.org
Subject: Re: Very strange exception

 WicketMessage: The component(s) below failed to render. A common
 problem is that you have added a component in code but forgot to
 reference it in the markup (thus the component will never be rendered).

When you do

add(new Label(label, ...

in a Page, you also need something like

span wicket:id=labelThis gets replaced/span

in your HTML template.

- Tor Iver

-
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: Very strange exception

2010-02-03 Thread Martin Asenov
I found it! That label was missing in my set access denied page. I had to click 
on the display page link in the bottom to see where this happens.

Thank you all!
Regards,
Martin

-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Wednesday, February 03, 2010 5:04 PM
To: users@wicket.apache.org
Subject: Re: Very strange exception

I have used id=label a lot in my pages/components, so I don't think
that's your problem.  Are you sure your label is set up in your markup
in the right spot (in the hierarchy)?

On Wed, Feb 3, 2010 at 3:11 AM, Martin Asenov mase...@velti.com wrote:
 Hi, Wilhelmsen!

 Yes, this is pretty clear. I've got enough experience in order to know this 
 :) Maybe the problem is the wicket:id, which I've named 'label'. Maybe this 
 is problem, since I heard certain 'ids' cause problems, like buttons with 
 id=submit, links with id=link and so on.

 Thank you, anyway!

 Regards, Martin

 -Original Message-
 From: Wilhelmsen Tor Iver [mailto:toriv...@arrive.no]
 Sent: Wednesday, February 03, 2010 10:05 AM
 To: users@wicket.apache.org
 Subject: Re: Very strange exception

 WicketMessage: The component(s) below failed to render. A common
 problem is that you have added a component in code but forgot to
 reference it in the markup (thus the component will never be rendered).

 When you do

 add(new Label(label, ...

 in a Page, you also need something like

 span wicket:id=labelThis gets replaced/span

 in your HTML template.

 - Tor Iver

 -
 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


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



webapp authentication

2010-02-03 Thread Martin Asenov
Hello guys!

I want to ask you which security frameworks you use when it comes to 
authenticating users through JPA.
I relied on JSecurity/Shiro but I can't set it up. I'm looking for a simple 
framework but secure enough (not looking for extraordinary security), which I 
can set pretty easily with my database that holds my custom User objects.

Please give me some suggestions.

Thanks!

Regards,
Martin



RE: webapp authentication

2010-02-03 Thread Martin Asenov
Hello, namesake! 
I've already done component authorization with the means wicket is supplied 
with. I'm looking only for login authentication using my JPA DB, which I don't 
believe is included in Wicket. There's a Wicket Security project that afaik is 
not stable yet, so I can't use it. 

I need only to authenticate users when they attempt to login.

Not just call something like this:

User user = MyUtilities.getUserByCredentials(name, password);

if (user == null) return false;
else ...do further processing

I want something more secure than this.

Regards,
Martin

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Wednesday, February 03, 2010 6:14 PM
To: users@wicket.apache.org
Subject: Re: webapp authentication

IMO two options come to mind:

1. you only need authentication: roll your own IAuthorizationStrategy
that checks if your custom session has a username set
2. use wicket-auth-roles, giving you role based authorization
(not-authorized, user and admin)

There are enough examples available on the wiki, in wicket-examples
and wicket in action (chapter 11)

Martijn

On Wed, Feb 3, 2010 at 4:25 PM, Martin Asenov mase...@velti.com wrote:
 Hello guys!

 I want to ask you which security frameworks you use when it comes to 
 authenticating users through JPA.
 I relied on JSecurity/Shiro but I can't set it up. I'm looking for a simple 
 framework but secure enough (not looking for extraordinary security), which I 
 can set pretty easily with my database that holds my custom User objects.

 Please give me some suggestions.

 Thanks!

 Regards,
 Martin





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
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: webapp authentication

2010-02-03 Thread Martin Asenov
I don't know. Probably against some attempts to break the security. Is this 
secure enough?
The passwords are stored in a hex format after md5hash conversion.

Regards,
Martin

-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch] 
Sent: Wednesday, February 03, 2010 6:28 PM
To: users@wicket.apache.org
Subject: Re: webapp authentication

On 02/03/10 17:20, Martin Asenov wrote:

 I need only to authenticate users when they attempt to login.

 Not just call something like this:

 User user = MyUtilities.getUserByCredentials(name, password);

 if (user == null) return false;
 else ...do further processing

 I want something more secure than this.

What security problems do you see here? Either the database can 
authenticate this user/password combination, or it can't.

-- Thomas

-- 
---
   Thomas Kapplerthomas.kapp...@isb-sib.ch
   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
   CMU, rue Michel Servet 1
   1211 Geneve 4
   Switzerland  http://www.uniprot.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



RE: webapp authentication

2010-02-03 Thread Martin Asenov
Hi again , Les!

Well, here my recommendations come. By saying simple setup I mean creating a 
single realm that extends AuthorizingRealm and configuring a web security 
manager that uses that realm. That's all I need. I found nowhere in the sample 
projects such thing, even in the spring-hibernate project. For me it looks like 
the configuration of the realm there is not entirely written.

Appreciate your interest!

Best Regards,
Martin

-Original Message-
From: les.hazlew...@anjinllc.com [mailto:les.hazlew...@anjinllc.com] On Behalf 
Of Les Hazlewood
Sent: Wednesday, February 03, 2010 6:56 PM
To: users@wicket.apache.org
Subject: Re: webapp authentication

Hi Martin,

What do you mean by you couldn't set Shiro up?  Did you mean
shiro-wicket in wicketstuff?  Or just Shiro's out-of-the-box web
support?

Setting up Shiro for any webapp is as painless as possible:

http://cwiki.apache.org/confluence/display/SHIRO/Web

Of course, any recommendations are appreciated.

Cheers,

Les

On Wed, Feb 3, 2010 at 10:25 AM, Martin Asenov mase...@velti.com wrote:
 Hello guys!

 I want to ask you which security frameworks you use when it comes to 
 authenticating users through JPA.
 I relied on JSecurity/Shiro but I can't set it up. I'm looking for a simple 
 framework but secure enough (not looking for extraordinary security), which I 
 can set pretty easily with my database that holds my custom User objects.

 Please give me some suggestions.

 Thanks!

 Regards,
 Martin



-
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



Very strange exception

2010-02-02 Thread Martin Asenov
Hello guys, I get this exception, when loading a page:

WicketMessage: The component(s) below failed to render. A common problem is 
that you have added a component in code but forgot to reference it in the 
markup (thus the component will never be rendered).

1. [Component id = label]

Root cause:

org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
render. A common problem is that you have added a component in code but forgot 
to reference it in the markup (thus the component will never be rendered).

1. [Component id = label]

 at org.apache.wicket.Page.checkRendering(Page.java:1162)
 at org.apache.wicket.Page.renderPage(Page.java:922)
 at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
 at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
This looks some kind of fake, as long as I don't have any components with 
id=label. Also I examined the catalina.log and found nothing relative to this.
Can someone shed more light on this?

Thanks in regards,
Martin



RE: java heap space IAuthorizationStrategy

2010-01-29 Thread Martin Asenov
Hello Thomas (and Martin :))

It's obviously an endless loop, but accessdeniedpage is not a subclass of 
neither domainrequiredpage, administrationpage, nor BaseFrame, which is my base 
page.

Unfortunately I can't find where this loop is coming from...

Thanks and regards,
Martin

-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch] 
Sent: Friday, January 29, 2010 10:36 AM
To: users@wicket.apache.org
Subject: Re: java heap space IAuthorizationStrategy

On 01/29/10 08:38, Martin Asenov wrote:
 Hello guys! Very strange exception occurred yesterday when trying to set 
 IAuthorizationStrategy to my webapp. Here's the exception:

 SEVERE: An exception or error occurred in the container during the request 
 processing
 java.lang.OutOfMemoryError: Java heap space at 
 java.util.Arrays.copyOfRange(Arrays.java:3209)

Looks like an endless loop. Get a compelte stacktrace to confirm that.

Maybe your AccessDeniedPage is a subclass of AdministrationPage or 
DomainRequiredPage? Then a non-authenticated user would try to access a 
page, would be redirected to the AccessDeniedPage which would not be 
allowed, redirect, repeat.


 these are the first 2 lines of the exception. Here's my MyAythStrategy class:

 public class MyAuthStrategy implements IAuthorizationStrategy {
   
   private UserContext context = ((AppSession)Session.get()).getContext();
   
   public MyAuthStrategy() {}
   
   public boolean isActionAuthorized(Component arg0, Action arg1)
   {
   return true;
   }
   
   publicT extends Component  boolean isInstantiationAuthorized(ClassT 
  componentClass)
   {

   if (BaseFrame.class.isAssignableFrom(componentClass)) {
   
   if 
 (AdministrationPage.class.isAssignableFrom(componentClass)) {
   if (context.getRole().equals(Role.ROOT) || 
 context.getRole().equals(Role.ADMIN))
   return true;
   else
   throw new 
 RestartResponseAtInterceptPageException(AccessDeniedPage.class);
   } else if 
 (DomainRequiredPage.class.isAssignableFrom(componentClass)) {
   if (context.getDomain() == null)
   throw new 
 RestartResponseAtInterceptPageException(AccessDeniedPage.class);
   else
   return true;
   }   
   }
   return true;
   
   }
   
 }

 AdministrationPage and DomainRequiredPage are my tagging interfaces.

 When I set that strategy to my webapp I get the above mentioned exception.

 Hope someone helps!

 Thanks,
 Martin

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



-- 
---
   Thomas Kapplerthomas.kapp...@isb-sib.ch
   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
   CMU, rue Michel Servet 1
   1211 Geneve 4
   Switzerland  http://www.uniprot.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



know the last page user comes from

2010-01-28 Thread Martin Asenov
Hello, everyone, I was just wondering how could I know what's the page the user 
comes from, when he comes into a new page. In need that in order to redirect to 
previous page in my access denied page.

Thank you !

Best regards,
Martin



RE: know the last page user comes from

2010-01-28 Thread Martin Asenov
Hi, Andrew!

I was saying that if I set up access denied page that way:

getApplicationSettings().setAccessDeniedPage(MyAccessDeniedPage.class);

there is no possibility to pass prev page in the constructor.

Regards,
Martin

-Original Message-
From: Andrew Lombardi [mailto:and...@mysticcoders.com] 
Sent: Thursday, January 28, 2010 10:39 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

Pass the previous Page in the constructor.

On Jan 28, 2010, at 12:36 AM, Martin Asenov wrote:

 Hello, everyone, I was just wondering how could I know what's the page the 
 user comes from, when he comes into a new page. In need that in order to 
 redirect to previous page in my access denied page.
 
 Thank you !
 
 Best regards,
 Martin
 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.



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



RE: know the last page user comes from

2010-01-28 Thread Martin Asenov
Yes I know about it, but never used it, is it suitable in the case I mentioned 
above? Would you give me some hints on how to implement it?

Thanks Thomas!

BR, 
Martin

-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch] 
Sent: Thursday, January 28, 2010 10:47 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

On 01/28/10 09:36, Martin Asenov wrote:
 Hello, everyone, I was just wondering how could I know what's the page the 
 user comes from, when he comes into a new page. In need that in order to 
 redirect to previous page in my access denied page.

Do you know about Component.continueToOriginalDestination() ?

-- Thomas
-- 
---
   Thomas Kapplerthomas.kapp...@isb-sib.ch
   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
   CMU, rue Michel Servet 1
   1211 Geneve 4
   Switzerland  http://www.uniprot.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



RE: know the last page user comes from

2010-01-28 Thread Martin Asenov
Thank you, Thomas, for your time!

Most likely this will help me solve the problem.

Have a nice day!

-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch] 
Sent: Thursday, January 28, 2010 11:16 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

On 01/28/10 10:01, Martin Asenov wrote:
 Yes I know about it, but never used it, is it suitable in the case I 
 mentioned above? Would you give me some hints on how to implement it?

Sure, here's some code from a small internal app I wrote recently. I got 
most of it from either the wiki or the list archive, but I can't find it 
right now.


If a page needs authentication and the user is not signed in, I throw a 
RestartResponseAtInterceptPageException. This IAuthorizationStrategy is 
set in WebApplication.init(), via 
getSecuritySettings().setAuthorizationStrategy(...). Code:


public class SimpleAuthorizationStrategy implements IAuthorizationStrategy
{

public boolean isActionAuthorized(Component arg0, Action arg1)
{
return true;
}

@SuppressWarnings(unchecked)
public boolean isInstantiationAuthorized(Class componentClass)
{
// Does this page need authentication?
if 
(AuthenticatedBasePage.class.isAssignableFrom(componentClass))
{
if (NewtSession.get().isSignedIn())
return true;
else
throw new 
RestartResponseAtInterceptPageException(SignInPage.class);
}
return true;
}
}

Then in my sign-in page, I can just say

if (NewtSession.get().authenticate(username.value(), password.value()))
{
 if (!continueToOriginalDestination())
 setResponsePage(getApplication().getHomePage());
...

The continueToOriginalDestination() gets the user to where the 
RestartResponseAtInterceptPageException was thrown.

HTH,
Thomas



 -Original Message-
 From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch]
 Sent: Thursday, January 28, 2010 10:47 AM
 To: users@wicket.apache.org
 Subject: Re: know the last page user comes from

 On 01/28/10 09:36, Martin Asenov wrote:
 Hello, everyone, I was just wondering how could I know what's the page the 
 user comes from, when he comes into a new page. In need that in order to 
 redirect to previous page in my access denied page.

 Do you know about Component.continueToOriginalDestination() ?

 -- Thomas


-- 
---
   Thomas Kapplerthomas.kapp...@isb-sib.ch
   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
   CMU, rue Michel Servet 1
   1211 Geneve 4
   Switzerland  http://www.uniprot.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



java heap space IAuthorizationStrategy

2010-01-28 Thread Martin Asenov
Hello guys! Very strange exception occurred yesterday when trying to set 
IAuthorizationStrategy to my webapp. Here's the exception:

SEVERE: An exception or error occurred in the container during the request 
processing
java.lang.OutOfMemoryError: Java heap space at 
java.util.Arrays.copyOfRange(Arrays.java:3209)

these are the first 2 lines of the exception. Here's my MyAythStrategy class:

public class MyAuthStrategy implements IAuthorizationStrategy {

private UserContext context = ((AppSession)Session.get()).getContext();

public MyAuthStrategy() {}

public boolean isActionAuthorized(Component arg0, Action arg1)
{
return true;
}

public T extends Component boolean isInstantiationAuthorized(ClassT 
componentClass)
{

if (BaseFrame.class.isAssignableFrom(componentClass)) {

if 
(AdministrationPage.class.isAssignableFrom(componentClass)) {
if (context.getRole().equals(Role.ROOT) || 
context.getRole().equals(Role.ADMIN))
return true;
else
throw new 
RestartResponseAtInterceptPageException(AccessDeniedPage.class);
} else if 
(DomainRequiredPage.class.isAssignableFrom(componentClass)) {
if (context.getDomain() == null)
throw new 
RestartResponseAtInterceptPageException(AccessDeniedPage.class);
else 
return true;
}   
}
return true;

}

}

AdministrationPage and DomainRequiredPage are my tagging interfaces.

When I set that strategy to my webapp I get the above mentioned exception.

Hope someone helps! 

Thanks,
Martin

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



  1   2   >