SV: Quick fix for the dreaded org.hibernate.LazyInitializationException with WicketTester

2010-02-16 Thread Wilhelmsen Tor Iver
After about 5 minutes of omfg not that error again, I think I found a quick hack to avoid org.hibernate.LazyInitializationException with WicketTester. I've checked everywhere on the lists but didn't find a similar solution, so apologies if someone else already posted this. There may also be

Re: Quick fix for the dreaded org.hibernate.LazyInitializationException with WicketTester

2010-02-16 Thread Leon Nieuwoudt
Yes this works when running the program in the Application Server environment. For JUnit testing (outside of the AS), I ran into this problem. Is there maybe a better way to maybe wrap the OSIV Filter around Unit Tests? On Tue, Feb 16, 2010 at 9:07 AM, Wilhelmsen Tor Iver

Re: Quick fix for the dreaded org.hibernate.LazyInitializationException with WicketTester

2010-02-16 Thread Igor Vaynberg
all you have to do is start a transaction before each unit test and roll it back after. spring has base unit tests and test runners that do this for you... -igor On Tue, Feb 16, 2010 at 12:13 AM, Leon Nieuwoudt leon.nieuwo...@gmail.com wrote: Yes this works when running the program in the

FormComponents and feedback messages inside a listview

2010-02-16 Thread Wim Vandenhaute
Hello List, I have ran a couple of times whilst developing some pages using wicket into the following issue. The page will contain a Form, containing a ListView of FormComponents The FormComponents are created within the ListView with a feedback panel attached to each of em. The feedback panels

Re: Quick fix for the dreaded org.hibernate.LazyInitializationException with WicketTester

2010-02-16 Thread Leon Nieuwoudt
Hi Igor Glad to hear there's another way. I'm already using the Spring JUnit runner, like this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class UserTest extends . { @Test public void testCRUD() { // Code... } } This what I tried: * Adding

Re: wicket Google maps integration

2010-02-16 Thread Martin Funk
look for the contract of ClickListener.onClick http://fisheye3.atlassian.com/browse/wicket-stuff/trunk/wicketstuff-core/gmap2-parent/gmap2/src/main/java/wicket/contrib/gmap/event/ClickListener.java?r=#l65 An Overlay was clicked, so glatLng is null. mf 2010/2/16 Josh Kamau

Re: FormComponents and feedback messages inside a listview

2010-02-16 Thread svenmeier
http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html#ListViewandotherrepeaters-Usingformcomponentsinarepeater Wim Vandenhaute wrote: Hello List, I have ran a couple of times whilst developing some pages using wicket into the following issue. The page will contain a Form,

Re: Re: Re: jdbc

2010-02-16 Thread Ivan Dudko
Thank you all guys! I just do it with Map. Especially thanks to Leo.Erlandsson! 2010/2/15 leo.erlands...@tyringe.com: Should be no different when using JDBC than using it when using Domain Objects. Check out Wicket Phonebook Example that uses FilterToolbar:

Re: FormComponents and feedback messages inside a listview

2010-02-16 Thread Wim Vandenhaute
Thanks! On Tue, Feb 16, 2010 at 11:11 AM, svenmeier s...@meiers.net wrote: http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html#ListViewandotherrepeaters-Usingformcomponentsinarepeater Wim Vandenhaute wrote: Hello List, I have ran a couple of times whilst developing

Re: Delegate a Modelchange to the child components. Or using a ModalWindow for displaying different Models of a specific Type.

2010-02-16 Thread MattyDE
Ohkay.. i've found a solution.. but i thinks not simple.. or wicket-like i think... but its the only way to pass the new model to the known propertyModel =/ now iam doing this in UserEdit.java @Override protected void onModelChanged() { final IModelUser

Re: wicket Google maps integration

2010-02-16 Thread Josh Kamau
Thanks alot It worked. On Tue, Feb 16, 2010 at 12:20 PM, Martin Funk mafulaf...@googlemail.comwrote: look for the contract of ClickListener.onClick

Re: Quick fix for the dreaded org.hibernate.LazyInitializationException with WicketTester

2010-02-16 Thread Leon Nieuwoudt
Just an update, the quick hack failed completely when testing on an XP system, but it worked perfectly on Ubuntu. Any links or example on getting Spring/Hibernate/WicketTester/JUnit4 to work will be appreciated. lmgtfy will also suffice ;) On Tue, Feb 16, 2010 at 9:57 AM, Leon Nieuwoudt

Re: Delegate a Modelchange to the child components. Or using a ModalWindow for displaying different Models of a specific Type.

2010-02-16 Thread MattyDE
Oh my God.. its so easy ... _ public class UserEdit extends Panel { /** * @param id * @param model */ public UserEdit(String id, CompoundPropertyModelUser _model) { super(id, _model); this.add(new

RE: problem with RestartResponseException in 1.4.6

2010-02-16 Thread Vadim Tesis
it works thanks From: igor.vaynb...@gmail.com Date: Sun, 14 Feb 2010 21:04:41 -0800 Subject: Re: problem with RestartResponseException in 1.4.6 To: users@wicket.apache.org try with latest snapshot -igor On Sun, Feb 14, 2010 at 5:02 PM, Vadim Tesis vad...@hotmail.com wrote:

Re: Integrating Hibernate Validator with Wicket

2010-02-16 Thread prati
Hi I integrated Hibernate Validator given in Wicket stuff with my application I am getting this error org.hibernate.PropertyValueException: not-null property references a null or transient value: Any ideas? Thanks P Carlos Vara wrote: Hi, if you prefer to use JSR 303 Bean Validation

Re: jdbc

2010-02-16 Thread Hauke Ingmar Schmidt
Hej, 2010/2/11 Giambalvo, Christian christian.giamba...@excelsisnet.com: http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html Unrelated to the original posters question, but: The sort method used in this sample does not work correctly. It gets a sublist and sorts the sublist

RE: best way to detect session termination

2010-02-16 Thread Andreas Lüdtke
I studied the classes HttpSessionBindingListener and AbstractHttpSessionStore as you noted, but I think I'll still have no link between the SessionId from the HTTPSession and my own Session. Maybe I'm missing something or I don't see the wood among all the trees as we say in Germany... Andreas

Re: best way to detect session termination

2010-02-16 Thread vineet semwal
can't you simply do that in webapplication.sessiondestroy(String sessionid), you can store the sessionid when user logs in and on sessiondestroyed ,search the user by this sessionid , and change whatever in user object and then persist it.. On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke

Re: best way to detect session termination

2010-02-16 Thread vineet semwal
i think i didn't use my words correctly :( with you can store the sessionid when user logs in i mean persist user object with sessionid when the user signed in ... On Tue, Feb 16, 2010 at 6:45 PM, vineet semwal vineetsemwal1...@gmail.comwrote: can't you simply do that in

Re: best way to detect session termination

2010-02-16 Thread James Carman
You can maintain a map somewhere on your own to do that. On Tue, Feb 16, 2010 at 7:53 AM, Andreas Lüdtke sam.lued...@t-online.de wrote: I studied the classes HttpSessionBindingListener and AbstractHttpSessionStore as you noted, but I think I'll still have no link between the SessionId from the

Problem with simple layout using Border.

2010-02-16 Thread marioosh.net
I have problem with Border. When i open Lesson2 page, i get nothing. System.out.println(mb); show: [MarkupContainer [Component id = border]]. Anybody help? Sources below. MainBorder.java: public class MainBorder extends Border { public MainBorder(String id) { super(id);

Re: wicket and javascript

2010-02-16 Thread exceptionist
igor.vaynberg wrote: allow your component to implement IHeaderContributor and output both your base js and string js from the renderhread() method -igor du u have a code-example(link oder something like that) for this way of solving my prob? i tried several times to do it, but i always

Re: Selenium Testing - Ajax Loads

2010-02-16 Thread Douglas Ferguson
the path in repeaters is never stable, it depends on a lot of factors and is hard to predict. i think what may be a good way to deal with it is to use an IComponentInstantiationListener to add a behavior to Item subclasses to output their index in some attribute. install this listener only

Re: wicket and javascript

2010-02-16 Thread Jeremy Thomerson
If you're rendering JS that shouldn't be executed until the page is loaded, call this method in your renderHead method: http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/IHeaderResponse.html#renderOnDomReadyJavascript%28java.lang.String%29 -- Jeremy

Re: @SpringBean injection expensive - a bug?

2010-02-16 Thread MZemeck
Any updates on this issue? Will there be a fix? Igor Vaynberg igor.vaynb...@gmail.com 02/10/2010 06:15 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: @SpringBean injection expensive - a bug? create a jira issue and a quickstart. thanks. -igor

RE: How to ajax update a component without triggered ajaxrequesttarget

2010-02-16 Thread Russell Morrisey
Martin, I think possibly what you want is AjaxRequestTarget.get(): AjaxRequestTarget target = AjaxRequestTarget.get(); if (target != null) { //...then this is an ajax request, not a static one target.addComponent(myComponent); } This gives you the ajax request target which is bound to

Re: Problem with simple layout using Border.

2010-02-16 Thread Igor Vaynberg
mb.add(add(new Label(label,content...))); why are there two adds there? -igor On Tue, Feb 16, 2010 at 6:06 AM, marioosh.net marioosh@gmail.com wrote: I have problem with Border. When i open Lesson2 page, i get nothing. System.out.println(mb); show: [MarkupContainer [Component id =

Custom url generation

2010-02-16 Thread Vit Rozkovec
Dear friends in code, how would it be possible to make wicket work in a scenario like this: Standard generation of urls: http://www.mysite.com/site/user1/home http://www.mysite.com/site/user1/gallery http://www.mysite.com/site/user1/shop Virtual host aware generation of url:

Re: Selenium Testing - Ajax Loads

2010-02-16 Thread Igor Vaynberg
how would you do that exactly? -igor On Tue, Feb 16, 2010 at 7:26 AM, Douglas Ferguson doug...@douglasferguson.us wrote: the path in repeaters is never stable, it depends on a lot of factors and is hard to predict. i think what may be a good way to deal with it is to use an

Model for ResourceLink

2010-02-16 Thread Gatos
Hi, I need to update ResourceLink when pagination is changed. How is it possible to pass model to a ResourceLink? I'm using wicket 1.3.6, but I think it should be also the same for other releases. Thank you

Problems with FileUpload (on GAE) - how to avoid DiskFileItem?

2010-02-16 Thread A. Maza
Hello, I trying to implement a file upload for my wicket application, which should be deployed on Google App Engine (GAE). Since GAE does not allow to spawn new threads, I cannot make use of DiskFileItem due to its use of FileCleaner. The problem is that a DiskFileItem gets instantiated in

Re: Problems with FileUpload (on GAE) - how to avoid DiskFileItem?

2010-02-16 Thread Igor Vaynberg
MultipartServletWebRequest has a constructor that allows you to pass in your own fileitemfactory WebRequest has a newMultipartWebRequest that you can override to create a multipartservletwebrequest with your own fileitemfactory... -igor On Tue, Feb 16, 2010 at 10:21 AM, A. Maza

Re: jdbc

2010-02-16 Thread Hauke Ingmar Schmidt
Hej, 2010/2/16 Hauke Ingmar Schmidt haukeing...@gmail.com: 2010/2/11 Giambalvo, Christian christian.giamba...@excelsisnet.com: http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html Unrelated to the original posters question, but: The sort method used in this sample does not

Re: Problems with FileUpload (on GAE) - how to avoid DiskFileItem?

2010-02-16 Thread Andreas Maza
Thanks for that quick response, igor. I created now a very basic and (bad ,-) implementation of FileItemFactory, does not write to disk and doesn't spawn threads. With respect to using common-fileupload on GAE, I read about fileupload's new Streaming API. However, I have currently no clue how to

Re: Problems with FileUpload (on GAE) - how to avoid DiskFileItem?

2010-02-16 Thread Igor Vaynberg
noep, haven't looked at that stuff in a while. -igor On Tuesday, February 16, 2010, Andreas Maza andr.m...@gmail.com wrote: Thanks for that quick response, igor. I created now a very basic and (bad ,-) implementation of FileItemFactory, does not write to disk and doesn't spawn threads. With

Re: Problems with FileUpload (on GAE) - how to avoid DiskFileItem?

2010-02-16 Thread nicolas melendez
There is one already done. Someone post it in the official GAE mail list. Try to look for it. I will try too. NM On Tue, Feb 16, 2010 at 6:00 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: noep, haven't looked at that stuff in a while. -igor On Tuesday, February 16, 2010, Andreas Maza

Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Douglas Ferguson
I'm using the following xpath wtih regex.. and this works.. xpath=//*[fn:matches(@wicketpath,'taskListContainer_taskTable_taskList_\\d')][2] but this doesn't xpath=//*[fn:matches(@wicketpath,'taskListContainer_taskTable_taskList_\\d_taskContainer_edit')][2] any idea why?

Re: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Martin Makundi
Hi! Maybe you can generate the path from the actual path? http://cwiki.apache.org/WICKET/type-safe-testing-in-wicket.html ** Martin 2010/2/17 Douglas Ferguson doug...@douglasferguson.us: I'm using the following xpath wtih regex.. and this works..

RE: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Douglas Ferguson
Hmm.. How would the example you sent apply to selenium tests? That seems like a unit test approach. Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson

RE: Selenium Testing - Ajax Loads

2010-02-16 Thread Douglas Ferguson
Igor, I have a decent solution and could put together a wiki page, just need to know where/how.. here's what I've got. Click and Wait for wicket: protected void clickAndWait(String wicketPath, long timeOut){ String callbackScript =

Re: How to change the style of navigator in PageableViewList

2010-02-16 Thread shavang
Hi where to add your code in my pagingnavigator to create custom navigator? This is my code. navigator = new PagingNavigator(navigator, dataView); dataView.setItemsPerPage(5); navigator.setVisible(false);

Re: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Martin Makundi
Hi! You can run selenium tests with junit. http://www.junit.org/node/23 ** Martin 2010/2/17 Douglas Ferguson doug...@douglasferguson.us: Hmm.. How would the example you sent apply to selenium tests? That seems like a unit test approach. Douglas Ferguson mobile: 512.293.7279 office/fax:

Re: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Martin Makundi
More: http://www.junit.org/node/23 2010/2/17 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! You can run selenium tests with junit. http://www.junit.org/node/23 ** Martin 2010/2/17 Douglas Ferguson doug...@douglasferguson.us: Hmm.. How would the example you sent apply to

RE: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Douglas Ferguson
yeah.. but if you are running functional tests against packaged software then verifications will be happening outside of the applications's vm. the stuff you sent, depends on overloading application objects in order to make hem testable in memory. Douglas Ferguson mobile: 512.293.7279

Re: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Martin Makundi
Hi! Yes. We have found that building testability and acceptance tests into the application is a good approach. Maybe it does not work for your situation. ** Martin 2010/2/17 Douglas Ferguson doug...@douglasferguson.us: yeah.. but if you are running functional tests against packaged software

Re: Selenium Testing - Ajax Loads

2010-02-16 Thread Igor Vaynberg
our wiki is here: http://cwiki.apache.org/WICKET register yourself an account and you should be good to go. -igor On Tue, Feb 16, 2010 at 9:43 PM, Douglas Ferguson doug...@douglasferguson.us wrote: Igor, I have a decent solution and could put together a wiki page, just need to know

RE: Selenium Testing - Dealing with unstable wicket path

2010-02-16 Thread Douglas Ferguson
We have tons of unit tests and they are built in. But for selenium this would not work, how can a web browser inspect your runtime object to determine correctness? Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse -