Re: Is wicket-cdi native to Wicket 6.1 and upwards?

2012-11-26 Thread Kurt Sys
Hey, http://devlearnings.wordpress.com/2011/05/15/apache-openwebbeans-cdi-from-standalone-to-webapp/ http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html/environments.html - this is for jboss, but there's something for using it in tomcat as well, and it's possible to replace weld-related

Re: Cloneing Wicket Objects

2012-11-26 Thread Martin Grigorov
Hi, You cannot add a component twice. A component can have just one parent. I think jQuery clone() should work, but I'm not totally sure. You can use WicketObjects#clone() method to clone any kind of Object. It uses Java Serialization to do it. Just make sure you clone it before adding the

Re: Is wicket-cdi native to Wicket 6.1 and upwards?

2012-11-26 Thread Andrea Del Bene
Hi, If you are using Wicket with a Tomcat-based server like TomEE maybe you could find helpful my example project on integrating OpenEJB and Wicket: https://github.com/bitstorm/Wicket-tutorial-examples/tree/master/CdiInjectionExample. Hey,

Complete Wicket Websockets example

2012-11-26 Thread lsm_7
Hi all, I am trying to develop a web application which includes a chat inside it. The idea is to provide the messaging using XMPP and websockets. However, I didn't find a complete example in Java about WebSockets and Wicket. I found one which uses scala and I don't understand it so much. The

Re: Complete Wicket Websockets example

2012-11-26 Thread Martin Grigorov
Hi, I guess you talk about my examples. Java: source code: https://github.com/martin-g/blogs/tree/master/wicket6-native-websockets explanations: http://wicketinaction.com/2012/07/wicket-6-native-websockets/ It uses mostly server side push, i.e. the communication in this example is mostly server

WiQuery tabs remain selected across requests?

2012-11-26 Thread Stefan Renz
Hi, we're using WiQuery tabs in our web application to divide information into smaller, logically grouped chunks. Often times, our users will select a few items in a list in order to browse through information. For each of those selected items we present a detail page with WiQuery tabs on them,

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Ernesto Reinaldo Barreiro
Can you try setDefaultSelectedTabIndex? On Mon, Nov 26, 2012 at 12:55 PM, Stefan Renz s.r...@efonds.com wrote: Hi, we're using WiQuery tabs in our web application to divide information into smaller, logically grouped chunks. Often times, our users will select a few items in a list in order

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Stefan Renz
In principle, yes, that's one part of the solution. However, I need to know which index the page currently displays. How can I get the information, which tab is selected? Ernesto Reinaldo Barreiro wrote: Can you try setDefaultSelectedTabIndex? On Mon, Nov 26, 2012 at 12:55 PM, Stefan Renz

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Ernesto Reinaldo Barreiro
I see there is a http://api.jqueryui.com/tabs/#option-active which does not seem to be implemented on wiquery (I will add it). So, what you will need is some sort of AJAX version for http://api.jqueryui.com/tabs/#event-activate and on server side record this number (that you will pass as an

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Stefan Renz
Hi Ernesto, thanks for the quick feedback. We're working on top of Wicket/WiQuery 1.5.7. Ciao Stefan Ernesto Reinaldo Barreiro wrote: I see there is a http://api.jqueryui.com/tabs/#option-active which does not seem to be implemented on wiquery (I will add it). So, what you will

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Ernesto Reinaldo Barreiro
Let me see if I can add those features today or tomorrow. On Mon, Nov 26, 2012 at 1:24 PM, Stefan Renz s.r...@efonds.com wrote: Hi Ernesto, thanks for the quick feedback. We're working on top of Wicket/WiQuery 1.5.7. Ciao Stefan Ernesto Reinaldo Barreiro wrote: I see there is a

multiple requests and StalePageException

2012-11-26 Thread Michal Wegrzyn
Hi group, In my Wicket application I have an applet. In the background it requests servlet and finally executes Wicket behavior via js. If one request is performed, then everything works without problems. Lately I have changed applet and now it can do one or three requests. If it performs three

Re: multiple requests and StalePageException

2012-11-26 Thread Martin Grigorov
The renderCount increases only when you use non-Ajax requests, i.e. when you re-render the whole page. Make sure that executes Wicket behavior via js uses Wicket.Ajax.** On Mon, Nov 26, 2012 at 1:56 PM, Michal Wegrzyn michal.wegr...@onior.comwrote: Hi group, In my Wicket application I have

Re: AjaxSubmitLink + setResponsePage = feedback message problem on new page

2012-11-26 Thread sadiq81
Thx for this post, it also helped me :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-setResponsePage-feedback-message-problem-on-new-page-tp1843719p4654214.html Sent from the Users forum mailing list archive at Nabble.com.

WicketURLEncoder: escaping / in parameter value

2012-11-26 Thread Daniel Stoch
Hi, I'm using WicketURLEncoder (1.4.18) to encode some parameter values. Exactly WicketURLEncoder.QUERY_INSTANCE, but the problem if parameter value contains / (slash) character, eg.: 1 Mbit/s, which is not escaped. This cause an error in url coding startegy which is based on key/value pairs

Re: WicketURLEncoder: escaping / in parameter value

2012-11-26 Thread Martin Grigorov
Hi, Since you use parameters in the path you have to use PATH_INSTANCE. On Mon, Nov 26, 2012 at 2:28 PM, Daniel Stoch daniel.st...@gmail.comwrote: Hi, I'm using WicketURLEncoder (1.4.18) to encode some parameter values. Exactly WicketURLEncoder.QUERY_INSTANCE, but the problem if parameter

Re: WicketURLEncoder: escaping / in parameter value

2012-11-26 Thread Daniel Stoch
Thanks for the very fast answer. I wanted to change it on PATH_INSTANCE but I wanted to make sure, so I have asked ;) -- DS On Mon, Nov 26, 2012 at 2:32 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Since you use parameters in the path you have to use PATH_INSTANCE. On Mon, Nov 26,

Howto display 404 cause of response on custom error page?

2012-11-26 Thread Per Newgro
Hi, i'm looking for a way to display the cause of a 404 send by myself on my custom error page. In a behavior i do code throw new AbortWithHttpErrorCodeException(HttpServletResponse.SC_NOT_FOUND, Missing subsite in behavior); /code It is displayed in my custom error page code

Re: AjaxCallListener precondition with user input

2012-11-26 Thread Thomas Heigl
Hey Sekib, Thanks a lot for your input! In case anybody has a similar problem, I ended up solving it through an AjaxCallListener with a little workaround. If the user confirms the alert, I re-trigger a click on the link with additional data and check for that in my precondition. This can be used

Functional tests with QUnit

2012-11-26 Thread Martin Grigorov
Hi Wicketeers, I've just published an article at http://wicketinaction.com/2012/11/javascript-based-functional-testing/ that describes a fun way to do functional testing of web applications. I hope you'll find it useful! -- Martin Grigorov jWeekend Training, Consulting, Development

Re: Howto display 404 cause of response on custom error page?

2012-11-26 Thread Martin Grigorov
Hi, See ErrorAttributes.java. By Servlet spec several request attributes are available when the web container does error dispatching. On Mon, Nov 26, 2012 at 3:14 PM, Per Newgro per.new...@gmx.ch wrote: Hi, i'm looking for a way to display the cause of a 404 send by myself on my custom

Re: Functional tests with QUnit

2012-11-26 Thread Pierre Goupil
Excellent food for thoughts! Thank you very much! On Mon, Nov 26, 2012 at 3:53 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi Wicketeers, I've just published an article at http://wicketinaction.com/2012/11/javascript-based-functional-testing/that describes a fun way to do functional

RE: multiple requests and StalePageException

2012-11-26 Thread Michal Wegrzyn
Hi Martin, Thanks for a tip. What do you mean by uses Wicket.Ajax.**? Applet till now generated fake event to trigger Wicket ajax behavior. I have just tried calling behavior directly with wicketAjaxGet (https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html) but I get the same

Re: Howto display 404 cause of response on custom error page?

2012-11-26 Thread Stefan Renz
Hi, we had a similar requirement, so we did the following: instead of throwing a AbortWithHttpErrorCodeException, we throw a semantic exception. In your case, throw MissingSubsiteException( your message ). How to make Wicket aware of such an exception and implement a proper reaction/response?

Re: multiple requests and StalePageException

2012-11-26 Thread Martin Grigorov
Can you show the code that the applet uses to make requests to the page ? On Mon, Nov 26, 2012 at 4:47 PM, Michal Wegrzyn michal.wegr...@onior.comwrote: Hi Martin, Thanks for a tip. What do you mean by uses Wicket.Ajax.**? Applet till now generated fake event to trigger Wicket ajax

RE: multiple requests and StalePageException

2012-11-26 Thread Michal Wegrzyn
private JSObject window; public void documentUpdated( String newDocumentId ) { window.call( documentUpdated, new String[] { param1, param2 } ); } -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent:

Re: multiple requests and StalePageException

2012-11-26 Thread Martin Grigorov
The problem is clear. On Mon, Nov 26, 2012 at 4:54 PM, Michal Wegrzyn michal.wegr...@onior.comwrote: private JSObject window; public void documentUpdated( String newDocumentId ) { window.call( documentUpdated, new String[] { param1, param2 } ); }

RE: Cloneing Wicket Objects

2012-11-26 Thread Paul Bors
I stand corrected, Martin is right. We cache our SQL results hence why this is not a problem for us. ~ Thank you, Paul Bors -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, November 26, 2012 3:33 AM To: users@wicket.apache.org Subject: Re: Cloneing

Re: AJAX not working after migrating from wicket 1.5.5 to 6.3.0

2012-11-26 Thread shimin_q
After a lot of tries, here is what I obeserved so far in my envionment. Basically, it appears how the page with AJAX is loaded affects whether AJAX listeners are enabled on the page. Could anyone please take a look at below and let me know why this is the case and what I need to do to fix it?

Re: AJAX not working after migrating from wicket 1.5.5 to 6.3.0

2012-11-26 Thread shimin_q
Just to add a bit more info. The newmetaprofile link on the 8770main page looks like the following: li Create ./newmetaprofile /li Any suggestions/ideas for me to try would be appreciated! -- View this message in context:

DropDownChoice box does not display the value I selected

2012-11-26 Thread shimin_q
I have a DropDownChoice box that loads a list of values on load(), but when I selected a value from the list, the selected value does not show up in the box, even though it appears that getModelObject() does return the correct value (the value I selected). It's just the box does not display it.

Re: how to fix this error in wicket app

2012-11-26 Thread saty
My problem has become worse now, earlier i only had issues selecting all rows on grid but now anything that refreshes the data table grid is giving me error. Any help would be appreciated. I dont have too many Ajax calls in the grid, i am not sure what causes the recursion that it is complaining.

wicket-mousetrap behavior

2012-11-26 Thread Andrew Lombardi
Would love to get any feedback on a new component I just built. I came across an awesome JS library (http://craig.is/killing/mice) for adding key bindings to a webpage. I immediately thought it would be fun to add it to Mystic Paste (http://mysticpaste.com). And it's now live after doing

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Ernesto Reinaldo Barreiro
Stefan, I have added support for AJAX events https://github.com/WiQuery/wiquery/commit/cd1fa658a6bd8bd896b1f46c7750ecb04ee2e034 You can use them to track selected index at server side as tabs.setAjaxSelectEvent(new ITabsAjaxEvent() { private static final long serialVersionUID = 1L; public

Avoid session timeout through AjaxSelfUpdatingTimerBehavior

2012-11-26 Thread Tobi81
hi, i got a problem with wicket's session timeout. i'm using wicket version 1.4.9. i set the session timeout to 1 minute in the file web.xml. in my case this is necessary to recognize if an user is on-/offline quite fast. if the user closes the browser the session is timed out after 1 minute. i

RE: Cloneing Wicket Objects

2012-11-26 Thread Colin Rogers
Martin, For some reason JQuery clone doesn't work - even with the withDataAndEvents and deepWithDataAndEvents flags set to true... :/ But - thank you for your suggestion - sounds just the thing - will give it a spin tonight :) Cheers, Col. -Original Message- From: Martin Grigorov

AjaxTabPanel stateless is possible?

2012-11-26 Thread Paolo
I would the url of my site without pageId ?2 or ?3 etc. I know that to do this I need to make the page stateless, so I did it for all my pages. But one page have 2 tabs, using AjaxTabbedPanel. I tried to use simple TabbedPanel, but it is not usefull, because so I have that all the page is

Re: WiQuery tabs remain selected across requests?

2012-11-26 Thread Ernesto Reinaldo Barreiro
Stefan, Yes it will make it into the next 1.5.x release. It will be good if you can test it before that, so that we can fix/add anything else you need. On Mon, Nov 26, 2012 at 10:58 PM, Stefan Renz s.r...@efonds.com wrote: Hi Ernesto, fabulous, thanks for the quick solution. I'll try that as

Re: AjaxTabPanel stateless is possible?

2012-11-26 Thread Martin Grigorov
Hi, I think it is possible but I haven't tried it. TabbedPanel can easily become stateless by using BookmarkablePageLink. AjaxTabbedPanel will need more work. You need to use https://github.com/jolira/wicket-stateless and maybe even add your own Ajax behaviors which work like the ones in this

Re: Adding Components to fit markup

2012-11-26 Thread Martin Grigorov
Hi, Since the markup is added dynamically it looks like MarkupContainer#autoAdd() is the best match. You'll need to create the MarkupStream yourself. On Tue, Nov 27, 2012 at 3:53 AM, Nick Pratt nbpr...@gmail.com wrote: If I create an empty element (a div) in HTML (via jQuery), and assign it

Re: Avoid session timeout through AjaxSelfUpdatingTimerBehavior

2012-11-26 Thread Martin Grigorov
Hi, This should work. Make sure the Ajax call hits the server side, i.e. check that onTimer() method is actually called. Next try with a quickstart application that uses newer versions of both Wicket and Tomcat. On Mon, Nov 26, 2012 at 10:14 PM, Tobi81 tobias.go...@web.de wrote: hi, i got a