Question regarding exceptions in Apache Wicket

2013-05-01 Thread Behrooz Nobakht
Hello, I've been working on an error page in Apache Wicket and came across a general pattern in Apache Wicket and I'd like to understand the reason for it. Exceptions in Apache Wicket do not have a single class hierarchy; i.e. there are exceptions that eventually extend WicketRuntimeException

Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Igor Vaynberg
what is the purpose of knowing whether an exception is a wicket exception or something from further down the stack? eg how would you handle a runtime exception that came from within java.lang.String differently then the one that came from Wicket or the one that came from the servlet api? -igor

Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Behrooz Nobakht
More clearly, the intention is to be able to distinguish exceptions from Apache Wicket and other frameworks and not really handle them. For instance, there can be two exceptions: MarkupException and CouldNotLockPageException. Both are in the context of Apache Wicket, however, we actually need to

Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Igor Vaynberg
On Wed, May 1, 2013 at 1:23 AM, Behrooz Nobakht nob...@gmail.com wrote: More clearly, the intention is to be able to distinguish exceptions from Apache Wicket and other frameworks and not really handle them. for what purpose? an unhandled exception is an unhandled exception... For instance,

Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Behrooz Nobakht
Thanks for the reply. The purpose is that when it's determined that exception comes from Wicket, the error page (1) can reduce the cause chain (which can be independent of Apache Wicket of course), and (2) based on this information provide the user to report a bug or email the stack trace to a

Localized urls

2013-05-01 Thread Bertrand Guay-Paquet
Hello, I'd like to localize the urls generated by my app like so: /en/account/settings - AccountSettingsPage, locale EN /fr/compte/parametres - AccountSettingsPage, locale FR I already have urls prefixed with the locale base on the LocaleFirstMapper from Wicket examples, but they are

Get data from External application.

2013-05-01 Thread chrome1235
Hi, I want to integrate zxing application (barcode reader) to my web application for android phones. When user click an ajax button in a page, the code will call zxing with a custom url (like: zxing://scan/?ret=http://mydomain.com/MyApp/{CODE};), then zxing can post or (get) to a generated url

Re: Get data from External application.

2013-05-01 Thread Bertrand Guay-Paquet
Hi, Sure you can! In BarcodePage, use the PageParameters to extract the code. If the code is there, show its associated content. StringValue codeValue = getPageParameters().get(code); if (!codeValue.isEmpty()) ... In your app init code, mount your page like this:

Re: Get data from External application.

2013-05-01 Thread Bertrand Guay-Paquet
On 01/05/2013 12:13 PM, Bertrand Guay-Paquet wrote: In your app init code, mount your page like this: mountPage(/activate/#{code}, BarcodePage.class); Assuming you want to mount this under the activate path. I just noticed your example uses the root app mount. I think you might run into some

Re: Get data from External application.

2013-05-01 Thread chrome1235
Bertrand thanks for your quick reply. I will call it from a page (incluedes form and fields). then returned value fill a form text element. lastly user submit all values. If I can not succeed by this method, I will do with your suggestion. -- View this message in context:

How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread smallufo
I am upgrading from 1.4 to 6.7 Is the random string appended used for anti-caching or object versioning ? I try to redeploy and the appended string is identical !? Now I am stuck by how to get rid of image/resource versioning , and enable caching ... I use general Image , or override

Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Igor Vaynberg
how is this different than handling an exception that comes from say javax.mail? -igor On Wed, May 1, 2013 at 2:48 AM, Behrooz Nobakht nob...@gmail.com wrote: Thanks for the reply. The purpose is that when it's determined that exception comes from Wicket, the error page (1) can reduce the

Re: How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread Martin Grigorov
Hi, Check https://cwiki.apache.org/WICKET/caching-in-wicket-15.html On Wed, May 1, 2013 at 6:36 PM, smallufo small...@gmail.com wrote: I am upgrading from 1.4 to 6.7 Is the random string appended used for anti-caching or object versioning ? I try to redeploy and the appended string is

Re: How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread smallufo
Hi thanks. But it doesn't mention how to turn off the -ver-blah-blah-blah string. I just want a general xxx.png , not xxx-ver-7E49549BCE322EACE0C8F26B4CD553C5.png 2013/5/2 Martin Grigorov mgrigo...@apache.org Hi, Check https://cwiki.apache.org/WICKET/caching-in-wicket-15.html On Wed,

Re: How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread Bertrand Guay-Paquet
The link at the bottom of the given wiki page has: To disable caching altogether (e.g. for performance comparisons) use getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE) On 01/05/2013 1:05 PM, smallufo wrote: Hi thanks. But it doesn't mention how to turn off the

even issue switching from development to deployment mode

2013-05-01 Thread saty
I am using JQuery multi select by Eric Hynds in my current wicket application in few places. http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ This works great in a Wicket application (using ListMultipleChoice) in wicket development mode, but when i change wicket mode to

Wicket-Bootstrap error when deploying to JBoss AS 7

2013-05-01 Thread David Beer
Hi All I have a web project which uses Wicket-Bootstrap for styling and various other functions. Everything appears to run fine in Tomcat, but I am starting to add more Java EE stuff and looking at using JBoss As 7. I can deploy a normal wicket Quickstart with out errors but when I try and

Re: file listing in the browser

2013-05-01 Thread Paul Bors
No one replie to you because this has nothing to do with Wicket. You might want to get familiar with Java's File IO: http://docs.oracle.com/javase/tutorial/essential/io/walk.html Once you get to iterate over your folder you may choose to show that in Wicket via a repeater or a data table etc.

Re: Disabling Individual Checkboxes in CheckGroup

2013-05-01 Thread Paul Bors
See the examples for form input and the use of CheckGroup: http://www.wicket-library.com/wicket-examples/forminput If you want to uncheck or check one of your component, either insert or remove from your collection the element you want checked or not. ~ Thank you, Paul Bors PS: If by now you

Re: Saving checked choices from CheckGroup

2013-05-01 Thread Paul Bors
Create a QuickStart and share it with us. ~ Thank you, Paul Bors On Tue, Apr 30, 2013 at 7:17 AM, Merlijn lucas...@gmail.com wrote: Nope, added in the code. This is my code public QuickSearchFilterPanel(String id) { super(id); Form form = new Form(filterform);

What's a simple substitute for CancelEventIfNoAjaxDecorator in Wicket 6.x

2013-05-01 Thread Paul Bors
I'm migrating from 5.x to 6.x and I have a few classes that make use of the older IAjaxCallDecorator and I was wondering what's a simple substitution for code like this: add(new AjaxEventBehavior(onclick) { protected void onEvent(AjaxRequestTarget target) { ISortState state =

Re: What's a simple substitute for CancelEventIfNoAjaxDecorator in Wicket 6.x

2013-05-01 Thread Martin Grigorov
Hi, Just drop it. No need of it anymore. On Wed, May 1, 2013 at 11:23 PM, Paul Bors p...@bors.ws wrote: I'm migrating from 5.x to 6.x and I have a few classes that make use of the older IAjaxCallDecorator and I was wondering what's a simple substitution for code like this: add(new

RE: What's a simple substitute for CancelEventIfNoAjaxDecorator in Wicket 6.x

2013-05-01 Thread Paul Bors
I think I can drop my own class too since I found: org.apache.wicket.extensions.ajax.markup.html.repeater.data.sort.AjaxFallbackOrderByBorderS I'll extend from that one and change the behavior I need :) ~ Thank you! Paul Bors -Original Message- From: Martin Grigorov

Re: Wicket-Bootstrap error when deploying to JBoss AS 7

2013-05-01 Thread Martin Grigorov
https://code.google.com/p/reflections/wiki/JBossIntegration On Wed, May 1, 2013 at 9:24 PM, David Beer david.m.b...@gmail.com wrote: Hi All I have a web project which uses Wicket-Bootstrap for styling and various other functions. Everything appears to run fine in Tomcat, but I am starting

Resource Path

2013-05-01 Thread Hemen
I have an image that I access by using the following code: String fullUrl = (String) / + RequestCycle.get().mapUrlFor(new PackageResourceReference(Anchor.class, LOGO_NAME), pp).toString(); Logo path on my dev == http://host-name/wicket/resource/package.Name.ClassName/logo.png Resource Path on

Re: event firing issue switching from development to deployment mode

2013-05-01 Thread saty
Any thoughts on this please, what is different in wicket between deployment and development mode that could have caused this problem. -- View this message in context:

Re: even issue switching from development to deployment mode

2013-05-01 Thread Bertrand Guay-Paquet
Hi, I believe Wicket uses a minified version of jQuery in deployment. Maybe this causes problems with that library? Otherwise, check all callers to Application#usesDevelopmentConfig() and replace them one by one to the deployment value until you get the same error. On 01/05/2013 1:59 PM,

Re: [wicket 6] Any shortcut to get full url ?

2013-05-01 Thread Bertrand Guay-Paquet
Hi, On 01/05/2013 10:57 PM, smallufo wrote: String url2 = RequestUtils.toAbsolutePath(urlFor(Page.class , newPps).toString() , ); System.out.println(url2 = + url2); // full in 1.4 , but relative in 6.0 The Javadoc says Calculates absolute path to url relative to another absolute url. so

Re: [wicket 6] Any shortcut to get full url ?

2013-05-01 Thread Don Ferguson
I'm using something like the following (in 6.7.0): String url2 = RequestCycle.get().getUrlRenderer() .renderFullUrl( Url.parse(urlFor(Page.class, newPps).toString())); On Wednesday, May 1, 2013 at 9:26 PM, Bertrand Guay-Paquet wrote: Hi, On 01/05/2013 10:57 PM, smallufo wrote: String

Page's Mounted URL

2013-05-01 Thread Colin Rogers
Wicketeers, Where I have; mountPage( path/to/myPage, MyPersonalPage.class ); mountPage( different/path/customPage, AnotherCustomPage.class ); I now have a Page class (i.e. MyPersonalPage) - how can I determine the mountPage String (i.e path/to/myPage) ? I'm sure this should be simple, but I

Re: Page's Mounted URL

2013-05-01 Thread Bertrand Guay-Paquet
Have a look at RequestUtils#toAbsolutePath(). Also, look at the email on this mailing list preceding yours titled [wicket 6] Any shortcut to get full url ? :) On 02/05/2013 1:06 AM, Colin Rogers wrote: Wicketeers, Where I have; mountPage( path/to/myPage, MyPersonalPage.class ); mountPage(

RE: Page's Mounted URL

2013-05-01 Thread Colin Rogers
I did! But as I said - urlFor() only deals in relative paths. So if I'm on page X and ask for the path of X I always get ./ which isn't useful for determining anything! :) (and using getUrl() of the request gives me the ajax URL for the link I just requested -

RE: Page's Mounted URL

2013-05-01 Thread Colin Rogers
Ignore my last email - I was being dumb! [wicket 6] Any shortcut to get full url ? does have my answer...! Doh! Sorry! :) -Original Message- From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] Sent: 02 May 2013 15:17 To: users@wicket.apache.org Subject: Re: Page's Mounted URL