Re: Testing DropDownChoice with Ajax
I see what happens. Since DropDownChoice wants to be notified when the selection change it submits the new value as soon as formTester#select() is called. FormTester#submit() submits with empty request parameters (because the new value for the DDC is already submitted) and thus the check for required fails. You can use formTester.setValue(dropdown, 0); instead of #select(String, int) to avoid the call of #selectionChanged() callback. On Thu, Jan 17, 2013 at 3:12 AM, RalfButler ralf.but...@web.de wrote: Yes, indeed, it looks similar, except that I receive the same error messages as before if the requirement of dropdown is set to true in MockPageWithForm: dropDown.setRequired(true); and add assertNoErrorMessage to FormDispatchEventTest#dropDownEvent(): ... FormTester formTester = tester.newFormTester(form); formTester.select(dropdown, 0); formTester.submit(); // new entry which checks for any error message tester.assertNoErrorMessage(); MockPageWithForm page = (MockPageWithForm)tester.getLastRenderedPage(); ... I'm a bit puzzled why that is and would appreciate any help you can give. Thanks, Ralf -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Testing-DropDownChoice-with-Ajax-tp4655418p4655437.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 http://jweekend.com/
confirmation popup in component
Hi, Is there any confirmation component in wicket/wicket-stuff? As an example, when user want to delete something, a popup window will come up and ask user whether they are sure what they are doing or not i'm having a case where a button and custom action menu. For a button, we have this functionality by using IAjaxCallDecorator, but for custom action menu, i'm only with a component Thanks in Advance WNU -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/confirmation-popup-in-component-tp4655441.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: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverterDouble { private static final long serialVersionUID = 1L; public CurrencyConverter(IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien.
Re: How to repaint a component on browser resize?
You can register JS event listener on resize event for window. You can manipulate the image size with pure JS so no need to use Wicket at all. On Thu, Jan 17, 2013 at 1:16 PM, dpmihai dpmi...@yahoo.com wrote: I have a panel with a RenderedDynamicImageResource which has width and height as parameters. I have a modal window with this panel and I want when I resize the window to have a repaint of the inner panel with the new width and height? Is it possible to achieve this in wicket 1.5? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-repaint-a-component-on-browser-resize-tp4655456.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 http://jweekend.com/
Re: Redirect to Wicket page with 301 Moved Permanently
Concerning Wicket 1.5/6: I've mounted a page for example with a mount path like product.html and with a query string (PageParameter) like product.html?product=1234. This is my old mounting path which has already been indexed by Google. The new mounting path for the same page will look different, say product/product-name/1234. To forward requests from obsolete links to the new one, I've added a kind of Redirect Page which does nothing but redirecting to the new Url. The redirect page is mounted with the old path. public RedirectPage( final PageParameters parameters, final String url ) { super(parameters); throw new RedirectToUrlException( url , HttpServletResponse.SC_MOVED_PERMANENTLY ); } If I would change the mounting path for more than 5 or 10 pages, this kind of solution could be very annoying. Is there another way to solve this. I would prefer something like a Map which holds old and new mounth paths and a kind of Mapper which is responsible to map obsolete URLs to new ones. Exists such a solution which I'm not aware of? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655460.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 to Wicket page with 301 Moved Permanently
There is no such functionality in Wicket. But all you need is a custom IRequestMapper, override its #mapRequest(Url) method and return a custom IRequestHandler that does the redirect. On Thu, Jan 17, 2013 at 2:22 PM, Dirk Forchel dirk.forc...@exedio.comwrote: Concerning Wicket 1.5/6: I've mounted a page for example with a mount path like product.html and with a query string (PageParameter) like product.html?product=1234. This is my old mounting path which has already been indexed by Google. The new mounting path for the same page will look different, say product/product-name/1234. To forward requests from obsolete links to the new one, I've added a kind of Redirect Page which does nothing but redirecting to the new Url. The redirect page is mounted with the old path. public RedirectPage( final PageParameters parameters, final String url ) { super(parameters); throw new RedirectToUrlException( url , HttpServletResponse.SC_MOVED_PERMANENTLY ); } If I would change the mounting path for more than 5 or 10 pages, this kind of solution could be very annoying. Is there another way to solve this. I would prefer something like a Map which holds old and new mounth paths and a kind of Mapper which is responsible to map obsolete URLs to new ones. Exists such a solution which I'm not aware of? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655460.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 http://jweekend.com/
Re: How to repaint a component on browser resize?
I understand. I wondered if it is possible that to have a behavior inside my panel and inside renderOnLoadJavaScript (from renderHead) to call a javascript like : wicketAjaxGet(' + getCallbackUrl() + width=...' I have to get the width from javascript somehow with a function, and I have no idea where to call it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-repaint-a-component-on-browser-resize-tp4655456p4655462.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
Static-file resource serving question
Hi all - Trying to upgrade a number of wicket applications from 1.4 to wicket 1.5, and then once that's working, to 6.x. One thing we want to handle is having any reference in the markup such as img src=img/logo.png/ be able to find that image in a filesystem directory known to the application. There are also js and css directories. These are not inside WEB-INF, not in the classpath or anything like that, just out in the server's filesystem. In Wicket 1.4 we handled this as follows: Add the parent directory of img, js, and css to getResourceSettings().addResourceFolder(...) Define a subclass of URIRequestTargetUrlCodingStrategy whose decode() method did this: return new ResourceStreamRequestTarget(new PackageResourceStream(Application.class, / + getMountPath() + / + path)) and set some caching headers. Mount this URIRequestTargetUrlCodingStrategy on the img path, the js path, and the css path. I am not sure how to accompish this in 1.5 or 6.x. Can someone help me either translate the above strategy, or point out how to use the new request-mapping setup to make it simpler and clearer? BTW I did study http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , but that is for dynamic images. Great for database images, but it does not take advantage of wicket's understanding of files - their modification dates, caching strategies, determining their mime types, etc. I feel like what I want is a superclass of PackageResource that understands files but does not make the package assumption - but there is no such superclass. Bng - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Redirect to Wicket page with 301 Moved Permanently
Hm, I already thought about that. But I miss the link between the old mounted pages and the new pages. I mean I have to mount a pair of page classes though. mountPage(product.html, LegacyProductPage.class); mountPage(product/#{product_name}/${product}, ProductPage.class) And in the new Mapper would check like (don't know whether this works): @Override public final IRequestHandler mapRequest(Request request) { IRequestHandler handler = delegate.mapRequest(request); // check whether the request is a legacy URL if (isLegacyUrl(request) { // get the new URL instead String url = createRedirectUrl(handler, request); handler = createRedirectHandler(url); } return handler } Just what I have in mind. The new mapper would hold a map with a pair of legacy and new Page classes. And for each request the mapper would check whether this request URL is contained in the map. But this means I have to maintain two places for each pair of legacy and new Page classes. I'm not sure whether this is a smart solution. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655465.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 to Wicket page with 301 Moved Permanently
You don't need to mountPage(TheLegacyPage) - it wont be used anyway. The requests to the old urls will be server by the new request mapper/handler. On Thu, Jan 17, 2013 at 3:06 PM, Dirk Forchel dirk.forc...@exedio.comwrote: Hm, I already thought about that. But I miss the link between the old mounted pages and the new pages. I mean I have to mount a pair of page classes though. mountPage(product.html, LegacyProductPage.class); mountPage(product/#{product_name}/${product}, ProductPage.class) And in the new Mapper would check like (don't know whether this works): @Override public final IRequestHandler mapRequest(Request request) { IRequestHandler handler = delegate.mapRequest(request); // check whether the request is a legacy URL if (isLegacyUrl(request) { // get the new URL instead String url = createRedirectUrl(handler, request); handler = createRedirectHandler(url); } return handler } Just what I have in mind. The new mapper would hold a map with a pair of legacy and new Page classes. And for each request the mapper would check whether this request URL is contained in the map. But this means I have to maintain two places for each pair of legacy and new Page classes. I'm not sure whether this is a smart solution. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655465.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 http://jweekend.com/
Re: Redirect to Wicket page with 301 Moved Permanently
You don't need to mountPage(TheLegacyPage) - it wont be used anyway. Yes, you are right. There is actually no need to do this. But I don't have a glue how to check whether the request URL is an obsolete one or not AND how to map the old parameters to the new parameters. So I thought, having both pages and let Wicket do the stuff for me would be a good starting point. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655468.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 to Wicket page with 301 Moved Permanently
:-) Read again what you just said - you (the application developer) don't know the rules but Wicket (a generic framework) should know. How ? :-) Your manager/customer is not embedded in Wicket to make the decisions :-) Looking at the urls you showed earlier you have to check that the url ends with .html, has a segment for the category and there is such category in your app domain, same for product. Something like this. On Thu, Jan 17, 2013 at 3:30 PM, Dirk Forchel dirk.forc...@exedio.comwrote: You don't need to mountPage(TheLegacyPage) - it wont be used anyway. Yes, you are right. There is actually no need to do this. But I don't have a glue how to check whether the request URL is an obsolete one or not AND how to map the old parameters to the new parameters. So I thought, having both pages and let Wicket do the stuff for me would be a good starting point. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655468.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 http://jweekend.com/
Re: Redirect to Wicket page with 301 Moved Permanently
Sounds to complicated. Then I prefer the old fashioned way like this ... Wicket generates the new Url based on a passed in Product. I don't have to bother about .html ending and segement sizes and so on ... mountPage(product.html, LegacyProductPage.class); mountPage(product/#{product_name}/${product}, ProductPage.class); public abstract class AbstractRedirectPage extends WebPage { public AbstractRedirectPage( final PageParameters parameters, final String url ) { this( parameters, url, HttpServletResponse.SC_MOVED_PERMANENTLY ); } public AbstractRedirectPage( final PageParameters parameters, final String url, int statusCode ) { super(parameters); throw new RedirectToUrlException(toFullUrl( url ), statusCode ); } } public class LegacyProductPage extends AbstractRedirectPage { public LegacyProductPage( final PageParameters parameters, final Product product ) { super(parameters, getProductPageUrl(product)); } private static String getProductPageUrl( Product product ) { final PageInfo pageInfo = new ProductPage.PageInfo(product); return pageInfo.getRelativeUrl(); } } public class ProductPage extends WebPage { public static class PageInfo { final Product product; public PageInfo( Product product ) { this.product = product; } public String getRelativeUrl() { return RequestCycle.get().urlFor( ProductPage.class, pageParametersForProductPage( product ) ).toString(); } } private final Product product; public ProductPage(final PageParameters pageParameters, final Product product ) { } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655470.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: Make URLs (i.e. mount paths) case insensitive for Wicket 6
Hi, I'm still trying to migrate this to Wicket 6 without success. Would someone give me a hand please, or point me to the documentation that I could refer to. Thanks a lot! Kind regards, Yuci On 15/01/2013 16:14, Eusie wrote: Hello, Wonder how to make URLs (i.e. mount paths) case insensitive for Wicket 6? For example, make these two URLs do the same thing: localhost/AboutUs and localhost/aboutus I understand for Wicket 1.4.x, you could achieve it in the way below: public class DemoApplication extends WebApplication { @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected IRequestCodingStrategy newRequestCodingStrategy() { WebRequestCodingStrategy.Settings strategySettings = new WebRequestCodingStrategy.Settings(); strategySettings.setMountsCaseSensitive(false); return new WebRequestCodingStrategy(strategySettings); } }; } } Many thanks, Eusie - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
The problem is the space before the currency sign. It should not be converted to non-break-space. Please open a new issue. Sven On 01/17/2013 11:59 AM, Sebastien wrote: Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverterDouble { private static final long serialVersionUID = 1L; public CurrencyConverter(IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Static-file resource serving question
Thank you, but that doesn't quite accomplish what I was hoping for, since (a) I'd have to change all the HTML files, and (b) the images are not, in fact, in the same directory as the HTML (or a subdirectory of that location). Also, I didn't mention it before, but it is useful to be able to programmatically get ahold of these images in addition to loading them directly from markup. Bng On Jan 17, 2013, at 8:13 AM, Martin Grigorov wrote: All you need is to wrap it in wicket:linkimg src=img/logo.png//wicket:link This way Wicket will search for img/logo.png in the same folder where the current .html is. On Thu, Jan 17, 2013 at 2:52 PM, Boris Goldowsky bgoldow...@cast.orgwrote: Hi all - Trying to upgrade a number of wicket applications from 1.4 to wicket 1.5, and then once that's working, to 6.x. One thing we want to handle is having any reference in the markup such as img src=img/logo.png/ be able to find that image in a filesystem directory known to the application. There are also js and css directories. These are not inside WEB-INF, not in the classpath or anything like that, just out in the server's filesystem. In Wicket 1.4 we handled this as follows: Add the parent directory of img, js, and css to getResourceSettings().addResourceFolder(...) Define a subclass of URIRequestTargetUrlCodingStrategy whose decode() method did this: return new ResourceStreamRequestTarget(new PackageResourceStream(Application.class, / + getMountPath() + / + path)) and set some caching headers. Mount this URIRequestTargetUrlCodingStrategy on the img path, the js path, and the css path. I am not sure how to accompish this in 1.5 or 6.x. Can someone help me either translate the above strategy, or point out how to use the new request-mapping setup to make it simpler and clearer? BTW I did study http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , but that is for dynamic images. Great for database images, but it does not take advantage of wicket's understanding of files - their modification dates, caching strategies, determining their mime types, etc. I feel like what I want is a superclass of PackageResource that understands files but does not make the package assumption - but there is no such superclass. Bng - 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 http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Make URLs (i.e. mount paths) case insensitive for Wicket 6
The easiest way, as I see it, is to write a filter (javax.servlet), and do url manipulation there. Yours, Tron Walseth Fra: Eusie [ygou@gmail.com] Sendt: 17. januar 2013 15:37 Til: users@wicket.apache.org Emne: Re: Make URLs (i.e. mount paths) case insensitive for Wicket 6 Hi, I'm still trying to migrate this to Wicket 6 without success. Would someone give me a hand please, or point me to the documentation that I could refer to. Thanks a lot! Kind regards, Yuci On 15/01/2013 16:14, Eusie wrote: Hello, Wonder how to make URLs (i.e. mount paths) case insensitive for Wicket 6? For example, make these two URLs do the same thing: localhost/AboutUs and localhost/aboutus I understand for Wicket 1.4.x, you could achieve it in the way below: public class DemoApplication extends WebApplication { @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected IRequestCodingStrategy newRequestCodingStrategy() { WebRequestCodingStrategy.Settings strategySettings = new WebRequestCodingStrategy.Settings(); strategySettings.setMountsCaseSensitive(false); return new WebRequestCodingStrategy(strategySettings); } }; } } Many thanks, Eusie - 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: HttpsMapper with Apache Virtual Host Appending the Wrong Path
Hi Vishal, Thanks for sending this. I looked into it and the Weblogic HTTP Server plugin uses a different mechanism than the solution you posted. I'm going to have to look into it further. If anyone else has experience with the Weblogic plugin, your help would be appreciated (even if it was a non-Wicket case). Otherwise, it's something that will be on my list of things to look into down the road. Thanks, Tim On 1/11/13 5:01 PM, vp143 wrote: Hi Tim, I do not use Weblogic but I do use Jboss. Your problem sounds familar (but not exactly the same). Take a look at my resolution here: http://apache-wicket.1842946.n4.nabble.com/Configure-http-and-https-with-apache-and-jboss-td3633546.html and try and apply it to Weblogic. Regards Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-with-Apache-Virtual-Host-Appending-the-Wrong-Path-tp4655303p4655311.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket HTML Cache
Can you be more specific which caches you want to clear ? It sounds like you need to clear the cache in the browser. The browser wont make a request to the server if there is a cache for this url. So you need to clear the browser cache, no Wicket involved. On Thu, Jan 17, 2013 at 4:47 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: Is there a way to clear the HTML cache on demand instead of using expiration timeouts in Wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket HTML Cache
Last time I checked, wicket caches all resources for each page in deployment mode. I want to know if there is a way to clear cache without using ResourceSettings.setDefaultCacheDuration. Thanks, Tom On Thu, Jan 17, 2013 at 10:42 AM, Martin Grigorov mgrigo...@apache.orgwrote: Can you be more specific which caches you want to clear ? It sounds like you need to clear the cache in the browser. The browser wont make a request to the server if there is a cache for this url. So you need to clear the browser cache, no Wicket involved. On Thu, Jan 17, 2013 at 4:47 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: Is there a way to clear the HTML cache on demand instead of using expiration timeouts in Wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket HTML Cache
That's why I asked for more details. Wicket caches the .html templates so they are read just once from the file system. While ResourceSettings.setDefaultCacheDuration is about the Cache related response headers. You need org.apache.wicket.settings.IMarkupSettings#getMarkupFactory().getMarkupCache().clear(); On Thu, Jan 17, 2013 at 5:58 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: Last time I checked, wicket caches all resources for each page in deployment mode. I want to know if there is a way to clear cache without using ResourceSettings.setDefaultCacheDuration. Thanks, Tom On Thu, Jan 17, 2013 at 10:42 AM, Martin Grigorov mgrigo...@apache.org wrote: Can you be more specific which caches you want to clear ? It sounds like you need to clear the cache in the browser. The browser wont make a request to the server if there is a cache for this url. So you need to clear the browser cache, no Wicket involved. On Thu, Jan 17, 2013 at 4:47 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: Is there a way to clear the HTML cache on demand instead of using expiration timeouts in Wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket HTML Cache
...or MarkupFactory.get().getMarkupCache().clear(); You need org.apache.wicket.settings.IMarkupSettings#getMarkupFactory().getMarkupCache().clear(); On Thu, Jan 17, 2013 at 5:58 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
It seems currency formatting is broken in Java: http://matthiaswessendorf.wordpress.com/2007/12/03/javas-numberformat-bug/ http://bugs.sun.com/view_bug.do?bug_id=4510618 Regards Sven On 01/17/2013 03:42 PM, Sven Meier wrote: The problem is the space before the currency sign. It should not be converted to non-break-space. Please open a new issue. Sven On 01/17/2013 11:59 AM, Sebastien wrote: Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverterDouble { private static final long serialVersionUID = 1L; public CurrencyConverter(IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
Hi Sven, I did not got time to create the JIRA... About the link you mention, I think it is a little bit old because, as far I remember from my test, the following code is (now) working String value = 12 345,68 €; NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.FRANCE); ParsePosition pp = new ParsePosition(0); Number n = (Number) nf.parse(value, pp); System.out.println(n); Please note that there is still a bug in java where Locale.FRANCE is not the same as new Locale(fr, FR) for instance but that's another topic. I can confirm that the following workaround code is also working (which is equivalent to the code above) locale = Locale.FRANCE; final NumberFormat format = this.getNumberFormat(locale); return this.parse(format, value, locale); Thanks best regards, Sebastien. On Thu, Jan 17, 2013 at 5:22 PM, Sven Meier s...@meiers.net wrote: It seems currency formatting is broken in Java: http://matthiaswessendorf.**wordpress.com/2007/12/03/** javas-numberformat-bug/http://matthiaswessendorf.wordpress.com/2007/12/03/javas-numberformat-bug/ http://bugs.sun.com/view_bug.**do?bug_id=4510618http://bugs.sun.com/view_bug.do?bug_id=4510618 Regards Sven On 01/17/2013 03:42 PM, Sven Meier wrote: The problem is the space before the currency sign. It should not be converted to non-break-space. Please open a new issue. Sven On 01/17/2013 11:59 AM, Sebastien wrote: Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#**getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(**Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverter** Double { private static final long serialVersionUID = 1L; public CurrencyConverter(**IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.**getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
What does your test print for n? Sven On 01/17/2013 05:36 PM, Sebastien wrote: Hi Sven, I did not got time to create the JIRA... About the link you mention, I think it is a little bit old because, as far I remember from my test, the following code is (now) working String value = 12 345,68 €; NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.FRANCE); ParsePosition pp = new ParsePosition(0); Number n = (Number) nf.parse(value, pp); System.out.println(n); Please note that there is still a bug in java where Locale.FRANCE is not the same as new Locale(fr, FR) for instance but that's another topic. I can confirm that the following workaround code is also working (which is equivalent to the code above) locale = Locale.FRANCE; final NumberFormat format = this.getNumberFormat(locale); return this.parse(format, value, locale); Thanks best regards, Sebastien. On Thu, Jan 17, 2013 at 5:22 PM, Sven Meier s...@meiers.net wrote: It seems currency formatting is broken in Java: http://matthiaswessendorf.**wordpress.com/2007/12/03/** javas-numberformat-bug/http://matthiaswessendorf.wordpress.com/2007/12/03/javas-numberformat-bug/ http://bugs.sun.com/view_bug.**do?bug_id=4510618http://bugs.sun.com/view_bug.do?bug_id=4510618 Regards Sven On 01/17/2013 03:42 PM, Sven Meier wrote: The problem is the space before the currency sign. It should not be converted to non-break-space. Please open a new issue. Sven On 01/17/2013 11:59 AM, Sebastien wrote: Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#**getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(**Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverter** Double { private static final long serialVersionUID = 1L; public CurrencyConverter(**IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.**getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-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: inmethod grid 6.0-SNAPSHOT doesn't work in IE8
Hi, I finally found out where problem is. IE8 doesn't support 'bind' function. I just committed fix from: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind Best regards, Dan On Wed, Sep 5, 2012 at 10:36 PM, Dan Simko wicke...@gmail.com wrote: sorry, attachment is here http://wickeria.com/screenshot.png On Wed, Sep 5, 2012 at 10:27 PM, Dan Simko wicke...@gmail.com wrote: Hi, online example (http://www.wicket-library.com/inmethod-grid) is working great in my IE8, but when I run latest version from https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/inmethod-grid-parentgrid is not initialized correctly in IE8 (see attachment). The problem is probably in script.js on line 1545: window.setInterval(this.update.bind(this), interval); Unfortunately I do not have so strong JS knowledge in order to fix it. In FF and Chrome grid works great. Thanks in advance!
Re: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
null, lol ! :) Sorry, I read your link too quickly, I did not saw it was talking specifically about spaces. So, it works (for the example you gave) with 12345,68 € (without space as thousand separator and with a space before currency symbol) whereas it does not work in AbstractNumberConverter (with space before currency symbol) Up to you to fix this or not, given the fact there will probably still not works due to the thousand separator java bug... Thanks again, Sebastien. On Thu, Jan 17, 2013 at 5:42 PM, Sven Meier s...@meiers.net wrote: What does your test print for n? Sven On 01/17/2013 05:36 PM, Sebastien wrote: Hi Sven, I did not got time to create the JIRA... About the link you mention, I think it is a little bit old because, as far I remember from my test, the following code is (now) working String value = 12 345,68 €; NumberFormat nf = NumberFormat.**getCurrencyInstance(Locale.**FRANCE); ParsePosition pp = new ParsePosition(0); Number n = (Number) nf.parse(value, pp); System.out.println(n); Please note that there is still a bug in java where Locale.FRANCE is not the same as new Locale(fr, FR) for instance but that's another topic. I can confirm that the following workaround code is also working (which is equivalent to the code above) locale = Locale.FRANCE; final NumberFormat format = this.getNumberFormat(locale); return this.parse(format, value, locale); Thanks best regards, Sebastien. On Thu, Jan 17, 2013 at 5:22 PM, Sven Meier s...@meiers.net wrote: It seems currency formatting is broken in Java: http://matthiaswessendorf.**wo**rdpress.com/2007/12/03/**http://wordpress.com/2007/12/03/** javas-numberformat-bug/http:/**/matthiaswessendorf.wordpress.** com/2007/12/03/javas-**numberformat-bug/http://matthiaswessendorf.wordpress.com/2007/12/03/javas-numberformat-bug/ http://bugs.sun.com/view_bug.do?bug_id=4510618http://bugs.sun.com/view_bug.**do?bug_id=4510618 http://**bugs.sun.com/view_bug.do?bug_**id=4510618http://bugs.sun.com/view_bug.do?bug_id=4510618 Regards Sven On 01/17/2013 03:42 PM, Sven Meier wrote: The problem is the space before the currency sign. It should not be converted to non-break-space. Please open a new issue. Sven On 01/17/2013 11:59 AM, Sebastien wrote: Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(** **Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverter** Double { private static final long serialVersionUID = 1L; public CurrencyConverter(IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien. --** --**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.orghttp://apache.org users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Referring to static files in .jar root directly from HTML, with context added automatically?
Hi all, I'm wondering if I can refer to static files just from HTML, while keeping it aware of the context. Example: .jar contains /favicon.ico . I'd like to refer to it by link rel=... href=/favicon.ico. But when the app is at non-root context, this breaks as it still points to http://host/favicon.ico . So it needs some Java code. a) Either wicket:link, which AFAIK can only make it bound to a component. b) Or custom ExternalLink with setContextRelative( true ) which would create the URL. c) Or a shared resource mounted to /favicon.ico. But the task seems to be so trivial that I wonder - Did I overlook some accordingly trivial solution, not involving Java? And not relying on text replacement, e.g. by Maven, having link rel=... href=${context}/favicon.ico in HTML. (That would be acceptable if it was done by Wicket.) Thanks, Ondra - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AbstractNumberConverter issue when used with NumberFormat#getCurrencyInstance
Hi Sven, The JIRA has been created: https://issues.apache.org/jira/browse/WICKET-4988 Thanks best regards, Sebastien. On Thu, Jan 17, 2013 at 5:52 PM, Sebastien seb...@gmail.com wrote: null, lol ! :) Sorry, I read your link too quickly, I did not saw it was talking specifically about spaces. So, it works (for the example you gave) with 12345,68 € (without space as thousand separator and with a space before currency symbol) whereas it does not work in AbstractNumberConverter (with space before currency symbol) Up to you to fix this or not, given the fact there will probably still not works due to the thousand separator java bug... Thanks again, Sebastien. On Thu, Jan 17, 2013 at 5:42 PM, Sven Meier s...@meiers.net wrote: What does your test print for n? Sven On 01/17/2013 05:36 PM, Sebastien wrote: Hi Sven, I did not got time to create the JIRA... About the link you mention, I think it is a little bit old because, as far I remember from my test, the following code is (now) working String value = 12 345,68 €; NumberFormat nf = NumberFormat.**getCurrencyInstance(Locale.**FRANCE); ParsePosition pp = new ParsePosition(0); Number n = (Number) nf.parse(value, pp); System.out.println(n); Please note that there is still a bug in java where Locale.FRANCE is not the same as new Locale(fr, FR) for instance but that's another topic. I can confirm that the following workaround code is also working (which is equivalent to the code above) locale = Locale.FRANCE; final NumberFormat format = this.getNumberFormat(locale); return this.parse(format, value, locale); Thanks best regards, Sebastien. On Thu, Jan 17, 2013 at 5:22 PM, Sven Meier s...@meiers.net wrote: It seems currency formatting is broken in Java: http://matthiaswessendorf.**wo**rdpress.com/2007/12/03/**http://wordpress.com/2007/12/03/** javas-numberformat-bug/http:/**/matthiaswessendorf.wordpress.** com/2007/12/03/javas-**numberformat-bug/http://matthiaswessendorf.wordpress.com/2007/12/03/javas-numberformat-bug/ http://bugs.sun.com/view_bug.do?bug_id=4510618http://bugs.sun.com/view_bug.**do?bug_id=4510618 http://**bugs.sun.com/view_bug.do?bug_**id=4510618http://bugs.sun.com/view_bug.do?bug_id=4510618 Regards Sven On 01/17/2013 03:42 PM, Sven Meier wrote: The problem is the space before the currency sign. It should not be converted to non-break-space. Please open a new issue. Sven On 01/17/2013 11:59 AM, Sebastien wrote: Oops, sent to dev@ instead of users@, sorry. On Thu, Jan 17, 2013 at 11:50 AM, Sebastien seb...@gmail.com wrote: Dear all, There is an issue when using AbstractNumberConverter when #getNumberFormat returns NumberFormat#getCurrencyInstance() I think the problem is due to AbstractNumberConverter#parse(** **Object, double, double, Locale): if (value instanceof String) { // Convert spaces to no-break space (U+00A0) to fix problems with // browser conversions. // Space is not valid thousands-separator, but no-br space is. value = ((String)value).replace(' ', '\u00A0'); } Which replace spaces, so a string like 1,5 € is invalid while being parsed. The workaround is not huge, but I want to ensure if it's by design or if I should open a JIRA. public class CurrencyConverter extends AbstractNumberConverter** Double { private static final long serialVersionUID = 1L; public CurrencyConverter(IJQueryCultureWidget widget) { } @Override protected ClassDouble getTargetType() { return Double.class; } @Override public NumberFormat getNumberFormat(Locale locale) { return NumberFormat.getCurrencyInstance(locale); } @Override public Double convertToObject(String value, Locale locale) { locale = Locale.FRANCE; return this.parse(value, Double.MIN_VALUE, Double.MAX_VALUE, locale); //This does work: //final NumberFormat format = this.getNumberFormat(locale); //return this.parse(format, value, locale); } } Thanks best regards, Sebastien. --** --**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.orghttp://apache.org users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HttpsMapper with Apache Virtual Host Appending the Wrong Path
Ok, I'm making *some* progress (if you can call it that). First of all, here's more about my setup. I'm using wicket-auth-roles for authentication and I have this set up in my WebApplication.class based on an example I found in wicket examples: 1) the authorization strategy getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy() { @Override public T extends IRequestableComponent boolean isInstantiationAuthorized(ClassT componentClass) { if (AuthenticatedWebPage.class.isAssignableFrom(componentClass)) { if (ApiAuthenticatedWebSession.get().isSignedIn()) return true; throw new RestartResponseAtInterceptPageException(new LoginPage()); } return true; } @Override public boolean isActionAuthorized(Component component, Action action) { return true; } }); 2) I have every page needing login. 3) I've got the login page mounted as /login and @RequireHttps on it. 4) In the onsubmit of the the login form I'm calling continueToOriginalDestination(); That's my setup, My attempt was to override createRedirectUrl in HttpsMapper so that it looks like this: @Override protected String createRedirectUrl(IRequestHandler handler, Request request, Scheme scheme) { return StringUtils.remove(super.createRedirectUrl(handler, request, scheme), /documentation); } This works as long as I go to http://myserver.com/login and it will correctly redirect to https://myserver.com/login rather than https://myserver.com/documentation/login like it did before. However, if I go to http://myserver.com/ (the home page which redirects to the login page as part of the authorization strategy) it goes to https://myserver.com/documentation/login. Also if I go straight to the login page, login successfully, it will redirect to http://myserver.com/documentation what it thinks is the home page. I looked at the code in RestartResponseAtInterceptPageException and I'm thinking this code could be the culprit: static void continueToOriginalDestination() { InterceptData data = InterceptData.get(); if (data != null) { data.continueOk = true; String url = RequestCycle.get().getUrlRenderer().renderUrl(data.originalUrl); RequestCycle.get().replaceAllRequestHandlers(new RedirectRequestHandler(url)); -- that's probably it } } I also noticed when debugging, that if I go to http://myserver.com, it never gets to the HttpsMapper#createRedirectUrl method probably because of the code above. Of course, everything above works perfect when I'm running it in WebLogic by itself with no Apache Proxy in front of it. I know what I wrote is not the best solution, but I'm really not sure there's any other way based on how the Weblogic Apache plugin works. Thanks in advance for any help. Tim On 1/11/13 5:01 PM, vp143 wrote: Hi Tim, I do not use Weblogic but I do use Jboss. Your problem sounds familar (but not exactly the same). Take a look at my resolution here: http://apache-wicket.1842946.n4.nabble.com/Configure-http-and-https-with-apache-and-jboss-td3633546.html and try and apply it to Weblogic. Regards Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-with-Apache-Virtual-Host-Appending-the-Wrong-Path-tp4655303p4655311.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 6: Using AutoCompleteBehavior with other behaviors
Hi, Now migrating a working project from wicket version 1.4 to 6.4. I have a text field that uses the following behaviors: A. AjaxFormComponentUpdatingBehavior(onchange); B. AutoCompleteBehavior; and C. AjaxFormComponentUpdatingBehavior(onkeypress). Say I enter an letter 'U' into the text field, and an auto-suggest list pops up. There are 2 problems which is not seen in wicket 1.4: 1) When I select an item (e.g. USD) from the auto-suggest list using a mouse, the onchange event from behavior A is fired twice. The 1st onchange event is for 'U' and the 2nd onchange event is for 'USD'. Can I prevent the 1st onchange event from happening? 2) When I select an item (e.g. USD) from the auto-suggest list using the Enter keypress, an onkeypress event is fired by behavior C. Can I prevent this onkeypress event from happening? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495.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: Using AutoCompleteBehavior with other behaviors
Your first problem is a regression, see WICKET-1280. Please open a jira issue. Sven On 01/18/2013 04:45 AM, james yong wrote: Hi, Now migrating a working project from wicket version 1.4 to 6.4. I have a text field that uses the following behaviors: A. AjaxFormComponentUpdatingBehavior(onchange); B. AutoCompleteBehavior; and C. AjaxFormComponentUpdatingBehavior(onkeypress). Say I enter an letter 'U' into the text field, and an auto-suggest list pops up. There are 2 problems which is not seen in wicket 1.4: 1) When I select an item (e.g. USD) from the auto-suggest list using a mouse, the onchange event from behavior A is fired twice. The 1st onchange event is for 'U' and the 2nd onchange event is for 'USD'. Can I prevent the 1st onchange event from happening? 2) When I select an item (e.g. USD) from the auto-suggest list using the Enter keypress, an onkeypress event is fired by behavior C. Can I prevent this onkeypress event from happening? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org