JVM web frameworks vote at InfoQ
Hi, You can vote for your favorite JVM web framework at http://www.infoq.com/research/jvm-web-frameworks -- 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: Wicket and jQuery UI
Dear all, Wiquery offers a wide range of Behaviors in order to make components Draggable. There are a few Components which demand a certain type of tag to be used. We have experienced that the more flexible you make your API the more dumb questions people ask and the less they use it. Apparently they expect a magic library which can be included and read peoples minds :) Posts like are imo very constructive and do keep us sharp. Thanks for that. Hielke From: Sebastien [seb...@gmail.com] Sent: 02 October 2012 19:28 To: users@wicket.apache.org Subject: Re: Wicket and jQuery UI Hi, I will provide an answer for wicket-jquery-ui and let people/users from wiQuery answer about this last. wicket-jquery-ui has several goals: the first one is to provide the jQuery UI widget library as Wicket components, for both wicket 1.5.x and wicket 6.x. The work has mainly been focused to provide Wicket jQuery UI components having (I hope) the same philosophy/logic as Wicket's built-in ones, so the user deals with these components the same manner he usually deals with the Wicket ones. This is the most important point IMO. In addition, it provides - as Sebastien said - pure Behavior to allow users to use it either directly or embed it in other components. The advantage of using a Component versus a Behavior is that the Component can offers some events handling (ajax, naturally). To answer Pointbreak, a Draggable - for instance - is a Component for this specific reason, to be able to broadcast events (using latest Wicket event mechanism) either to itself (most common case for components) or to a Droppable object. It would have been really much difficult to understand the event logic if only a Behavior would have been supplied. For the Accordion, I did not provide the associated Behavior because it straightforward to add it (as many others, but it is probably not clear enough): add(new JQueryBehavior(#myId, accordion)); I am currently working on the accordion this week to provides its specific Behavior and event handling... The second goal is that the 'core' is also designed to integrate other plugins, from simple Behaviors to complex Components. For instance, the project provides an integration of the Calendar (from FullCalendar jQuery plugin) and an integration of several components of the Kendo-UI widget library. In the future, I think it will also provide an integration of a really good charting library (but it's a secret! ;). I began to write the tutorial series on how-to implement plugins but it is unfortunately not yet finished. wicket-jquery-ui is fairly new - the first version has been released about 6 months ago and has already been downloaded several hundred of time (I do not have latest maven stats), the demo site recorded more than 2 000 visits these last 30 days (11 700 page views). No just to give you some numbers, just to say that it seems to be really in use; I use it myself - and my colleges - at work on some big projects. And the number of opened issues (very low) tends me to say that the API seems to be stable/reliable. (or nobody use it in fact ;)) I do not have a lot a feedback about who - and how - the API is used. However, I hope these few lines will help you to answer a part of your question. Best regards, Sebastien. On Tue, Oct 2, 2012 at 6:44 PM, Pointbreak pointbreak+wicketst...@ml1.netwrote: But why not for tabs, accordion, slider, and other jquery components? That gives you much more flexibility in separating what a component logically does (e.g. render various sections of data, widgets, etc.), from how it is shown and interacted with in the browser (view as tabs, steps in a widget, accordion, just plain sections, ...). In jquery-ui itself you also add it as a behavior to a DOM element. So why not offer that flexibility in the Wicket integration? Idem ditto for things like draggable, droppable, etc. Why not offer the possibility to make any existing wicket panel/component a draggable by having a DraggableBehavior? In wicket-jquery-ui you need to subclass a Draggable panel, which is obviously not possible with already existing components/panels. Just to clarify: this is my very personal opinion on how a jquery integration should be designed (and actually how I've done it for many projects so far). That's obviously very subjective. It looks like an impressive library nonetheless! On Tue, Oct 2, 2012, at 15:30, Sébastien Gautrin wrote: Hi Pointbreak, At least for wicket-jquery-ui, it offers also pure behaviours integration for jquery extensions that are pure behaviours (such as Droppable). I think wiQuery does as well. For ease of defining such things for you own component, it is the main goal of wicket-jquery-ui; take a look at the three tutorials Sebastien made (sebfz1) for wicket-jquery-ui: http://code.google.com/p/wicket-jquery-ui/w/list?q=label:How-To (note: Sebastien is the author of wicket-jquery-ui).
Re: Wicket page HTML extractor
Hi, Why don't use the source of MailTemplate example (http://www.wicket-library.com/wicket-examples/mailtemplate) ? Your code seems to be much more complex. On Fri, Oct 5, 2012 at 8:02 PM, Oscar Besga Arcauz obe...@isdefe.es wrote: Hi wickers ! I want to generate the HTML from a wicket WebPage and store into a String; out of a request - for example in a timer thread. I'm thinking in making a buffer (inter request) for my webapplication for some pages, for this I want to extract HTML-generated content from wicket pages. Here in danwalmsley blog - http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/ - and mail template (page-generated) example - http://www.wicket-library.com/wicket-examples/mailtemplate/?0 - I've seen some code to build the extractor. I've walked some steps, and I think I'm on the rigth direction, but it doesn't work. This is the code I've done so far, if anyone knows I'll be graceful for commenting class WebPageExtractor protected String renderPageToString(WebApplication webApp) { String urlForMockRequest = myPage; // I've also tried localhost/myPage and others String filterPrefix = ; // Doesn't know what to put here, really. Wicket filter is to * //get the servlet context ServletContext context = webApp.getServletContext(); //fake a request/response cycle MockHttpSession servletSession = new MockHttpSession(context); servletSession.setTemporary(true); MockHttpServletRequest mockServletRequest = new MockHttpServletRequest(isdefeWebApp, servletSession, context); mockServletRequest.setURL(/ + urlForMockRequest); // also tried this mockServletRequest.setURL(mockServletRequest.getContextPath() + mockServletRequest.getServletPath() + /); MockHttpServletResponse mockServletResponse = new MockHttpServletResponse(mockServletRequest); //initialize request and response mockServletRequest.initialize(); mockServletResponse.initialize(); // Generate wicket web request and so on.. Url url = new Url(Arrays.asList(urlForMockRequest), new ArrayListUrl.QueryParameter()); ServletWebRequest webRequest = new ServletWebRequest(mockServletRequest, filterPrefix, url); ServletWebResponse webResponse = new ServletWebResponse(webRequest, mockServletResponse); BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(webResponse); RequestCycle requestCycle = webApp.createRequestCycle(webRequest, bufferedWebResponse); BookmarkablePageRequestHandler bookmarkablePageRequestHandler = new BookmarkablePageRequestHandler(new PageProvider(MyPage.class, new PageParameters())); bookmarkablePageRequestHandler.respond(requestCycle); // Also tried //requestCycle.setResponsePage(MyPage.class,new PageParameters()); requestCycle.processRequestAndDetach(); requestCycle.getResponse().close(); CharSequence cs = bufferedWebResponse.getText(); //NULL!!! if (cs != null) { return cs.toString(); } else { // CS is always null :( return null; } } Thanks for your help and excuse my poor english Oscar Besga Arcauz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: Submitting a form, and it's parent form too --
Hi, Read the ModalWindow's javadoc. It explains some requirements about the containment in form(s). Additionally check Form's API and particularly: org.apache.wicket.markup.html.form.Form#wantSubmitOnNestedFormSubmit On Sat, Oct 6, 2012 at 3:49 AM, theivorykitty chantal.da...@frontier.com wrote: Hey guys! I'm always so appreciative to post here, as people are always friendly and kind enough to take the time to help me. So, I guess I just wanted to start with a thank you for reading. Anyhow, I've got an issue with what I thought was a really amazingly basic thing. Basically I have a page with a parent-form on it, and the form does a whole bunch of stuff when it is submitted. Inside of that parent-form, I have a modal window (pop-up), which pops up when you click a button at the bottom of the page (which is also in the form, but is has setDefaultFormProcessing(false)). (Note that the modal window IS added to the parent-form). This pop-up (modal window) has a submit button and a cancel button, as well as a TextArea. The pop-up's submit button has setDefaultFormProcessing(true) and therefore it first does the button's onSubmit behaviors and then the parent-form's submit behaviors. Hooray! However, the TextArea in the pop-up does not get submitted for some reason - even though the property model is set correctly on it and whatnot. SO, I had to put a separate child-form onto the popup (which includes the TextArea and the two buttons on the pop-up). Now when I press the submit button on the pop-up, the TextArea stuff is saved, HOWEVER, the parent-form's submit is no longer running. So, in the end I suppose I'm wondering how to have the submit button on the pop-up submit both the child and parent form, OR how to have the submit button on the pop-up also run the property model on the TextArea which doesn't seem to run unless the child-form exists. Whew that was a really long explanation for a really basic idea. Lol. As always, any help would be GREATLY appreciated! Thanks guys! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-a-form-and-it-s-parent-form-too-tp4652715.html Sent from the Users forum 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 -- 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: Problem with testing text field auto completion with WicketTester
Hi, You need to do: tester.getRequest().setParameter(the:respective:name:of:the:input, some value); tester.executeBehavior() On Sun, Oct 7, 2012 at 3:26 AM, Marcin Zajączkowski msz...@wp.pl wrote: On 2012-10-07 02:14, Marcin Zajączkowski wrote: Hi, I try to test auto complete feature implemented with DefaultCssAutoCompleteTextField. I'm able to call it from a test using WicketTesterHelper.findBehavior: AbstractAutoCompleteBehavior behavior = (AbstractAutoCompleteBehavior) WicketTesterHelper.findBehavior(tester.getComponentFromLastRenderedPage(component), AbstractAutoCompleteBehavior.class); tester.executeBehavior(behavior); but I don't know how to pass a value entered into a text field (behavior always gets null as an input). I tried to get TextField using tester.getComponentFromLastRenderedPage() and set a value on model, but it doesn't reflect on a value visible by java script. I was using FormTester and setValue(), but also without any positive effect. I was also playing with tester.executeAjaxEvent() which could be helpful with simple events (like onkeyup), but I don't know how (if) can it trigger auto complete behavior. I'm not able to set a value in an input, which would be visible by a java script and later pass to a server side in a request. Maybe there is some easier way using WicketTester? How can I do it? I'm using Wicket 6.0.0. Regards Marcin -- http://blog.solidsoft.info/ - Working code is not enough - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: select a wicket tab from javascript...
Hi, If nothing else works then: jQuery(selectorForTheNeededTab).click() should do the job. On Fri, Oct 5, 2012 at 11:15 AM, mlabs mlabs@gmail.com wrote: I have some wicket (ajax) tabs... I'm using jQuery on the client. I want to programatically select a particular wicket tab from the jQuery/javascript client code what's the best way to do this? TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/select-a-wicket-tab-from-javascript-tp4652683.html Sent from the Users forum 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 -- 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
Redirect page via POST method
Hello, How can I go to a page with a given url with POST method, instead of using a redirect page which uses GET method. I want to send some private information from one to another as page parameters. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-page-via-POST-method-tp4652736.html Sent from the Users forum 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
Re: Redirect page via POST method
Hi AFAIK you can only do that by returning a normal HTTP page with a form which is auto-submitted using javascript, for example in an onload handler. Matt On 08.10.2012 11:53, cosmindumy wrote: Hello, How can I go to a page with a given url with POST method, instead of using a redirect page which uses GET method. I want to send some private information from one to another as page parameters. Thanks. smime.p7s Description: S/MIME Cryptographic Signature
Re: Redirect page via POST method
Hi, You can use: setResponsePage(new NewPage(privateInformation)) On Mon, Oct 8, 2012 at 12:53 PM, cosmindumy cosmind...@yahoo.com wrote: Hello, How can I go to a page with a given url with POST method, instead of using a redirect page which uses GET method. I want to send some private information from one to another as page parameters. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-page-via-POST-method-tp4652736.html Sent from the Users forum 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 -- 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
wiquery ajaxslider
Hi, I've a problem with AjaxSlider in wiquery-jquery-ui. Sorry if this is the wrong place to report it but I can't use Google groups. Version: Wicket 6.0.0, wiquery-jquery-ui: 6.0.0 The setAjaxStopEvent never fires. Looking at the generated js it's obvious that it can't: $('#slider11').slider({min: 0.0, max: 500.0, stop: function(event, ui) { var url = '../page?1-1.IBehaviorListener.0-sliderForm-slider1sliderEvent=ajaxStopEventsliderValue='+ui.value+'sliderValues='+ui.values; Wicket.Ajax.ajax({u:../page?1-1.IBehaviorListener.0-sliderForm-slider1,c:slider11}); }});; The variable url is never used. My code works fine with Wicket 1.5.8 and wiquery-jquery-ui 1.5.7 Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket with JPA and container managed transactions
Moving from JSF to Wicket 6.1.0 I am used to having all JPA operations in a EJB facade to use the container's (Glassfish 3.2.1) transaction management. I use and know wicket-cdi for injection, which works fine. Unfortunately, if I inject an EJB in a wicket page, the serialization checks of wicket complain that it is not serializable. This is true for EJB, I suppose since they are proxied by EJBLocalObjectInvocationHandlerDelegate. Frustrated I have read the thread around http://markmail.org/message/4esc7m5subft5ngu My thinking is blocked at this point. If I can't use jpa with container managed transactions wicket how is the simpliest way do achieve it? All examples I googled and also these in the book Wicket in Action are only reading data or using Spring, what I do not want to do. Thank you for any hint Dieter Tremel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket page HTML extractor
Yes, I've used code from mail example, as I said. The mail example does not fit into my needs because the rendering thread must be independent, out-of-request. ( for example into a Timer/TimerTask) I've been looking into Wicket tester classes (http://wicket.apache.org/apidocs/1.5/org/apache/wicket/util/tester/BaseWicketTester.html) and I've made changes to code. Luckily, I've succeed and I got a functional request-independent page renderer, which only dependes on webapp and it's easy to use: MyAppPageBuffer.java http://pastebin.com/XJMV8N7d If you want to see and review it, comments are welcome Oscar Besga Arcauz Pd. with a little side effect, but I'll talk about it on another mail -Martin Grigorov mgrigo...@apache.org escribió: - Para: users@wicket.apache.org De: Martin Grigorov mgrigo...@apache.org Fecha: 08/10/2012 10:00 Asunto: Re: Wicket page HTML extractor Hi, Why don't use the source of MailTemplate example (http://www.wicket-library.com/wicket-examples/mailtemplate) ? Your code seems to be much more complex. On Fri, Oct 5, 2012 at 8:02 PM, Oscar Besga Arcauz obe...@isdefe.es wrote: Hi wickers ! I want to generate the HTML from a wicket WebPage and store into a String; out of a request - for example in a timer thread. I'm thinking in making a buffer (inter request) for my webapplication for some pages, for this I want to extract HTML-generated content from wicket pages. Here in danwalmsley blog - http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/ - and mail template (page-generated) example - http://www.wicket-library.com/wicket-examples/mailtemplate/?0 - I've seen some code to build the extractor. I've walked some steps, and I think I'm on the rigth direction, but it doesn't work. This is the code I've done so far, if anyone knows I'll be graceful for commenting class WebPageExtractor protected String renderPageToString(WebApplication webApp) { String urlForMockRequest = myPage; // I've also tried localhost/myPage and others String filterPrefix = ; // Doesn't know what to put here, really. Wicket filter is to * //get the servlet context ServletContext context = webApp.getServletContext(); //fake a request/response cycle MockHttpSession servletSession = new MockHttpSession(context); servletSession.setTemporary(true); MockHttpServletRequest mockServletRequest = new MockHttpServletRequest(isdefeWebApp, servletSession, context); mockServletRequest.setURL(/ + urlForMockRequest); // also tried this mockServletRequest.setURL(mockServletRequest.getContextPath() + mockServletRequest.getServletPath() + /); MockHttpServletResponse mockServletResponse = new MockHttpServletResponse(mockServletRequest); //initialize request and response mockServletRequest.initialize(); mockServletResponse.initialize(); // Generate wicket web request and so on.. Url url = new Url(Arrays.asList(urlForMockRequest), new ArrayListUrl.QueryParameter()); ServletWebRequest webRequest = new ServletWebRequest(mockServletRequest, filterPrefix, url); ServletWebResponse webResponse = new ServletWebResponse(webRequest, mockServletResponse); BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(webResponse); RequestCycle requestCycle = webApp.createRequestCycle(webRequest, bufferedWebResponse); BookmarkablePageRequestHandler bookmarkablePageRequestHandler = new BookmarkablePageRequestHandler(new PageProvider(MyPage.class, new PageParameters())); bookmarkablePageRequestHandler.respond(requestCycle); // Also tried //requestCycle.setResponsePage(MyPage.class,new PageParameters()); requestCycle.processRequestAndDetach(); requestCycle.getResponse().close(); CharSequence cs = bufferedWebResponse.getText(); //NULL!!! if (cs != null) { return cs.toString(); } else { // CS is always null :( return null; } } Thanks for your help and excuse my poor english Oscar Besga Arcauz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wiquery ajaxslider
Hi, This is the currently active forum! :-) But you better file this problem at https://github.com/WiQuery/wiquery/issues so it got fixed for the next release. On Mon, Oct 8, 2012 at 3:39 PM, Lemke, Michael SZ/HZA-ZSW lemke...@schaeffler.com wrote: Hi, I've a problem with AjaxSlider in wiquery-jquery-ui. Sorry if this is the wrong place to report it but I can't use Google groups. Version: Wicket 6.0.0, wiquery-jquery-ui: 6.0.0 The setAjaxStopEvent never fires. Looking at the generated js it's obvious that it can't: $('#slider11').slider({min: 0.0, max: 500.0, stop: function(event, ui) { var url = '../page?1-1.IBehaviorListener.0-sliderForm-slider1sliderEvent=ajaxStopEventsliderValue='+ui.value+'sliderValues='+ui.values; Wicket.Ajax.ajax({u:../page?1-1.IBehaviorListener.0-sliderForm-slider1,c:slider11}); }});; The variable url is never used. My code works fine with Wicket 1.5.8 and wiquery-jquery-ui 1.5.7 Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: Wicket with JPA and container managed transactions
Hi, Are you aware of https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/javaee-inject-parent ? https://github.com/wicketstuff/core/wiki/Java-EE-Inject On Mon, Oct 8, 2012 at 4:05 PM, Dieter Tremel tre...@tremel-computer.de wrote: Moving from JSF to Wicket 6.1.0 I am used to having all JPA operations in a EJB facade to use the container's (Glassfish 3.2.1) transaction management. I use and know wicket-cdi for injection, which works fine. Unfortunately, if I inject an EJB in a wicket page, the serialization checks of wicket complain that it is not serializable. This is true for EJB, I suppose since they are proxied by EJBLocalObjectInvocationHandlerDelegate. Frustrated I have read the thread around http://markmail.org/message/4esc7m5subft5ngu My thinking is blocked at this point. If I can't use jpa with container managed transactions wicket how is the simpliest way do achieve it? All examples I googled and also these in the book Wicket in Action are only reading data or using Spring, what I do not want to do. Thank you for any hint Dieter Tremel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: Wicket with JPA and container managed transactions
As far as I understood you have two possibilities: 1. Inject your EJB into a CDI component and inject that component into your wicket pages using @Inject annotation. That should solve the serialization problem but you will have an additional layer. 2. Use javaee-inject from wicketstuff [1] to inject your EJBs with @EJB annotation into your wicket pages. I've tried the second approach (though in JBoss, not glassfish) and so far have had no problems with using both wicket-cdi and javaee-inject in the same project. Maybe it's not so nice because you have to include two dependencies and use two different kinds of annotations in your wicket pages. [1] https://github.com/wicketstuff/core/wiki/Java-EE-Inject 2012/10/8 Dieter Tremel tre...@tremel-computer.de Moving from JSF to Wicket 6.1.0 I am used to having all JPA operations in a EJB facade to use the container's (Glassfish 3.2.1) transaction management. I use and know wicket-cdi for injection, which works fine. Unfortunately, if I inject an EJB in a wicket page, the serialization checks of wicket complain that it is not serializable. This is true for EJB, I suppose since they are proxied by EJBLocalObjectInvocationHandlerDelegate. Frustrated I have read the thread around http://markmail.org/message/4esc7m5subft5ngu My thinking is blocked at this point. If I can't use jpa with container managed transactions wicket how is the simpliest way do achieve it? All examples I googled and also these in the book Wicket in Action are only reading data or using Spring, what I do not want to do. Thank you for any hint Dieter Tremel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket with JPA and container managed transactions
Am 08.10.2012 15:14, schrieb Martin Grigorov: Are you aware of https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/javaee-inject-parent ? Hi Martin, I know this lib an had a look at it. If I am right, it is just another way of injection. In my running example of implementing a data provider the injection already works and a have a beautiful rendered result of my data. But after the request the error around serialization is: SEVERE: Error serializing object class de.tremel_computer.buchbeispiel.wicket.BuecherPage [object=[Page class = de.tremel_computer.buchbeispiel.wicket.BuecherPage, id = 0, render count = 1]] org.apache.wicket.core.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate Field hierarchy is: 0 [class=de.tremel_computer.buchbeispiel.wicket.BuecherPage, path=0] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] java.lang.Object org.apache.wicket.Component.data[2] [class=org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable, path=0:datatable] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] java.lang.Object org.apache.wicket.Component.data[1] [class=org.apache.wicket.markup.html.WebMarkupContainer, path=0:datatable:body] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1, path=0:datatable:body:rows] private final org.apache.wicket.markup.repeater.data.IDataProvider org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider [class=de.tremel_computer.wicketcrud.modeling.EntityDataProvider] private de.tremel_computer.wicketcrud.controller.AbstractFacade de.tremel_computer.wicketcrud.modeling.EntityDataProvider.facade [class=de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__IntfBean__] private de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__Intf__ de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__IntfBean__.__ejb31_delegate [class=$Proxy182] protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h [class=com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate] - field that is not serializable I suppose with javaee-inject-parent I would have the same error after rendering. Thank You Dieter -- Tremel Computerhttp://www.tremel-computer.de Dieter Tremel mailto:tre...@tremel-computer.de Rebenring 16 Tel +49 871 9357080 84032 Altdorf Fax +49 871 9357081 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wiquery ajaxslider
On Monday, October 08, 2012 3:11 PM Martin Grigorov wrote: Hi, This is the currently active forum! :-) But you better file this problem at https://github.com/WiQuery/wiquery/issues so it got fixed for the next release. Thanks, done. Issue #6. Didn't realize it is on github. Michael On Mon, Oct 8, 2012 at 3:39 PM, Lemke, Michael SZ/HZA-ZSW lemke...@schaeffler.com wrote: Hi, I've a problem with AjaxSlider in wiquery-jquery-ui. Sorry if this is the wrong place to report it but I can't use Google groups. Version: Wicket 6.0.0, wiquery-jquery-ui: 6.0.0 The setAjaxStopEvent never fires. Looking at the generated js it's obvious that it can't: $('#slider11').slider({min: 0.0, max: 500.0, stop: function(event, ui) { var url = '../page?1-1.IBehaviorListener.0-sliderForm-slider1sliderEvent=ajaxStopEventsliderValue='+ui.value+'sliderValues='+ui.values; Wicket.Ajax.ajax({u:../page?1-1.IBehaviorListener.0-sliderForm-slider1,c:slider11}); }});; The variable url is never used. My code works fine with Wicket 1.5.8 and wiquery-jquery-ui 1.5.7 Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: Wicket with JPA and container managed transactions
Hi Dieter, javaee-inject uses wicket-ioc and injects a serializable Proxy instead of the EJB bean itself that was returned by the container. This is the same as how Spring and Guice work. See the response of heapifyman. The simplest would be use only CDI in your Wicket code. Hide any usage of EJBs behind CDI. On Mon, Oct 8, 2012 at 4:25 PM, Dieter Tremel tre...@tremel-computer.de wrote: Am 08.10.2012 15:14, schrieb Martin Grigorov: Are you aware of https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/javaee-inject-parent ? Hi Martin, I know this lib an had a look at it. If I am right, it is just another way of injection. In my running example of implementing a data provider the injection already works and a have a beautiful rendered result of my data. But after the request the error around serialization is: SEVERE: Error serializing object class de.tremel_computer.buchbeispiel.wicket.BuecherPage [object=[Page class = de.tremel_computer.buchbeispiel.wicket.BuecherPage, id = 0, render count = 1]] org.apache.wicket.core.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate Field hierarchy is: 0 [class=de.tremel_computer.buchbeispiel.wicket.BuecherPage, path=0] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] java.lang.Object org.apache.wicket.Component.data[2] [class=org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable, path=0:datatable] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] java.lang.Object org.apache.wicket.Component.data[1] [class=org.apache.wicket.markup.html.WebMarkupContainer, path=0:datatable:body] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1, path=0:datatable:body:rows] private final org.apache.wicket.markup.repeater.data.IDataProvider org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider [class=de.tremel_computer.wicketcrud.modeling.EntityDataProvider] private de.tremel_computer.wicketcrud.controller.AbstractFacade de.tremel_computer.wicketcrud.modeling.EntityDataProvider.facade [class=de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__IntfBean__] private de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__Intf__ de.tremel_computer.buchbeispiel.jpa.facade.__EJB31_Generated__BuchFacade__IntfBean__.__ejb31_delegate [class=$Proxy182] protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h [class=com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate] - field that is not serializable I suppose with javaee-inject-parent I would have the same error after rendering. Thank You Dieter -- Tremel Computerhttp://www.tremel-computer.de Dieter Tremel mailto:tre...@tremel-computer.de Rebenring 16 Tel +49 871 9357080 84032 Altdorf Fax +49 871 9357081 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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
Wicket 6.x write to jQuery on document ready ...
Hey guys .. I'm upgrading our application to wicket 6.x and would like to know if there is a way for my components to add JS to jQueries $(document).ready function on initialize ... (was thinking if page has any feature like that) Kind regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-x-write-to-jQuery-on-document-ready-tp4652754.html Sent from the Users forum 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
Re: Wicket 6.x write to jQuery on document ready ...
Hi, You can use: response.render(OnDomReadyHeaderItem.forScript()) All onDomReady scripts are bundled into one : Wicket.Event.add(window, domready, function(event) { // here }) and this is the same as what you need. On Mon, Oct 8, 2012 at 4:35 PM, armandoxxx armando@dropchop.com wrote: Hey guys .. I'm upgrading our application to wicket 6.x and would like to know if there is a way for my components to add JS to jQueries $(document).ready function on initialize ... (was thinking if page has any feature like that) Kind regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-x-write-to-jQuery-on-document-ready-tp4652754.html Sent from the Users forum 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 -- 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
AjaxLink not work
Hi I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All AjaxLinks from the console not work. final AjaxLink createLink = new IndicatingAjaxLink(createLink) { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { editModalWin.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = -7834632442532690940L; @Override public Page createPage() { return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO()); } }); editModalWin.show(target); } }; What am I forgetting? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino
Re: Wicket page HTML extractor
I've created a page that responds with the buffer [MyAppPageBuffer] http://pastebin.com/d3UzajiU Reviews and comments are wellcomed ! Oscar Besga Arcauz -Oscar Besga Arcauz/ISNOTES@ISNOTES escribió: - Para: users@wicket.apache.org De: Oscar Besga Arcauz/ISNOTES@ISNOTES Fecha: 08/10/2012 15:06 Asunto: Re: Wicket page HTML extractor Yes, I've used code from mail example, as I said. The mail example does not fit into my needs because the rendering thread must be independent, out-of-request. ( for example into a Timer/TimerTask) I've been looking into Wicket tester classes (http://wicket.apache.org/apidocs/1.5/org/apache/wicket/util/tester/BaseWicketTester.html) and I've made changes to code. Luckily, I've succeed and I got a functional request-independent page renderer, which only dependes on webapp and it's easy to use: MyAppPageBuffer.java http://pastebin.com/XJMV8N7d If you want to see and review it, comments are welcome Oscar Besga Arcauz Pd. with a little side effect, but I'll talk about it on another mail -Martin Grigorov mgrigo...@apache.org escribió: - Para: users@wicket.apache.org De: Martin Grigorov mgrigo...@apache.org Fecha: 08/10/2012 10:00 Asunto: Re: Wicket page HTML extractor Hi, Why don't use the source of MailTemplate example (http://www.wicket-library.com/wicket-examples/mailtemplate) ? Your code seems to be much more complex. On Fri, Oct 5, 2012 at 8:02 PM, Oscar Besga Arcauz obe...@isdefe.es wrote: Hi wickers ! I want to generate the HTML from a wicket WebPage and store into a String; out of a request - for example in a timer thread. I'm thinking in making a buffer (inter request) for my webapplication for some pages, for this I want to extract HTML-generated content from wicket pages. Here in danwalmsley blog - http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/ - and mail template (page-generated) example - http://www.wicket-library.com/wicket-examples/mailtemplate/?0 - I've seen some code to build the extractor. I've walked some steps, and I think I'm on the rigth direction, but it doesn't work. This is the code I've done so far, if anyone knows I'll be graceful for commenting class WebPageExtractor protected String renderPageToString(WebApplication webApp) { String urlForMockRequest = myPage; // I've also tried localhost/myPage and others String filterPrefix = ; // Doesn't know what to put here, really. Wicket filter is to * //get the servlet context ServletContext context = webApp.getServletContext(); //fake a request/response cycle MockHttpSession servletSession = new MockHttpSession(context); servletSession.setTemporary(true); MockHttpServletRequest mockServletRequest = new MockHttpServletRequest(isdefeWebApp, servletSession, context); mockServletRequest.setURL(/ + urlForMockRequest); // also tried this mockServletRequest.setURL(mockServletRequest.getContextPath() + mockServletRequest.getServletPath() + /); MockHttpServletResponse mockServletResponse = new MockHttpServletResponse(mockServletRequest); //initialize request and response mockServletRequest.initialize(); mockServletResponse.initialize(); // Generate wicket web request and so on.. Url url = new Url(Arrays.asList(urlForMockRequest), new ArrayListUrl.QueryParameter()); ServletWebRequest webRequest = new ServletWebRequest(mockServletRequest, filterPrefix, url); ServletWebResponse webResponse = new ServletWebResponse(webRequest, mockServletResponse); BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(webResponse); RequestCycle requestCycle = webApp.createRequestCycle(webRequest, bufferedWebResponse); BookmarkablePageRequestHandler bookmarkablePageRequestHandler = new BookmarkablePageRequestHandler(new PageProvider(MyPage.class, new PageParameters())); bookmarkablePageRequestHandler.respond(requestCycle); // Also tried //requestCycle.setResponsePage(MyPage.class,new PageParameters()); requestCycle.processRequestAndDetach(); requestCycle.getResponse().close(); CharSequence cs = bufferedWebResponse.getText(); //NULL!!! if (cs != null) { return cs.toString(); } else { // CS is always null :( return null; } } Thanks for your help and excuse my poor english Oscar Besga Arcauz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com
Re: AjaxLink not work
Hi, The code looks OK. What exactly doesn't work ? On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All AjaxLinks from the console not work. final AjaxLink createLink = new IndicatingAjaxLink(createLink) { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { editModalWin.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = -7834632442532690940L; @Override public Page createPage() { return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO()); } }); editModalWin.show(target); } }; What am I forgetting? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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: Wicket with JPA and container managed transactions
Am 08.10.2012 15:34, schrieb Martin Grigorov: javaee-inject uses wicket-ioc and injects a serializable Proxy instead of the EJB bean itself that was returned by the container. This is the same as how Spring and Guice work. See the response of heapifyman. The simplest would be use only CDI in your Wicket code. Hide any usage of EJBs behind CDI. Thank You both for details, I will try some tests in both directions. Dieter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxLink not work
On Oct 8, 2012, at 4:31 PM, Martin Grigorov wrote: Hi, The code looks OK. What exactly doesn't work ? When I click on the link does nothing. All Links into the console not work. Here you can find source code from console ( http://svn.apache.org/viewvc/incubator/syncope/trunk/console/ ) On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All AjaxLinks from the console not work. final AjaxLink createLink = new IndicatingAjaxLink(createLink) { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { editModalWin.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = -7834632442532690940L; @Override public Page createPage() { return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO()); } }); editModalWin.show(target); } }; What am I forgetting? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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 -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino
Re: AjaxLink not work
Hi, I have no time to debug the whole app. Check for JavaScript errors. Also check the produced HTML. Find the a tag for the link, get its 'id' and search for Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e: 'click'}); Check with Firebug/Dev tools that and Ajax call is fired when you click. On Mon, Oct 8, 2012 at 5:40 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: On Oct 8, 2012, at 4:31 PM, Martin Grigorov wrote: Hi, The code looks OK. What exactly doesn't work ? When I click on the link does nothing. All Links into the console not work. Here you can find source code from console ( http://svn.apache.org/viewvc/incubator/syncope/trunk/console/ ) On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All AjaxLinks from the console not work. final AjaxLink createLink = new IndicatingAjaxLink(createLink) { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { editModalWin.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = -7834632442532690940L; @Override public Page createPage() { return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO()); } }); editModalWin.show(target); } }; What am I forgetting? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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 -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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: AjaxLink not work
Martin, In the Page Source Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e:'click'}); is not present. Do I Have to include something? M On Oct 8, 2012, at 4:48 PM, Martin Grigorov wrote: Hi, I have no time to debug the whole app. Check for JavaScript errors. Also check the produced HTML. Find the a tag for the link, get its 'id' and search for Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e: 'click'}); Check with Firebug/Dev tools that and Ajax call is fired when you click. On Mon, Oct 8, 2012 at 5:40 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: On Oct 8, 2012, at 4:31 PM, Martin Grigorov wrote: Hi, The code looks OK. What exactly doesn't work ? When I click on the link does nothing. All Links into the console not work. Here you can find source code from console ( http://svn.apache.org/viewvc/incubator/syncope/trunk/console/ ) On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All AjaxLinks from the console not work. final AjaxLink createLink = new IndicatingAjaxLink(createLink) { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { editModalWin.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = -7834632442532690940L; @Override public Page createPage() { return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO()); } }); editModalWin.show(target); } }; What am I forgetting? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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 -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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 -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino
Re: Wicket with JPA and container managed transactions
I found a different solution I would like to post for discussion: I encapsulated the Facade in a LoadableDetachableModel like this: /** * Model for JPA facade beans. * @author Dieter Tremel tre...@tremel-computer.de */ public class EntityFacadeModelE extends JPAEntity extends LoadableDetachableModelAbstractFacadeE { private Class? extends JPAEntity entityClass; public EntityFacadeModel(Class? extends JPAEntity entityClass) { this.entityClass = entityClass; } @Override protected AbstractFacadeE load() { AbstractFacadeE result = null; try { InitialContext ctx = new InitialContext(); result = (AbstractFacadeE) ctx.lookup(java:module/ + entityClass.getSimpleName() + Facade); } catch (NamingException ex) { Logger.getLogger(EntityFacadeModel.class.getName()).log(Level.SEVERE, null, ex); } return result; } } I hope the JNDI lookup is a not too expensive operation, is it? In the page I build this like: EntityDataProviderBuch buchProvider = new EntityDataProvider(new EntityFacadeModelBuch(Buch.class)); DefaultDataTableBuch, String dTable = new DefaultDataTable(datatable, columns, buchProvider, 10); And in the EntityDataProvider I have overwritten: @Override public void detach() { facadeModel.detach(); super.detach(); } As a result there are no serialization errors in my trial. The lookup will be called once per request. What do you think? Dieter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket with JPA and container managed transactions
Hi, The JNDI lookup just done for you in normal JavaEE setup as well. So I think your code is OK. On Mon, Oct 8, 2012 at 6:24 PM, Dieter Tremel tre...@tremel-computer.de wrote: I found a different solution I would like to post for discussion: I encapsulated the Facade in a LoadableDetachableModel like this: /** * Model for JPA facade beans. * @author Dieter Tremel tre...@tremel-computer.de */ public class EntityFacadeModelE extends JPAEntity extends LoadableDetachableModelAbstractFacadeE { private Class? extends JPAEntity entityClass; public EntityFacadeModel(Class? extends JPAEntity entityClass) { this.entityClass = entityClass; } @Override protected AbstractFacadeE load() { AbstractFacadeE result = null; try { InitialContext ctx = new InitialContext(); result = (AbstractFacadeE) ctx.lookup(java:module/ + entityClass.getSimpleName() + Facade); } catch (NamingException ex) { Logger.getLogger(EntityFacadeModel.class.getName()).log(Level.SEVERE, null, ex); } return result; } } I hope the JNDI lookup is a not too expensive operation, is it? In the page I build this like: EntityDataProviderBuch buchProvider = new EntityDataProvider(new EntityFacadeModelBuch(Buch.class)); DefaultDataTableBuch, String dTable = new DefaultDataTable(datatable, columns, buchProvider, 10); And in the EntityDataProvider I have overwritten: @Override public void detach() { facadeModel.detach(); super.detach(); } As a result there are no serialization errors in my trial. The lookup will be called once per request. What do you think? Dieter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: AjaxLink not work
No. Wicket should do this for you. Is your link disabled ? Did you add it to a parent component ? Create a quickstart and attach it to Jira. On Mon, Oct 8, 2012 at 6:21 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Martin, In the Page Source Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e:'click'}); is not present. Do I Have to include something? M On Oct 8, 2012, at 4:48 PM, Martin Grigorov wrote: Hi, I have no time to debug the whole app. Check for JavaScript errors. Also check the produced HTML. Find the a tag for the link, get its 'id' and search for Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e: 'click'}); Check with Firebug/Dev tools that and Ajax call is fired when you click. On Mon, Oct 8, 2012 at 5:40 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: On Oct 8, 2012, at 4:31 PM, Martin Grigorov wrote: Hi, The code looks OK. What exactly doesn't work ? When I click on the link does nothing. All Links into the console not work. Here you can find source code from console ( http://svn.apache.org/viewvc/incubator/syncope/trunk/console/ ) On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All AjaxLinks from the console not work. final AjaxLink createLink = new IndicatingAjaxLink(createLink) { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { editModalWin.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = -7834632442532690940L; @Override public Page createPage() { return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO()); } }); editModalWin.show(target); } }; What am I forgetting? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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 -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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 -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PPMC Member http://people.apache.org/~mdisabatino -- 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
SharedResourceReference question
I have a bunch of shared resources that serve up various formats of data (JSON/PDF etc) ... What's the best way to authenticate with these things? I don't want to just leave them wide open... TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SharedResourceReference-question-tp4652769.html Sent from the Users forum 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
Re: Problem with testing text field auto completion with WicketTester
On 2012-10-08 10:06, Martin Grigorov wrote: Hi, You need to do: tester.getRequest().setParameter(the:respective:name:of:the:input, some value); tester.executeBehavior() It did a trick. Thanks! Marcin On Sun, Oct 7, 2012 at 3:26 AM, Marcin Zajączkowski msz...@wp.pl wrote: On 2012-10-07 02:14, Marcin Zajączkowski wrote: Hi, I try to test auto complete feature implemented with DefaultCssAutoCompleteTextField. I'm able to call it from a test using WicketTesterHelper.findBehavior: AbstractAutoCompleteBehavior behavior = (AbstractAutoCompleteBehavior) WicketTesterHelper.findBehavior(tester.getComponentFromLastRenderedPage(component), AbstractAutoCompleteBehavior.class); tester.executeBehavior(behavior); but I don't know how to pass a value entered into a text field (behavior always gets null as an input). I tried to get TextField using tester.getComponentFromLastRenderedPage() and set a value on model, but it doesn't reflect on a value visible by java script. I was using FormTester and setValue(), but also without any positive effect. I was also playing with tester.executeAjaxEvent() which could be helpful with simple events (like onkeyup), but I don't know how (if) can it trigger auto complete behavior. I'm not able to set a value in an input, which would be visible by a java script and later pass to a server side in a request. Maybe there is some easier way using WicketTester? How can I do it? I'm using Wicket 6.0.0. Regards Marcin -- http://blog.solidsoft.info/ - Working code is not enough - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Increasing session size
http://docs.oracle.com/javaee/1.2.1/api/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int) On Mon, Oct 8, 2012 at 12:46 PM, shruts shruts.inn...@gmail.com wrote: Hi is there any way that we can set the session time out only for a restricted number of page for which login is not required. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataView-and-increasing-session-size-tp1876757p4652739.html Sent from the Users forum 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Centralizing ajax inline javascript
Sebastien, Ernesto, I had to repost because after centralizing the ajax behavior I saw the browser does not send CheckBox ajax requests in parallel any more. Is this because we centralized the behavior? Lucas Kuperman -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Centralizing-ajax-inline-javascript-tp4652499p4652772.html Sent from the Users forum 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
Page expiration error on AJAX call
Hi, I have an AjaxEditableLabel wrapped in a component. After some changes (I'm still finding which), it's behavior gone totally astray: On click, it gave me Page Expired every time. That was happening with this.getPageSettings().setRecreateMountedPagesAfterExpiry(false); When this is true, it redirects me to an invalid URL - from http://localhost:8080/essc-portal/release/EAP/5.0.0.GA?10 to http://localhost:8080/essc-portal/release//?12 The AEL's code is: span id=label40 onclick=var wcall=wicketAjaxGet('./5.0.0.GA?6-1.IBehaviorListener.0-releaseBox-form-traits-releasedBinaries-link-label',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('label40') != null;}.bind(this)); I have tried everything that came to my mind. Any ideas what could be wrong? Thanks, Ondra
RE: Page expiration error on AJAX call
Start by looking for a JS onClick event/behavior through your recent changes :) Or add some code for us to view... ~ Thank you, Paul Bors -Original Message- From: Ondrej Zizka [mailto:ozi...@redhat.com] Sent: Monday, October 08, 2012 9:37 PM To: wicket-users Subject: Page expiration error on AJAX call Hi, I have an AjaxEditableLabel wrapped in a component. After some changes (I'm still finding which), it's behavior gone totally astray: On click, it gave me Page Expired every time. That was happening with this.getPageSettings().setRecreateMountedPagesAfterExpiry(false); When this is true, it redirects me to an invalid URL - from http://localhost:8080/essc-portal/release/EAP/5.0.0.GA?10 to http://localhost:8080/essc-portal/release//?12 The AEL's code is: span id=label40 onclick=var wcall=wicketAjaxGet('./5.0.0.GA?6-1.IBehaviorListener.0-releaseBox-form-traits-releasedBinaries-link-label',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('label40') != null;}.bind(this)); I have tried everything that came to my mind. Any ideas what could be wrong? Thanks, Ondra - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page expiration error on AJAX call
Hi, Check your logs for errors related to the serialization of the page. If the page is not properly serialized then next attempts to find it will fail with PageExpiredException. On Tue, Oct 9, 2012 at 4:37 AM, Ondrej Zizka ozi...@redhat.com wrote: Hi, I have an AjaxEditableLabel wrapped in a component. After some changes (I'm still finding which), it's behavior gone totally astray: On click, it gave me Page Expired every time. That was happening with this.getPageSettings().setRecreateMountedPagesAfterExpiry(false); When this is true, it redirects me to an invalid URL - from http://localhost:8080/essc-portal/release/EAP/5.0.0.GA?10 to http://localhost:8080/essc-portal/release//?12 The AEL's code is: span id=label40 onclick=var wcall=wicketAjaxGet('./5.0.0.GA?6-1.IBehaviorListener.0-releaseBox-form-traits-releasedBinaries-link-label',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('label40') != null;}.bind(this)); I have tried everything that came to my mind. Any ideas what could be wrong? Thanks, Ondra -- 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
IResourceStream from ByteArrayResource ?
I'm looking at the AJAXDownload example code and it seems I need to provide that with an IResourceStream. I have implemented a shared ByteArrayResource that serves up pdf. Q: what's the best way to get an IResourceStream from my ByteArrayResource? Q: is there a way? Maybe to use the URL of my shared resource with an IndicatingAjaxLink ? TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776.html Sent from the Users forum 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