Re: Error with getPageCount() when extending the Datatable in Wicket 6.13
The api changed. Just replace the method signature you use in you backend layer. François Meillet Formation Wicket - Développement Wicket Le 23 janv. 2014 à 08:13, chathuraka.waas a écrit : > Hi, > > i'm trying to migrate my application from Wicket 1.4 to 6.13.0 and stuck on > a compilation error related to DataTables. > > what my code does is extend the Datatable class. But when i do so it gives > me a compilation error saying, > > "getPageCount() in DataTable cannot implement getPageCount() in Ipageable > return type long is not compatible with int" > > I looked at both the Datatable class and the Ipagable interface but both > methods use the long return type. > > glad if anyone can shed some light on this issue. Thanks in advance. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Error-with-getPageCount-when-extending-the-Datatable-in-Wicket-6-13-tp4663896.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 >
Error with getPageCount() when extending the Datatable in Wicket 6.13
Hi, i'm trying to migrate my application from Wicket 1.4 to 6.13.0 and stuck on a compilation error related to DataTables. what my code does is extend the Datatable class. But when i do so it gives me a compilation error saying, "getPageCount() in DataTable cannot implement getPageCount() in Ipageable return type long is not compatible with int" I looked at both the Datatable class and the Ipagable interface but both methods use the long return type. glad if anyone can shed some light on this issue. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-with-getPageCount-when-extending-the-Datatable-in-Wicket-6-13-tp4663896.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: Understanding setPageExpiredErrorPage and onUnauthorizedInstantiation
I think I have it working like I want now. The IExceptionMapper that I had registered was causing an issue. I'm not sure why but when I used the RequestCycleListener.onException method it seems to send me PageExpiredExceptions when the session expires. This way I can redirect to the login page with a message to the user. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Understanding-setPageExpiredErrorPage-and-onUnauthorizedInstantiation-tp4663870p4663895.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: Understanding setPageExpiredErrorPage and onUnauthorizedInstantiation
Martin, I noticed in one of your posts you point out the difference between session expiration and page expiration. I have been thinking they are the same thing when they are obviously not. I'm looking to redirect when the session expires. Although thinking through this I'm not sure there is a way since it will expire on the server and there most likely won't be a request in progress when this happens. I guess I can use a client side timer that checks back with the server on an interval and redirects when it expires. Is there a wicket recommended way to do this or is this something that everyone re-invents the wheel for? Thanks, Josh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Understanding-setPageExpiredErrorPage-and-onUnauthorizedInstantiation-tp4663870p4663894.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: Understanding setPageExpiredErrorPage and onUnauthorizedInstantiation
Martin, Yes our Application.init method is where we register a IAuthorizationStrategy and a IUnauthorizedComponentInstantiationListener. Do those override the setPageExpiredErrorPage() somehow? I'm trying to understand the interplay so that I can give our users a meaningful message when they click something after the session expires. We have a custom IExceptionMapper as well but that never gets called when I am reproducing this. What does get called is the onUnauthorizedInstantiation method and it redirects to a login page since the user is not logged in. In that method there is no way for me to know if it was an unauthorized instantiation because of a session timeout or because of some other reason. If you need a quickstart I can create one. I just figured this is such a common thing that someone might be able to point me in the right direction. Thanks, Josh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Understanding-setPageExpiredErrorPage-and-onUnauthorizedInstantiation-tp4663870p4663891.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: Are resource reference instances necessary to access a resource?
Hi, See https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java?source=c#L135 The last parameter is 'true'. It says 'create ResRef if not existing in the ResourceReferenceRegistry'. So yes, you can load any .js file by specifying its full path. Wicket will use the parsed locale, style and variation to look up just one path in the file system. Martin Grigorov Wicket Training and Consulting On Wed, Jan 22, 2014 at 6:16 PM, tertioptus wrote: > I have a few JS files in a package, and I found that I can still reach them > provided I use a specific URL. Such that I don't even need to create a > Resource Reference for the file. > > For instance: > > /wicket/resource/com.somename.SomeClassInPackage/some_resource_under_same_package.js > > *Is it safe to assume that the Wicket application can reach all resources > this way, all the time, without a resource reference being instantiated? > * > And are there any drawbacks? Like the mapper has to look several places > for > the file when it is not registered in advance. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Are-resource-reference-instances-necessary-to-access-a-resource-tp4663887.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 > >
Are resource reference instances necessary to access a resource?
I have a few JS files in a package, and I found that I can still reach them provided I use a specific URL. Such that I don't even need to create a Resource Reference for the file. For instance: /wicket/resource/com.somename.SomeClassInPackage/some_resource_under_same_package.js *Is it safe to assume that the Wicket application can reach all resources this way, all the time, without a resource reference being instantiated? * And are there any drawbacks? Like the mapper has to look several places for the file when it is not registered in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Are-resource-reference-instances-necessary-to-access-a-resource-tp4663887.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: tinymce textarea in a modal window not letting to type
here is my code trying with tinymce and modalwindow wicket and tinymce 6.12.0 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/tinymce-textarea-in-a-modal-window-not-letting-to-type-tp1886534p4663886.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: Handling exceptions thrown by a model
Just my few cents to this. I'm using something very similar to what Sebastien wrote but because I have several different ModelObject Types where I need this, I wrote it a bit more generic: /** * @param Type of Object * * @author mrichter */ public abstract class ExceptionHandledModel extends LoadableDetachableModel> { private static final Logger LOG = LoggerFactory.getLogger(ExceptionHandledModel.class); @Override protected List load() { try { return this.onLoad(); } catch (Exception e) { LOG.error("Failed to load List of Type " + T, e); this.onError(e.getMessage()); } return Collections.emptyList(); } protected abstract List onLoad() throws Exception; protected abstract void onError(String message); } Best, Marvin -Original Message- From: Sebastien [mailto:seb...@gmail.com] Sent: Wednesday, January 22, 2014 2:43 PM To: users@wicket.apache.org Subject: Re: Handling exceptions thrown by a model Hi Olivier, I simple way to achieve this is to have a (abstract) #onError method: public abstract class MyModel extends LoadableDetachableModel> { private static final long serialVersionUID = 1L; private static final Logger LOG = LoggerFactory.getLogger(DashboardModel.class); public MyModel() { } @Override protected List load() { List list = new ArrayList(); try { //TODO fill list; } catch (TheException e) { this.error(e.getMessage(), e); } return list; } private void error(String message, Exception e) { LOG.error(message, e); this.onError(message); } protected abstract void onError(String message); } In MyPage private MyModel newMyModel() { return new MyModel() { private static final long serialVersionUID = 1L; @Override protected void onError(String message) { MyPage.this.error(message); } }; } Hope this helps, Sebastien. On Wed, Jan 22, 2014 at 2:07 PM, Oliver B. Fischer wrote: > I have implementation of LoadableDetachableModel which might throw an > exception in load(). Unfortunately this exception might be thrown > while rendering the page. > > Currently I handle the exception with an AbstractRequestCycleListener > added to the application itself. > > But don't like it because I don't want to add an > AbstractRequestCycleListener for each possible exception. > > It is possible to handle specific exceptions page local? I tried to > add a custom Behaviour implementation to my page but the onException() > method was never called. > > Any idea how to handle such exceptions locally? > > Oliver > > - > 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: tinymce textarea in a modal window not letting to type
Sorry for replying to this very old thread , I am having a similar issue, before modalwindow.show I am constructing new instance of my panel call setContent , so every time modalwindow.show is called it displays a new instance of my panel, can you please give me the script which should be appended to target for tinymce to work this script is not complete. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/tinymce-textarea-in-a-modal-window-not-letting-to-type-tp1886534p4663884.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: Handling exceptions thrown by a model
Hi Olivier, I simple way to achieve this is to have a (abstract) #onError method: public abstract class MyModel extends LoadableDetachableModel> { private static final long serialVersionUID = 1L; private static final Logger LOG = LoggerFactory.getLogger(DashboardModel.class); public MyModel() { } @Override protected List load() { List list = new ArrayList(); try { //TODO fill list; } catch (TheException e) { this.error(e.getMessage(), e); } return list; } private void error(String message, Exception e) { LOG.error(message, e); this.onError(message); } protected abstract void onError(String message); } In MyPage private MyModel newMyModel() { return new MyModel() { private static final long serialVersionUID = 1L; @Override protected void onError(String message) { MyPage.this.error(message); } }; } Hope this helps, Sebastien. On Wed, Jan 22, 2014 at 2:07 PM, Oliver B. Fischer wrote: > I have implementation of LoadableDetachableModel which might throw an > exception in load(). Unfortunately this exception might be thrown while > rendering the page. > > Currently I handle the exception with an AbstractRequestCycleListener > added to the application itself. > > But don't like it because I don't want to add an > AbstractRequestCycleListener for each possible exception. > > It is possible to handle specific exceptions page local? I tried to add a > custom Behaviour implementation to my page but the onException() method was > never called. > > Any idea how to handle such exceptions locally? > > Oliver > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Handling exceptions thrown by a model
I have implementation of LoadableDetachableModel which might throw an exception in load(). Unfortunately this exception might be thrown while rendering the page. Currently I handle the exception with an AbstractRequestCycleListener added to the application itself. But don't like it because I don't want to add an AbstractRequestCycleListener for each possible exception. It is possible to handle specific exceptions page local? I tried to add a custom Behaviour implementation to my page but the onException() method was never called. Any idea how to handle such exceptions locally? Oliver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[ANNOUNCE] WicketStuff 6.13.0 is released
Hi, WicketStuff core 6.13.0 based on Apache Wicket 6.13.0 is released and will be available in Maven Central soon. The changelog for this release is: Martin Tzvetanov Grigorov (34): [scala] Update the Maven archetype to Scala 2.10 [scala] minor improvements in WicketDSL. Fix the SBT build [datastores] Add implementations of IDataStore based on Memcached and Apache Cassandra [datastores] Reimport the datastores [scala] Add src/main/resources as resource explicitly [datastores] Extract the session resources management to a specialized class [datastores] Implement session resources management for Memcached data store [datastores] Introduce SessionResourcesManagingDataStore that wraps a real IDataStore and manages the session quota for it [datastores] Fix Memcached datastore to keep track of the added keys to be able to remove them when the session expire (regression from the previous commit) [datastores] Add Guava based implementation of MemcachedDataStore. [datastores][common] - Use only the page id for equals/hashcode [datastores][common] SessionData#size should be volatile [datastores][common] - Actually log the pageId and sessionId [datastores][memcached] - Add a test that verifies the Set created from Guava'a Cache has the same eviction capabilities [datastores] Rename Maven modules [datastores][memcached] Disable the test because it requires a running Memcached server [datastores][cassandra] Upgrade to latest versions of cassandra-driver-core (1.x and 2.x) [datastores][cassandra] Fix a typo in a comment [datastores][redis] Add IDataStore that uses Redis as backend (uses Jedis) [datastores][common] Fix a bug that the session size was not descresed when a page is removed [datastores] Make the *DataStoreTest more predictrable by removing the random sleep time [datastore][redis] Disable the test because it requires a running Redis [datastore] Restructure the testing kit so that it can be reused by all IDataStoreTests [datastores][common] Remove #equals() and #hashCode() from PageData. They are not needed. [datastores][memcached] Check whether there is a need to log a debug message to avoid creating an array. [datastores][common] SessionData#size doesn't need to be volatile anymore. It is accesses only in synchronized blocks [datastores][common] Fix a bug that the session size was not updated when a page with the same id is added [datastores][common] Fix concurrent access to SessionData. [datastores][hazelcast] Add simple implementation based on Hazelcast [datastores] Simplify Maven config [datastores] Update the READMEs Upgrade maven-javadoc-plugin to 2.9.1 (Fixes CVE) [datastores][common] Install/deploy -tests.jar for the mini testing framework Release 6.13.0 Rob Sonke (7): [gmap3] Changed gmaps 3 project partially to be stateless [gmap3] Revert "Changed gmaps 3 project partially to be stateless" [gmap3] Made a stateless version of the GMap component [gmap3] Made a stateless version of the GMap component [gmap3] Fixed in stateless google maps component [gmap3] Added better explanation in javadoc of GMapStateless [gmap3] Added better explanation in javadoc of GMapStateless Martin Grigorov (5): Merge pull request #278 from lorentzg/master Merge pull request #280 from lorentzg/master Merge pull request #281 from paulbors/jGrowl-success Merge pull request #284 from rdmosali/master Merge pull request #285 from robsonke/master Andrea Del Bene (6): [rest-annotations] Added JavaDoc Merge branch 'master' of https://github.com/wicketstuff/core.git [rest-annotations] Added support for validators' resource bundles [rest-annotations] Code refactored to clean it and avoid API breaks. [rest-annotations] Improved validation support [rest-annotations] Test case fixing... 'Paul Bors' (2): [jquery] Added FeedbackMessage.SUCCESS to JGrowlFeedbackPanel [jquery] Added FeedbackMessage.SUCCESS to JGrowlFeedbackPanel Lorentz Green (2): [scala] Fixed package name to match folder structure [shiro] Fixed shiro exception on logout when using "native" shiro session Chris Colman (1): Added support for variations in ModalContentPanel. String variation is added with appropriate getters and setters. Renamed trackModalVisit(IWicketModalVisit) to preShow(Modal rdmosali (1): Update pom.xml (upgrade Jasper Reports to 5.5.0) The WicketStuff team
Re: 10th aniversary of wicket
Hi Guys This is a great idea, I would like to suggest the UK as a location specifically Newcastle as there seems to be a lot of companies around here that use Apache Wicket. I have also seen a few job adverts with Apache Wicket mentioned. Just a thought. David On 20/01/14 09:52, Ernesto Reinaldo Barreiro wrote: Hi, Chatting with Martin Funk, a fellow wicketeer, he mentioned this year Apache Wicket will become 10 years old! Are there any celebrations planned? Shall "we" organize something? Just kidding, I mentioned to Martin that we should maybe promote a wicket meeting at some exotic place: e.g. "Wicket, Salsa and Mojitos, in Havana"... Seriously, is someone planning a celebration? Maybe it is a good opportunity to say a big "THANKS" to those who have sacrificed their own free time in order to make our developer's lives a lot better and pleasurable! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: 10th aniversary of wicket
On Wed, Jan 22, 2014 at 12:26 PM, Martin Funk wrote: > Btw. does anyone know which date might count for the birthdate? > > Jonathan wrote something like "in the spring of 2004" in Wicket in Action. > > I googled around a little bit, finding the initial first commit is kinda > hard, but I came up with an issue at codehaus.org: > https://jira.codehaus.org/browse/HAUS-554 > > As I understand the issue, up till 08/Aug/04 4:56 PM wicket might have > been called "chipotle" (me: shudders) > But on 11/Aug/04 12:51 PM Jonathan comes up wit the name "wicket" > > So I'd say it must have happened between 8th and 11th of August 04. > > Maybe one would have to as Jonathan... > There was a discussion about this once and the closest date Jonathan, Johan and Eelco remembered was Sep 10 2004. But your finding seems even more correct. > > > mf > > > Am 20.01.2014 um 10:52 schrieb Ernesto Reinaldo Barreiro < > reier...@gmail.com>: > > > Hi, > > > > Chatting with Martin Funk, a fellow wicketeer, he mentioned this year > > Apache Wicket will become 10 years old! > > > > Are there any celebrations planned? Shall "we" organize something? Just > > kidding, I mentioned to Martin that we should maybe promote a wicket > > meeting at some exotic place: e.g. "Wicket, Salsa and Mojitos, in > > Havana"... Seriously, is someone planning a celebration? Maybe it is a > good > > opportunity to say a big "THANKS" to those who have sacrificed their own > > free time in order to make our developer's lives a lot better and > > pleasurable! > > > > -- > > Regards - Ernesto Reinaldo Barreiro > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: 10th aniversary of wicket
Btw. does anyone know which date might count for the birthdate? Jonathan wrote something like "in the spring of 2004" in Wicket in Action. I googled around a little bit, finding the initial first commit is kinda hard, but I came up with an issue at codehaus.org: https://jira.codehaus.org/browse/HAUS-554 As I understand the issue, up till 08/Aug/04 4:56 PM wicket might have been called "chipotle" (me: shudders) But on 11/Aug/04 12:51 PM Jonathan comes up wit the name "wicket" So I'd say it must have happened between 8th and 11th of August 04. Maybe one would have to as Jonathan... mf Am 20.01.2014 um 10:52 schrieb Ernesto Reinaldo Barreiro : > Hi, > > Chatting with Martin Funk, a fellow wicketeer, he mentioned this year > Apache Wicket will become 10 years old! > > Are there any celebrations planned? Shall "we" organize something? Just > kidding, I mentioned to Martin that we should maybe promote a wicket > meeting at some exotic place: e.g. "Wicket, Salsa and Mojitos, in > Havana"... Seriously, is someone planning a celebration? Maybe it is a good > opportunity to say a big "THANKS" to those who have sacrificed their own > free time in order to make our developer's lives a lot better and > pleasurable! > > -- > Regards - Ernesto Reinaldo Barreiro - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org