RE: Trying to submit form with id that is not in document.
Yes, it worked. Thanks a lot. I hope developers will fix the issue. Maris -Original Message- From: Leszek Gawron [mailto:lgaw...@apache.org] Sent: 29 October 2010 14:20 To: users@wicket.apache.org Subject: Re: Trying to submit form with id that is not in document. On 2010-10-29 14:06, Maris Orbidans wrote: Hi I have a modal window with a panel inside it. After I refresh the panel via ajax all buttons inside the panel stop working. Submit doesn't work and there is this message in ajax debug window: ERROR: Wicket.Ajax.Call.submitFormById: Trying to submit form with id 'categoryListForm135' that is not in document. This is relevant output from ajax debug: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script /head]]/header-contributioncomponent id=categoryListPanel112 ![CDATA[div id=categoryListPanel112 form id=categoryListForm135 method=post action=?wicket:interface=:0:buttonsPanel:packagesWindow:content:categor yListPanel:categoryListForm::IFormSubmitListener::div style=width:0px;height:0px;position:absolute;left:-100px;top:-100px;ove rflow:hiddeninput type=hidden name=categoryListForm135_hf_0 id=categoryListForm135_hf_0 //div table class=betlim tr thName/th thDescription/th th/th /tr tr td spanNONE/span /td td spanNO CATEGORY/span /td td input type=button value=Delete name=categories:1:deleteBtn id=deleteBtn136 onclick=if (!confirm('Are you sure you want to delete package category NONE ?')) {return}; null;var wcall=wicketSubmitFormById('categoryListForm135', '?wicket:interface=:0:buttonsPanel:packagesWindow:content:categoryListPa nel:categoryListForm:categories:1:deleteBtn::IActivePageBehaviorListener :0:-1amp;wicket:ignoreIfNotActive=true', 'categories:1:deleteBtn' ,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$$(this)amp;amp;Wicket.$$('categoryListForm135')}.bind(this));; ; return false;/ /td /table /form /div]]/componentcomponent id=feedback134![CDATA[span id=feedback134 ul class=feedbackPanel li class=feedbackPanelINFO span class=feedbackPanelINFOPackage category#039;#039; added./span /li /ul /span]]/component/ajax-response As you can see there is form with id categoryListForm135. For some reason javascript cannot find it. Panel html: wicket:panel form wicket:id=categoryListForm table class=betlim tr thName/th thDescription/th th/th /tr tr wicket:id=categories td span wicket:id=name/span /td td span wicket:id=description/span /td td input type=button wicket:id=deleteBtn value=Delete/ /td /tr /table /form /wicket:panel When it happens there is javascript error form is null in wicket-ajax.js submitFormById: function(formId, submitButton) { var form = Wicket.$(formId); if (form == null || typeof (form) == undefined) Wicket.Log.error(Wicket.Ajax.Call.submitFormById: Trying to submit form with id '+formId+' that is not in document.); return this.submitForm(form, submitButton); }, submitForm: function(form, submitButton) { if (form.onsubmit) {// ERROR IS HERE if (!form.onsubmit()) return; } if (this.handleMultipart(form, submitButton)) { return true; } var body = function() { var s = Wicket.Form.serialize(form); if (submitButton != null) { s += Wicket.Form.encode(submitButton) + =1; } return s; } return this.request.post(body); Any idea what can be wrong? yes ... your modal window has to be put into a form, so the panel's form is nested: Example: public class TrackerGroupsPanel extends Panel { @SpringBean private FleetServicefleetService; @SpringBean private TrackerService
condition in AbstractAjaxTimerBehavior
Hi I need to periodically update a page unless some condition is met. I wrote javascript function canRefresh() and added like this: add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { @Override protected void onTimer(final AjaxRequestTarget target) { updateSessionConfigPanel(target); } @Override protected CharSequence getCallbackScript() { return if (!canRefresh()) {+ super.getCallbackScript()+};; } }); This is generated javascript. script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, load, function(event) { setTimeout(if (!canRefresh()) {var wcall=wicketAjaxGet('?wicket:interface=:0::IActivePageBehaviorListener:1 :wicket:ignoreIfNotActive=true',function() { }.bind(this),function() { }.bind(this));};, 5000);;}); /*--]]*//script The problem is that once canRefresh() returns false timer stops. Is it possible to restart it? Or a better way to implement conditional update? Maris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
submit or refresh form via ajax from javascript ?
Is it possible to submit a form from javascript ? Maris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Getting client IP address
-Original Message- From: Josh Kamau [mailto:joshnet2...@gmail.com] Sent: 06 October 2010 12:31 To: users@wicket.apache.org Subject: Re: Getting client IP address Thanks guys, I got the IP address. Is it possible to get the client computer name? nope Maris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Getting client IP address
Yes, hostname. Sorry, I thought about something else. -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: 12 October 2010 12:25 To: users@wicket.apache.org Subject: Re: Getting client IP address ServletRequest.getRemoteHost(): Returns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST. On Tue, Oct 12, 2010 at 7:14 AM, Maris Orbidans maris.orbid...@ingg.com wrote: -Original Message- From: Josh Kamau [mailto:joshnet2...@gmail.com] Sent: 06 October 2010 12:31 To: users@wicket.apache.org Subject: Re: Getting client IP address Thanks guys, I got the IP address. Is it possible to get the client computer name? nope Maris - 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 _ This e-mail has been scanned for viruses by MessageLabs. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
javascript message after ajax request
Wicket experts, I have a form with Ajax submit button. Upon completing ajax request I want to show javascript popup with a message from server. How to do it ? Maris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: javascript message after ajax request
Awesome, thanks. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: 01 July 2010 17:25 To: users@wicket.apache.org Subject: Re: javascript message after ajax request you can use the appendJavascript method from the AjaxRequestTarget like: target.appendJavascript (alert('some message')); On Thu, Jul 1, 2010 at 1:21 PM, Maris Orbidans maris.orbid...@ingg.comwrote: Wicket experts, I have a form with Ajax submit button. Upon completing ajax request I want to show javascript popup with a message from server. How to do it ? Maris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos _ This e-mail has been scanned for viruses by MessageLabs. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Announcing: visural-wicket 0.6 released - open source wicket components
Looks great! I will give it a try. Is it maven repo ? -Original Message- From: r...@richardnichols.net [mailto:r...@richardnichols.net] On Behalf Of Richard Nichols Sent: 23 June 2010 01:31 To: users@wicket.apache.org Subject: Announcing: visural-wicket 0.6 released - open source wicket components Hi all, I'm pleased to announce the next major version of visural-wicket - 0.6 This version includes a bunch of new components and behaviours. For the full run down, follow the link - http://www.richardnichols.net/2010/06/visural-wicket-0-6-released-new- components/ visural-wicket is Apache 2.0 licensed open source. Let me know if you have any problems, suggestions or feedback. cheers, Richard. -- Richard Nichols http://www.richardnichols.net/ :: http://onmydoorstep.com.au/ _ This e-mail has been scanned for viruses by MessageLabs. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
modal window from AJAX ?
Hi Is it possible to open modal window from AjaxButton's onSubmit() method ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicketstuff-scriptaculous TypeError: Effect has no properties
hi I am using wicket 1.3 with latest dev build of wicketstuff-scriptaculous. I am trying to use highlight effect on table row when user clicks a link. It doesn't work and ajax debug shows *ERROR: *Exception evaluating javascript: TypeError: Effect has no properties. And sometimes it starts to work if I simply redeploy EAR file. It's very strange. Maris *INFO: * ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=resultDetailsPanel11 ![CDATA[div id=resultDetailsPanel11 class=contentDiv h1Detaļas/h1 table border=0 id=detailsTable ... /table /div]]/componentevaluate![CDATA[new Effect.Highlight('id524', {} ); ]]/evaluate/ajax-response *INFO: *Response parsed. Now invoking steps... *ERROR: *Exception evaluating javascript: TypeError: Effect has no properties /** * * */ public class ColumnLinkPanel extends Panel { public ColumnLinkPanel(String id, final IModel model) { super(id); Image icon = new Image(detailsIcon,new ResourceReference(ColumnLinkPanel.class,doc.png)); AjaxLink ajaxLink = new AjaxLink(detailsLink) { @Override public void onClick(AjaxRequestTarget target) { ResultDetailsPanel newPanel = new ResultDetailsPanel(resultDetailsPanel,model); findParent(MainPage.class).get(resultDetailsPanel).replaceWith(newPanel.setOutputMarkupId(true)); target.addComponent(newPanel); *target.appendJavascript(new Effect.Highlight(findParent(OddEvenItem.class)).toJavascript()); * } }; add(ajaxLink.add(icon)); } } public class MainPage extends BasePage { public MainPage() { add(new FeedbackPanel(feedbackPanel).setOutputMarkupId(true)); * add(ScriptaculousAjaxBehavior.newJavascriptBindingBehavior());* } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
where is wicket-contrib-tinymce ???
where is wicket-contrib-tinymce project and svn repo ? it's not even mentioned in this page http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
localization of PageExpiredErrorPage.html
Is it possible to localize session expiration error page ? Error messages are hardcoded in PageExpiredErrorPage.html. Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to prevent session timeouts
hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
new release of wicket-contrib-javaee
hi I have just created a new release of wicket-contrib-javaee. I have fixed POM file and made it compatible with wicket 1.3. Here is wiki page http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee And to answer your question about EJB references in web.xml. They are required because we need to lookup EJBs to create proxies for them. In JSF it's responsibility of app. server to inject EJB references. Maris if you use EJB3 you really want to use the wicket-contrib-javaee project (wicketstuff) all you need to do is call you @EJB and rest is handled automatically ! That project needs an update for 1.3 Add wicket-ioc dep / remove spring dep + some other unneeded deps / fix package names, I contacted the author but got no response. Plus you have to define all beans in the web.xml which is not needed when you work with jsf for example (tested on glassfish). Does anybody know why that is? but since this thread is about jpa+guice+wicket on lightweight container and not j2ee + wicket I suppose that wicket-contrib-javaee is not what they are looking for. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketServlet vs. WicketFilter
also wicket filter is much better at handling /* mapping The only problem with this mapping is that filter is invoked for all requests that fetch static web resources (css, images, etc). I may be wrong but I don't think it's good for performance. Especially if you use some other filter, for example, OpenEntityManagerInViewFilter which opens a JPA session for each request. Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to change years in YUI datepicker ?
it works, indeed thanks On Dec 3, 2007 10:32 AM, Maris Orbidans [EMAIL PROTECTED] wrote: Hi I need a calendar that allows to change years quickly. I have an input field where user should enter his birth date. But YUI calendar has buttons to change month only. We can't ask our users to click on those buttons hundred times to move calendar to their birth date. Is there any way to configure YUI calendar to have buttons that changes year ? override DatePicker#enableMonthYearSelection and return true: class MyDatePicker extends DatePicker { protected boolean enableMonthYearSelection() { return true; } } hth, Gerolf And if not what should I do ? It seems that other calendar (from extensions) is a lot better than this YUI crap but it has been removed in 1.3. Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to change years in YUI datepicker ?
Hi I need a calendar that allows to change years quickly. I have an input field where user should enter his birth date. But YUI calendar has buttons to change month only. We can't ask our users to click on those buttons hundred times to move calendar to their birth date. Is there any way to configure YUI calendar to have buttons that changes year ? And if not what should I do ? It seems that other calendar (from extensions) is a lot better than this YUI crap but it has been removed in 1.3. Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA best-practices?
Let's remember good old EJB's. Inject an EntityManager in a session bean facade and EJB container will handle all concurrency issues. No need to write any boilerplate code. BTW I have seen that some people use OpenEntityManagerInViewFilter and map it to url pattern /*. It seems that an EntityManager would be created every time a static web resource is accessed. Isn't that terrible ? Maris Uwe Schäfer wrote: i plan to use JPA together with Wicket. Are there any battle-proven best-practices out there of how to handle EnityManagers and Transactions? What do other people use (no, not the spring crowd ;) ? One EntityManager per Request seems to be the obvious idea and a guice Provider may help with that. Does anyone have serious experiences with that or other suggestions? Subclass WebRequestCycle, and construct it with an EntityManager. In onBeginRequest(), create a transaction, storing it in a private variable. In onEndRequest(), commit the transaction if it hasn't already been rolled back and clean up the EntityManager. In onRuntimeException(...), rollback the transaction and then return super.onRuntimeException(...). You'll need to inject a ProviderEntityManager into your WebApplication subclass such that you can call .get() on it when you make your custom WebRequestCycle. You'll need to configure that provider in a Guice module somewhere, obviously. You should be able to figure that out. ;-) How do you inject things into your WebApplication? Well, you can use the new GuiceWebApplicationFactory, which unfortunately didn't quite make it into 1.3.0-rc1 but is in trunk. However, you can copy that class from trunk and use it in your own project quite happily - it has no extra dependencies. If you need to integrate with your container-managed JTA transactions you'll need something a little different (the container may well start and commit the tx for you), but the principle is roughly the same. Alternatively, you can take Wicket out of the picture and do stuff using a ServletFilter (like Spring's OpenEntityManagerInView). Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [RFE] getMarkupId()
is it a joke ? In that case web design templates would need a unique class attribute for each element that is going to be used via Ajax. And in some cases it's not possible at all. For example, odd rows in a table might have a different color than even rows. Typically one kind of rows have the same class attribute. If wicket will use class attribute as an identifier then there will be no way to work with table rows. And it's just an example. In every web design there are many html tags with the same class attribute. Maris We are going to stop using ids and move over to class as it make re-use easier and avoids a number of wicket problems with ids... The HTML monkey is not happy though. He reminds me of the Family Guy screaming monkey today. Alex Objelean wrote: This is about how wicket generates dynamically markupID. I have, for instance, the following markup component: input wicket:id=quantity.noOfUnits / The generated markupId for this component looks like the following: quantity.noOfUnits1232 . I suggest to escape any css valid specifiers from the generated markupId, by replacing them with something else (for instance '_' character). The problem appear when I am trying to identify the component by it's id using some js library (like jQuery) and as a consequence the result of this query: $(#quantity.noOfUnits1232) is invalid. Thank you! Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [RFE] getMarkupId()
I use ajax as well, but I don't understand what's the problem with setOutputMarkupId ? In any case I am sure that forcing unique class attributes will create much bigger problem. Almost any non trivial web design uses identical class values in many places. Sometimes CSS class is used just to specify background color or something that is applied to many html tags. Are you saying that it's going to be impossible ? I am afraid that many developers (including me) won't be able to use wicket anymore. Maris So you use it just because of the performance of the browser DOM? Not because it has to be unique? Are you using Ajax? ie forced to do setOutputMarkupId? We are and that is probably the biggest reason we are trying to avoid them. Alex Objelean wrote: In my application I extensively use the component generated id to perform some DOM updates on the client side, also for client-side validation. Also getting a DOM element by its ID is the fastest method comparing with finding it using it's css class. Sam Hough wrote: When is the killer case for using id? Alex Objelean wrote: My personal opinion is that switching from id to class is not such a good idea, simply because the ID attributes guaranties (of course you can create two elements with same ID, but it is not the same as with class attribute) the unicity of the element, also you can find the element from js using document.getElementById... I hope that this radical change will not be made in the 1.3 release as it has a great impact on any application developed using the latest beta3 release. Also I think this issue should be discussed more between the core developers. Alex. Sam Hough wrote: We are going to stop using ids and move over to class as it make re-use easier and avoids a number of wicket problems with ids... The HTML monkey is not happy though. He reminds me of the Family Guy screaming monkey today. Alex Objelean wrote: This is about how wicket generates dynamically markupID. I have, for instance, the following markup component: input wicket:id=quantity.noOfUnits / The generated markupId for this component looks like the following: quantity.noOfUnits1232 . I suggest to escape any css valid specifiers from the generated markupId, by replacing them with something else (for instance '_' character). The problem appear when I am trying to identify the component by it's id using some js library (like jQuery) and as a consequence the result of this query: $(#quantity.noOfUnits1232) is invalid. Thank you! Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
findParent(BasePage.class) returns null
Hi The problem is that findParent(BasePage.class) returns a correct reference and after few more lines of code it returns null. How is that possible ? I am using 1.3 beta3. protected void onSubmit(AjaxRequestTarget target, Form form) { LoginForm loginForm = (LoginForm) form; String username = loginForm.getUsername(); ProjectsSession session = (ProjectsSession) getSession(); session.setLoggedIn(true); session.setUsername(username); for (int i =0 ; i3 ; i++) { log.info( : +(findParent(BasePage.class)==null));// FALSE } MarkupContainer container = findParent(BasePage.class); container.get(menuPanel).setVisible(true); target.addComponent(container.get(menuPanel)); container.get(contentPanel).replaceWith(new ProjectsSearchResultsPanel(contentPanel).setOutputMarkupId(true)); target.addComponent(container.get(contentPanel)); if (findParent(BasePage.class)==null) // TRUE { log.error(ERROR); } log.info(User + username + logged in); } 21:22:24,703 INFO [LoginPanel] : false 21:22:24,703 INFO [LoginPanel] : false 21:22:24,703 INFO [LoginPanel] : false 21:23:14,359 ERROR [LoginPanel] ERROR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Upcoming jWeekend Wicket training courses
Hi I am going to participate during September 29th-30th. Maris Hi folks, Cemal and I have been working hard refining jWeekend's upcoming Getting Started With Apache Wicket 1.3 [1] and Apache Wicket 1.3 [2] courses. The next ones are scheduled for September 22nd and September 29th-30th respectively. They're an excellent way to get up to speed with Wicket and develop an in-depth understanding of Models, Behaviors, the AJAX functionality, advanced validation, etc., etc. As such, they will be useful to you whether you're a beginner or a fairly seasoned Wicket programmer, so I'd encourage you to visit the jWeekend site [3] for more information and to see just what you'll be getting (and hopefully to book your place ;-) ). Hope to see some of you there! Best regards, Al [1] http://jweekend.co.uk/dev/JW7031 [2] http://jweekend.co.uk/dev/JW703 [3] http://jweekend.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Wicket-user] Wicket requiring one of my Spring managed beans to have a default constructor
Actually it's a problem if @SpringBean annotation creates new objects of class that is supposed to be a *singleton*. Is it really impossible to create a proxy class without creating a new object of delegatee ? Here is a discussion we had about it: [23:10] Smike I just noticed that @SpringBean creates a new instance of my Spring bean [23:10] Smike it's not good, after all Spring pojos are supposed to be singletons [23:11] Hali_303 Smike: it should not create a new instance if the Spring bean is a singleton [23:12] Smike it does [23:12] Hali_303 Smike: not all Spring beans are singletons, far from it. Spring has many scopes, singleton scope is just one out of many scopes [23:12] Smike it's default, isnt it ? [23:12] Hali_303 yes [23:13] Hali_303 how do you know that it's creating multiple instances? [23:13] Smike my beans have default scope [23:14] Smike breakpoints in constructor and logging statements [23:14] Smike and I have seen the same issue discussed in mail list [23:14] Smike where Igor says cglib needs to create a new object [23:15] Smike so every bean needs a default constructor [23:15] Hali_303 could you give me a pointer to this discussion? [23:16] Smike here is the title [Wicket-user] Wicket requiring one of my Spring managed beans to have a default constructor [23:18] Smike it should only lookup a bean from spring context, why it needs to create a new object... I have no idea [23:18] Hali_303 Smike: yeah I think what Igor says is right [23:19] Smike why it can't use existing object ? [23:19] * srufle ([EMAIL PROTECTED]) Quit ( Read error: 110 (Connection timed out) ) [23:19] * srufle___ is now known as srufle [23:19] Hali_303 Smike: regarding jdk proxies vs cglib [23:19] Hali_303 Smike: yeah exactly, I don't really see the connection between that thread and your problem [23:20] Hali_303 the guy in that thread did not complain about multiple instances of singleton beans [23:20] Smike the problem is that @SpringBean creates a new class [23:20] Smike and that thread only confirms that [23:21] Hali_303 it's not SpringBean, its cglib that creates one [23:21] Hali_303 and should create it only once, not every time use inject the bean [23:21] Hali_303 and should create it only once, not every time use inject the bean [23:21] Smike yes, @SpringBean annotation creates a proxy based on cglib [23:22] Smike ok, but I can't believe that there is no way to create a proxy without creating a new class [23:23] Smike of course, I am not reflection expert [23:24] Smike but I think it's possible [23:24] Smike at least with JDK proxy class [23:24] Smike I have never used cglib though [23:25] Smike so I think this is important issue and should be fixed [23:26] pertl Smike: I remember having a similar issue when using a bean without interface...maybe it's related to your issue... I got multiple instances of one singleton bean... once I used the interface / implementation pattern (UserDAO + UserDAOImpl) everything worked... [23:26] Smike yes could be [23:27] pertl Smike: give it a try ... use the interface but let spring instantiate the implementation class... maybe it works out [23:28] Hali_303 I'm using that too, and it works [23:28] Hali_303 I've even used prototype beans and that worked too [23:28] Smike sounds good, ok, I'll try you have to have an empty constructor. afaik it doesnt have to be public. this is so that cglib can create a proxy, i dont think there is a way around it. -igor On 5/9/07, * Matt Welch* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I am using the @SpringBean annotation to instantiate Spring dependencies in my wicket pages but I have one page that is giving me a error that I'm having trouble dealing with. Here's an example. The Wicket page class: public class Viewer extends WebPage { @SpringBean(name = contentSettings) private ContentSettings contentSettings; @SpringBean(name = learningItemRepository) private LearningItemRepository learningItemRepository; public Viewer() { //add some simple components to the page } } The vast majority of the time, my Spring managed beans are implementations of interfaces and not standalone concrete classes, however, in this particular situation I have about a dozen or so beans that don't need to follow that pattern. LearningRepository is an interface with a concrete implementation. ContentSettings on the other hand is a standalone concrete class. Both classes are properly setup in my Spring configuration xml files and I have a suite of unit tests which load the classes using Spring so I know that they should work. In fact, LearningRepository does work fine, but I'm getting an error from Wicket with regards to the the ContentSettings class: - java.lang.IllegalArgumentException: Superclass