JmxPanel
Guys, someone has soem experience with the nice JmxPanel describe here? http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/ Adding a JmxPanel instance to my page I always get the following EMPTY panel .. Any ideas ? Thanks. // Paolo
Re: Invoulentary session sharing/leakage in Wicket 1.3.x
but if that was indeed what was happening to him wouldnt there be stack traces in the log? -igor On Wed, Apr 16, 2008 at 11:55 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > 1 of our finally blocks calls first a response.close() without > try/catch around that and then unset the threadlocals, i think the > response.close does somehow in some situations throws an exception, i > dont know which one but i build a try catch around it. > > > > On 4/17/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > we dont even know if it is something in wicket that is causing this > > yet...johan what exactly did you find out? > > > > -igor > > > > > > On Wed, Apr 16, 2008 at 4:34 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > > > > > > > > Edvin Syse wrote: > > > > > > > > No, it has not. Johan said he fixed a bug that might have been this > > > > problem, but I haven't been able to confirm it yet, as the fix is in > > > > 1.3-SNAPSHOT, and I ran into some issues when deploying with the > > > > snapshot-version. > > > > > > > > I see this problem 10-20 times every day still.. > > > > > > > > -- Edvin > > > > > > > > > > I hope we see a non snapshot release soon. This sounds like a doozy of > a > > > bug - show stopper for everyone! > > > -- > > > View this message in context: > > > http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16735844.html > > > > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > > > > - > > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invoulentary session sharing/leakage in Wicket 1.3.x
in some i seen parts of it in one or 2 mails But maybe those are not logged somehow or looked over i dont know johan On Thu, Apr 17, 2008 at 9:18 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > but if that was indeed what was happening to him wouldnt there be > stack traces in the log? > > -igor > > > On Wed, Apr 16, 2008 at 11:55 PM, Johan Compagner <[EMAIL PROTECTED]> > wrote: > > 1 of our finally blocks calls first a response.close() without > > try/catch around that and then unset the threadlocals, i think the > > response.close does somehow in some situations throws an exception, i > > dont know which one but i build a try catch around it. > > > > > > > > On 4/17/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > we dont even know if it is something in wicket that is causing this > > > yet...johan what exactly did you find out? > > > > > > -igor > > > > > > > > > On Wed, Apr 16, 2008 at 4:34 PM, Ned Collyer <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > Edvin Syse wrote: > > > > > > > > > > No, it has not. Johan said he fixed a bug that might have been > this > > > > > problem, but I haven't been able to confirm it yet, as the fix > is in > > > > > 1.3-SNAPSHOT, and I ran into some issues when deploying with the > > > > > snapshot-version. > > > > > > > > > > I see this problem 10-20 times every day still.. > > > > > > > > > > -- Edvin > > > > > > > > > > > > > I hope we see a non snapshot release soon. This sounds like a > doozy of a > > > > bug - show stopper for everyone! > > > > -- > > > > View this message in context: > > > > http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16735844.html > > > > > > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > > > > > > > > - > > > > > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Invoulentary session sharing/leakage in Wicket 1.3.x
yes, well. hopefully for 1.5 we consolidate all these into just one threadlocal, and one try/finally in filter should take care of this mess for good. -igor On Thu, Apr 17, 2008 at 12:28 AM, Johan Compagner <[EMAIL PROTECTED]> wrote: > in some i seen parts of it in one or 2 mails > But maybe those are not logged somehow or looked over i dont know > > johan > > > > On Thu, Apr 17, 2008 at 9:18 AM, Igor Vaynberg <[EMAIL PROTECTED]> > > > wrote: > > > but if that was indeed what was happening to him wouldnt there be > > stack traces in the log? > > > > -igor > > > > > > On Wed, Apr 16, 2008 at 11:55 PM, Johan Compagner <[EMAIL PROTECTED]> > > wrote: > > > 1 of our finally blocks calls first a response.close() without > > > try/catch around that and then unset the threadlocals, i think the > > > response.close does somehow in some situations throws an exception, i > > > dont know which one but i build a try catch around it. > > > > > > > > > > > > On 4/17/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > > we dont even know if it is something in wicket that is causing this > > > > yet...johan what exactly did you find out? > > > > > > > > -igor > > > > > > > > > > > > On Wed, Apr 16, 2008 at 4:34 PM, Ned Collyer <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > > > > > Edvin Syse wrote: > > > > > > > > > > > > No, it has not. Johan said he fixed a bug that might have been > > this > > > > > > problem, but I haven't been able to confirm it yet, as the fix > > is in > > > > > > 1.3-SNAPSHOT, and I ran into some issues when deploying with the > > > > > > snapshot-version. > > > > > > > > > > > > I see this problem 10-20 times every day still.. > > > > > > > > > > > > -- Edvin > > > > > > > > > > > > > > > > I hope we see a non snapshot release soon. This sounds like a > > doozy of a > > > > > bug - show stopper for everyone! > > > > > -- > > > > > View this message in context: > > > > > > > http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16735844.html > > > > > > > > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > - > > > > > > > > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester.startPage(page) throws "No requestCycle is currently set"
On Wed, 16 Apr 2008 16:16:36 +0200 "Frank Bille" <[EMAIL PROTECTED]> wrote: > tester.createRequestCycle() (or something). Though I thought it was > called for you in startPage. It's good that we will take a look at it > for WNG. Thanks for your answer! I'm sorry, but I can't figure out how to use that call.. Now my testcase is WicketTester c = new WicketTester(); c.createRequestCycle(); c.startPage(new HomePage()); But I'm still getting "No requestCycle is currently set".. Before that, I have a "there was an error cleaning up target [EMAIL PROTECTED] class = org.apache.wicket.util.tester.DummyHomePage, id = 1, version = 0]->testPage->interface org.apache.wicket.markup.html.link.ILinkListener.ILinkListener (request paramaters: [RequestParameters componentPath=1:testPage pageMapName=null versionNumber=0 interfaceName=ILinkListener componentId=null behaviorId=null urlDepth=-1 parameters={} onlyProcessIfPathActive=false])." Sorry for not mentioning this earlier :/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Notification on session destroyed?
Johan Compagner wrote: be aware that keeping references to http session attributes is not always a good thing especially in clustering or restarts of a server (with a nice shutdown, so sessions are saved to disk, then you loose your map) Great points, I guess there are no good way. Especially in clustered environments... My solution was to clear the session dependent properties on startup of the wicket application, but this would not work in clustered environment. johan On Wed, Apr 16, 2008 at 8:45 PM, Nino Saturnino Martinez Vazquez Wael < [EMAIL PROTECTED]> wrote: heres what I ended up with, in application: private HashMap sessionMap = new HashMap(); @Override protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new DiskPageStore()) { @Override protected void onBind(Request request, Session newSession) { sessionMap.put(newSession.getId(), newSession); super.onBind(request, newSession); } @Override protected void onUnbind(String sessionId) { ZeuzSession session = (ZeuzSession) sessionMap.get(sessionId); session.onBeforeDestroy(); sessionMap.remove(sessionId); super.onUnbind(sessionId); } }; } Nino Saturnino Martinez Vazquez Wael wrote: Thanks for giving the pointer.:) Warren wrote: What is wrong with extending HttpSessionStore and overiding AbstractHttpSessionStore#onBind(Request request, Session newSession) and AbstractHttpSessionStore#onUnbind(java.lang.String sessionId)? These two methods look like they are there to do exactly what you are talking about. Docs on onUnbind says: "Template method that is called when the session is being detached from the store, which typically happens when the httpsession was invalidated." It is also called when the session becomes expired. Add your sessions to a map in onBind and in onUnbind update your pojo and remove the session from the map. onUnbind gives you a sessionId. It looks like it was meant to be used to look up a session and do something with it. -Original Message- From: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 16, 2008 2:20 AM To: users@wicket.apache.org Subject: Re: Notification on session destroyed? But I guess there are no easy way todo this one..:/ Nino Saturnino Martinez Vazquez Wael wrote: I know(hopefully session object should be GC'ed at some time), it really bothers me that it's such an hard thing todo, being aware of session state... So I just wanted an easy way. jweekend wrote: Using Object#finalize() for this type of thing is generally NOT a good idea; it may get called much later than you would "expect", if at all. Regards - Cemal http://jWeekend.co.uk Nino.Martinez wrote: Thanks for the example.. I just think it feels very weird to go around wicket in order to achieve this, because the pojo I have are already attached to the wicket session(so I would have double overhead for this). However it could be the case that it's not simply possible from withing wicket. If not, it would be practical to have a method that you could override on wicket session called onBeforeCreate and onBeforeDestroy or something along those lines. Could I use finalize for this? sander v F wrote: You could also use a HttpSessionListener for knowing when a session is destroyed. The problem is indeed that you can't get the attributes when the session is invalidated, but you can get the sessionId. So you could use a Map to register the session id with the Pojo you would like to update. So when the session get's destroyed you can update the Pojo. See http://www.stardeveloper.com/articles/display.html?article=2001112 001&page=1for an example with the HttpSessionListener. 2008/4/16, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>: So what do you think? Im not sure how common a case this is ? regards Nino Nino Saturnino Martinez Vazquez Wael wrote: Hmm, that feels a bit hacky.. Then I'll need to implement a way of tracking sessions, and I saw something about keeping references to destroyed sessions arent that great. It might be me that's just way of context(not knowing all of the internals), but should something like this be easy todo in wicket? Like maybe have a onDestroy or onExpire(or both?) in session class? However I have no idea on how much overhead this would bring to applications that does not use the feature. regards Nino Johan Compagner wrote: attached to a session of the session that is just invalided/expired? That wont work. You cant get to a http sessions attributes w
Logging every request into db
Hi! I need to log every request (session id, ip address, user id, url, response time etc) into db. The code is simply: RequestCycle requestCycle = RequestCycle.get(); HttpServletRequest servletRequest = ((WebRequest)requestCycle.getRequest()).getHttpServletRequest(); AdminSession adminSession = (AdminSession) requestCycle.getSession(); log.info(adminSession.getId() + " " + servletRequest.getRemoteAddr() + " " + adminSession.getWorkerId() + " " + servletRequest.getRequestURL() + " " + (System.currentTimeMillis() - requestCycle.getStartTime())); But I don't know where to put it. I tried to add it the the WicketFilter: public class MyWicketFilter extends WicketFilter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { super.doFilter(request, response, chain); RequestCycle requestCycle = RequestCycle.get(); // logging goes here } } But RequestCycle.get() returns null. I will appreciate any suggestions. Thanks, Artur -- View this message in context: http://www.nabble.com/Logging-every-request-into-db-tp16740900p16740900.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging every request into db
you could do that in your own WebRequestCycle subclass in the onBeginRequest method. Gerolf On Thu, Apr 17, 2008 at 10:12 AM, Artur W. <[EMAIL PROTECTED]> wrote: > > Hi! > > I need to log every request (session id, ip address, user id, url, > response > time etc) into db. > > The code is simply: > >RequestCycle requestCycle = RequestCycle.get(); >HttpServletRequest servletRequest = > ((WebRequest)requestCycle.getRequest()).getHttpServletRequest(); >AdminSession adminSession = (AdminSession) > requestCycle.getSession(); > >log.info(adminSession.getId() + " " + >servletRequest.getRemoteAddr() + " " + >adminSession.getWorkerId() + " " + >servletRequest.getRequestURL() + " " + >(System.currentTimeMillis() - > requestCycle.getStartTime())); > > But I don't know where to put it. I tried to add it the the WicketFilter: > > public class MyWicketFilter extends WicketFilter { > >@Override >public void doFilter(ServletRequest request, ServletResponse response, > FilterChain chain) throws IOException, ServletException { > >super.doFilter(request, response, chain); > >RequestCycle requestCycle = RequestCycle.get(); >// logging goes here > >} > } > > But RequestCycle.get() returns null. > > > I will appreciate any suggestions. > > > Thanks, > Artur > > > -- > View this message in context: > http://www.nabble.com/Logging-every-request-into-db-tp16740900p16740900.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Alternative method to initialise page
Hi, I am extending the PagingNavigatation and need to access some member variables to create my page links. Because these links are created in PagingNavigatation's constructor me subclasses newPagingNavigationLink() method is called before my subclasses member variables are initialised. I realised that this situation must occur quite often when extending any class that allows subclasses to provide or override any components. Does anyone have a nice workaround? It seems to me that creating the pages component tree in some kind of initialisation step would make classes easier to extend. Or is there already a method that should be used to do this? Thanks, John -- View this message in context: http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742636.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket cannot work on OC4J (ias 10g)?
Which version of oc4j are you using ? I (am forced to run :-) ) run a 1.3.2 on a oc4j 10.1.2.2.0 without any problems. It's rather small, just a viewer and no editing, but it's working with WicketFilter. regards, tom Igor Vaynberg schrieb: from what i remember, filter support is broken in oracle app server. dont quote me on that though, but do search this list... -igor On Wed, Apr 16, 2008 at 10:15 PM, xdirewolfx <[EMAIL PROTECTED]> wrote: Thank you for your prompt reply. It s working well now igor.vaynberg wrote: > > try using wicketservlet instead of wicketfilter > > -igor > > On Wed, Apr 16, 2008 at 8:46 PM, xdirewolfx <[EMAIL PROTECTED]> wrote: >> >> I can deploy the application can kick up and the first page can be shown >> but >> the rest of the stuff do not work as normal: >> - forms lost validations >> - buttons do not work >> etc.. >> >> wicket 1.3.1 >> -- >> View this message in context: >> http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16738242.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16739041.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
nice small component to share Toolbar for DataTable
Hi, I have made a toolbar for a DataTable that let's the user select how many records will be in a page. Usage: addBottomToolbar(new NumRecordsToolbar(this, rowsPerPage)); Enjoy :) -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging every request into db
Gerolf Seitz wrote: > > you could do that in your own WebRequestCycle subclass in the > onBeginRequest method. > Thanks, This was exactly what I was looking for! Artur -- View this message in context: http://www.nabble.com/Logging-every-request-into-db-tp16740900p16743061.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternative method to initialise page
John Patterson wrote: > > Hi, > > I am extending the PagingNavigatation and need to access some member > variables to create my page links. Because these links are created in > PagingNavigatation's constructor me subclasses newPagingNavigationLink() > method is called before my subclasses member variables are initialised. I > realised that this situation must occur quite often when extending any > class that allows subclasses to provide or override any components. > > Does anyone have a nice workaround? > > It seems to me that creating the pages component tree in some kind of > initialisation step would make classes easier to extend. Or is there > already a method that should be used to do this? > > Thanks, > > John > Just to be a bit clearer class MySubclass extends WicketBaseclass { MyDomainObject _parameter; MySubclass(String id, MyDomainObject parameter) { super(id); _parameter = parameter; } @Override protected Component overrideToCreateCustomComponent() { return new MyCustomisedCompopnent(_parameter.getSomething()); } } So _parameter will always be null when overrideToCreateCustomComponent() is called from the base class -- View this message in context: http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternative method to initialise page
PaginNavigation is not setup properly for extending, we are aware of this and probably will fix it in wicket 1.5. in the meantime you could try and copy paste the classes into your own project and then modify them. Maurice On Thu, Apr 17, 2008 at 12:14 PM, John Patterson <[EMAIL PROTECTED]> wrote: > > > > John Patterson wrote: > > > > Hi, > > > > I am extending the PagingNavigatation and need to access some member > > variables to create my page links. Because these links are created in > > PagingNavigatation's constructor me subclasses newPagingNavigationLink() > > method is called before my subclasses member variables are initialised. I > > realised that this situation must occur quite often when extending any > > class that allows subclasses to provide or override any components. > > > > Does anyone have a nice workaround? > > > > It seems to me that creating the pages component tree in some kind of > > initialisation step would make classes easier to extend. Or is there > > already a method that should be used to do this? > > > > Thanks, > > > > John > > > > Just to be a bit clearer > > class MySubclass extends WicketBaseclass > { > MyDomainObject _parameter; > MySubclass(String id, MyDomainObject parameter) > { > super(id); > _parameter = parameter; > } > > @Override > protected Component overrideToCreateCustomComponent() > { > return new MyCustomisedCompopnent(_parameter.getSomething()); > } > } > > So _parameter will always be null when overrideToCreateCustomComponent() is > called from the base class > -- > View this message in context: > http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nice small component to share Toolbar for DataTable
Ehm, Attachments are filtered from the list :) Maurice On Thu, Apr 17, 2008 at 12:23 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > Hi, > I have made a toolbar for a DataTable that let's the user select how many > records will be in a page. > > Usage: > addBottomToolbar(new NumRecordsToolbar(this, rowsPerPage)); > > > Enjoy :) > -- > Eyal Golan > [EMAIL PROTECTED] > > Visit: http://jvdrums.sourceforge.net/ > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
client side handling of ajax request session expiration
we want to handle session expiration exception triggered by an ajax request since the session is expired, the ajax request can't be forwarded to the corresponding ajax behavior, instead, the server throw session expiration exception (we have configured the handling by getApplicationSettings().setPageExpiredErrorPage) the handling is ok for non-ajax request, but not ajax request we want to handle that using client side javascript how can we achieve that? -- View this message in context: http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16743324.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to design tables that support 50-100K rows?
I have done this, and it works quite nicely. Be warned though, the biggest bottle neck in this, is the loading of the data from database. So for best performance, you should read only one page's worth data at a time from your DB (in your case 500). If you load the whole data, and use some thing like a list iterator, you will not get any performance benefit. Unfortunately ANSI SQL has no syntax for pagination of results. So you have 2 choices. 1) Keep an open DB cursor , and retrieve as much data as you want per page rendering. But this ties your cursor to the user session. Not a very good idea. 2) Use the vendor specific way to get paginated results. Almost all major vendors support pagination of query results in their own idiosyncratic way. If you go with approach 2, you can even use the AjaxFallbackDefaultDataTable, which will do all the pagination etc for you, and with AJAX to boost. You only need to provide a SortableDataProvider, which implements the size() and iterate(int lower, int upper) calls. Your size() call should fetch a total count of items. i.e. select count(*) and the iterate(int lower, int upper) should retrieve the query results between lower and upper limit. And with sortable data provider, you even get sorting for free. (I mean the UI, you do have to write the back end implementation your self). For my case, I use iBatis for DB access, so it is really easy to write DB Vendor specific queries and yet retain the pagination abstraction. If I need to work with another DB , I can easily swap the pagination query part. Hope this has helped. PhilipJohnson wrote: > > * Finally, when I am displaying Page 1 containing 500 rows (using > something like > PageableListView), I'd like to only populate my model with rows 1-500 from > my backing > store. Let's say the user then clicks on Page 3: at that point, I'd like > to go retrieve > rows 1001-1500 from my backing store and populate my model for rows > 1001-1500. How would > one go about doing this? Would it be possible to kind of sketch out the > approach for me? > -- View this message in context: http://www.nabble.com/How-to-design-tables-that-support-50-100K-rows--tp16737855p16743554.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Wicket + CMS
Hi, I've also read about plans to use wicket integration in Hippo Cms and I will keep an eye on it. I've also managed to access OpenCms content with wicket but because we have a lot of JSP that we would like to reuse and we contemporary need a solid frontend framework integration we will - as a start - concentrate on a classic rerquest-based one with jsp view for now. Maybe we will recur to wicket again later. Thanks for your and all other people's answers. Regards Felix Noz -Ursprüngliche Nachricht- Von: StephenP [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 16. April 2008 11:57 An: users@wicket.apache.org Betreff: Re: Wicket + CMS Our project has tied in HippoCMS for pulling a portion of content into wicket pages. I don't have many details to hand but it wasn't too hard. Hippo has a xml over http interface that we use to cache content, before putting the xml elements into wicket models. We are using hippo version 6, but I think hippo version 7 (the next version) will be using wicket internally. I don't know if this will allow any stronger integration with a wicket app. Noz, Felix wrote: > > Hello everybody, > > I'm currently evaluating different Frontend Frameworks to use them > with a Java-Based CMS (OpenCms) and I'm very interested in trying > wicket. The CMS has got its own Template mechanism which is based on > JSP. Because it would be a problem for us to throw away all existing > Templates and JSP Tags my idea was to implement a > ResourceStreamLocator that connects to the CMS via http and delivers > the resources directly from the CMS so that the CMS is rather a pure > persistence and template system. > My questions are: > > - Is this a passible way to connect wicket to a jsp based system? > - Are there any better solutions? > - Does anybody else has experience in connecting OpenCms + wicket? > > Regards > > i.A. Felix Noz > > __ > __ > > Felix Noz > Junior IT-Berater > Dipl. Informatiker (FH) > > comundus GmbH > Schüttelgrabenring 3, 71332 Waiblingen > > Telefon +49 (0) 71 51-5 00 28-22 > Internet www.comundus.com > > Geschäftsführer: Klaus Hillemeier > Amtsgericht Stuttgart, HRB 264290 > > comundus ist ein Unternehmen der IT EXCELLENCE Group. > __ > __ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Wicket-%2B-CMS-tp16696564p16720234.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JmxPanel
Download the jmx panel source code and add an empty DIV element before the the JmxPanel.html here's patch, (you need stuff between --START and -- END ) svn diff src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html -- START Index: src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html === --- src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (revision 3817) +++ src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (working copy) @@ -15,6 +15,7 @@ limitations under the License. --> + -- END Or you can ask the author of JMX panel to include this patch in the next release. paolo di tommaso wrote: > > Guys, > > someone has soem experience with the nice JmxPanel describe here? > > http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/ > > Adding a JmxPanel instance to my page I always get the following EMPTY > panel > .. > > > > > > > > > > > > > > > > > Any ideas ? > > Thanks. > > // Paolo > > -- View this message in context: http://www.nabble.com/JmxPanel-tp16740210p16743671.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
testing a link
Hello ev'ry body, First, I apologize for my poor English. I want to know how to perform a link test in JUnit. This is my code : Final List values = ; Link myButton = new Link ( "back") ( Private static final long serialVersionUID = 1L; @ Override Public void onClick () ( SetResponsePage (New Page (...)); ) ); Add (myButton); If (values.isEmpty ()) MyButton.setVisible (false); in the Test class, i add these lines : ... Tester.assertComponent ( "links", Link.class); Tester.assertLabel ( "links: linkLabel", "Access"); ... My test fails and i have a NullPointerException Thanks for yoyr help -- View this message in context: http://www.nabble.com/testing-a-link-tp16743958p16743958.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shared tab component across pages
igor.vaynberg wrote: > > you can replace any panel with any other panel. so maybe instead of > modeling your app as pages you can model it as panels > > -igor > Yeah, but how do I then change a panel referenced in the HomePage class markup from another XXXPage class markup? John -- View this message in context: http://www.nabble.com/Shared-tab-component-across-pages-tp16722526p16743966.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nice small component to share Toolbar for DataTable
Ok. Here is the code: package com.eurekify.web.components.table; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.behavior.HeaderContributor; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractToolbar; import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import com.eurekify.i18n.LocalizationHelper; import com.eurekify.web.components.dropdown.DropDownChoiceWithAjaxIndicator; class NumRecordsToolbar extends AbstractToolbar { private static final long serialVersionUID = -7038331743460229883L; NumRecordsToolbar(DataTable table, int initialRecordsPerPage) { super(table); add(HeaderContributor.forCss("/eurekify/style/EurekifyDataTable.css")); WebMarkupContainer span = new WebMarkupContainer("span"); add(span); span.add(new SimpleAttributeModifier("colspan", String .valueOf(getTable().getColumns().length))); span.add(getUsersPerPageSelect(initialRecordsPerPage)); Label numOfRecordLabel = new Label("pagingLabel", new Model(LocalizationHelper .getMessage("table.recordsPerPage"))); span.add(numOfRecordLabel); getTable().setRowsPerPage(initialRecordsPerPage); } private List getValuesForSelect(int initial) { Set set = new HashSet(); set.add(10); set.add(20); set.add(50); set.add(500); set.add(initial); List values = new ArrayList(set); Collections.sort(values); return values; } private DropDownChoiceWithAjaxIndicator getUsersPerPageSelect(final int initial) { final IModel pagingvalues = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @Override public Object getObject() { List values = getValuesForSelect(initial); return values; } }; final DropDownChoiceWithAjaxIndicator result = new DropDownChoiceWithAjaxIndicator( "pagingSelect", new PropertyModel(getTable(), "rowsPerPage"), pagingvalues, this); result.add(new AjaxFormComponentUpdatingBehavior("onchange") { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.addComponent(getTable()); } }); return result; } @Override public boolean isVisible() { return (getTable().getRowCount() > 10); } } And the HTML: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> On Thu, Apr 17, 2008 at 1:57 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Ehm, Attachments are filtered from the list :) > > Maurice > > On Thu, Apr 17, 2008 at 12:23 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > > Hi, > > I have made a toolbar for a DataTable that let's the user select how > many > > records will be in a page. > > > > Usage: > > addBottomToolbar(new NumRecordsToolbar(this, rowsPerPage)); > > > > > > Enjoy :) > > -- > > Eyal Golan > > [EMAIL PROTECTED] > > > > Visit: http://jvdrums.sourceforge.net/ > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/
Re: How to design tables that support 50-100K rows?
Using jpa you can do it this way: private BaseEntity findById(String table, Long id) { Query query = entityManager.createQuery("select p from " + table + " p where p.id=" + id); return (BaseEntity) query.getSingleResult(); } private List findBaseEntity(int first, int count, String property, boolean ascending, String table) { Query query = entityManager.createQuery("select p from " + table + " p order by p.:property :sort"); query.setParameter("property", property); if (ascending) { query.setParameter("sort", "asc"); } else { query.setParameter("sort", "desc"); } query.setFirstResult(first); query.setMaxResults(count); return (List) query.getResultList(); } and this in hibernate: public Promo findPromo(Long id) { Criteria criteria = getHibernateSession().createCriteria(Promo.class); criteria.add(Restrictions.eq("id", id)); return (Promo) criteria.uniqueResult(); } public List findPromo(int first, int count, String property, boolean ascending, Company company) { Criteria criteria = getHibernateSession().createCriteria(Promo.class) .add(Restrictions.eq("company", company)); criteria.setMaxResults(count); criteria.setFirstResult(first); if (ascending) { criteria.addOrder(Order.asc(property)); } else { criteria.addOrder(Order.desc(property)); } return (List) criteria.list(); } public int promoCount(Company company) { Criteria criteria = getHibernateSession().createCriteria(Promo.class) .add(Restrictions.eq("company", company)); criteria.setProjection(Projections.rowCount()); Object obj = criteria.uniqueResult(); return (Integer) obj; } gumnaam23 wrote: I have done this, and it works quite nicely. Be warned though, the biggest bottle neck in this, is the loading of the data from database. So for best performance, you should read only one page's worth data at a time from your DB (in your case 500). If you load the whole data, and use some thing like a list iterator, you will not get any performance benefit. Unfortunately ANSI SQL has no syntax for pagination of results. So you have 2 choices. 1) Keep an open DB cursor , and retrieve as much data as you want per page rendering. But this ties your cursor to the user session. Not a very good idea. 2) Use the vendor specific way to get paginated results. Almost all major vendors support pagination of query results in their own idiosyncratic way. If you go with approach 2, you can even use the AjaxFallbackDefaultDataTable, which will do all the pagination etc for you, and with AJAX to boost. You only need to provide a SortableDataProvider, which implements the size() and iterate(int lower, int upper) calls. Your size() call should fetch a total count of items. i.e. select count(*) and the iterate(int lower, int upper) should retrieve the query results between lower and upper limit. And with sortable data provider, you even get sorting for free. (I mean the UI, you do have to write the back end implementation your self). For my case, I use iBatis for DB access, so it is really easy to write DB Vendor specific queries and yet retain the pagination abstraction. If I need to work with another DB , I can easily swap the pagination query part. Hope this has helped. PhilipJohnson wrote: * Finally, when I am displaying Page 1 containing 500 rows (using something like PageableListView), I'd like to only populate my model with rows 1-500 from my backing store. Let's say the user then clicks on Page 3: at that point, I'd like to go retrieve rows 1001-1500 from my backing store and populate my model for rows 1001-1500. How would one go about doing this? Would it be possible to kind of sketch out the approach for me? -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket+Userforum integration?
Has anybody done this? OR perhaps written a forum app in wicket?:)) I've been looking a bit around, but only thing which seems okay are jforum... -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to design tables that support 50-100K rows?
In Hibernate, couldn't you just use get(Class entityClass, Serializable id) rather than doing the whole uniqueResult() stuff? On Thu, Apr 17, 2008 at 9:09 AM, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > Using jpa you can do it this way: > >private BaseEntity findById(String table, Long id) { >Query query = entityManager.createQuery("select p from " + table >+ " p where p.id=" + id); >return (BaseEntity) query.getSingleResult(); > >} > >private List findBaseEntity(int first, int count, String property, >boolean ascending, String table) { >Query query = entityManager.createQuery("select p from " + table >+ " p order by p.:property :sort"); >query.setParameter("property", property); >if (ascending) { >query.setParameter("sort", "asc"); >} else { >query.setParameter("sort", "desc"); >} >query.setFirstResult(first); >query.setMaxResults(count); >return (List) query.getResultList(); >} > > and this in hibernate: > >public Promo findPromo(Long id) { >Criteria criteria = > getHibernateSession().createCriteria(Promo.class); >criteria.add(Restrictions.eq("id", id)); >return (Promo) criteria.uniqueResult(); >} > >public List findPromo(int first, int count, String property, >boolean ascending, Company company) { >Criteria criteria = getHibernateSession().createCriteria(Promo.class) >.add(Restrictions.eq("company", company)); >criteria.setMaxResults(count); >criteria.setFirstResult(first); >if (ascending) { > >criteria.addOrder(Order.asc(property)); >} else { >criteria.addOrder(Order.desc(property)); >} >return (List) criteria.list(); >} > >public int promoCount(Company company) { >Criteria criteria = getHibernateSession().createCriteria(Promo.class) >.add(Restrictions.eq("company", company)); >criteria.setProjection(Projections.rowCount()); >Object obj = criteria.uniqueResult(); >return (Integer) obj; >} > > gumnaam23 wrote: > > > I have done this, and it works quite nicely. > > > > Be warned though, the biggest bottle neck in this, is the loading of the > > data from database. > > So for best performance, you should read only one page's worth data at a > > time from your DB > > (in your case 500). > > > > If you load the whole data, and use some thing like a list iterator, you > > will not get any performance > > benefit. > > > > Unfortunately ANSI SQL has no syntax for pagination of results. So you > have > > 2 choices. > > > > 1) Keep an open DB cursor , and retrieve as much data as you want per page > > rendering. But this > > ties your cursor to the user session. Not a very good idea. > > > > 2) Use the vendor specific way to get paginated results. Almost all major > > vendors support pagination > > of query results in their own idiosyncratic way. > > > > If you go with approach 2, you can even use the > > AjaxFallbackDefaultDataTable, which will do all the > > pagination etc for you, and with AJAX to boost. > > You only need to provide a SortableDataProvider, which implements the > size() > > and iterate(int lower, int upper) calls. Your size() call should fetch a > total count of items. i.e. select count(*) and the iterate(int lower, int > upper) should retrieve the query results > > between lower and upper limit. > > And with sortable data provider, you even get sorting for free. (I mean > the > > UI, you do have to write > > the back end implementation your self). > > > > For my case, I use iBatis for DB access, so it is really easy to write DB > > Vendor specific queries and > > yet retain the pagination abstraction. If I need to work with another DB , > I > > can easily swap the > > pagination query part. > > > > Hope this has helped. > > > > > > > > PhilipJohnson wrote: > > > > > > > * Finally, when I am displaying Page 1 containing 500 rows (using > > > something like PageableListView), I'd like to only populate my model > with rows 1-500 from > > > my backing store. Let's say the user then clicks on Page 3: at that > point, I'd like > > > to go retrieve rows 1001-1500 from my backing store and populate my > model for rows > > > 1001-1500. How would one go about doing this? Would it be possible to > kind of sketch out the > > > approach for me? > > > > > > > > > > > > > > > > > -- > -Wicket for love > > Nino Martinez Wael > Java Specialist @ Jayway DK > http://www.jayway.dk > +45 2936 7684 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
Re: Wicket cannot work on OC4J (ias 10g)?
Oracle IAS 10.1.3.1.0. We had a product in spring hibernate JPA and wicket (+ ext-js). We deployed in many web/app server but this was the first time we deploy to oc4j (due to client's requirements hooking up to oc4j sso). WicketFilter doesnot work so we switched to WicketServlet and everything is running fine. Thomas Lutz wrote: > > Which version of oc4j are you using ? > > I (am forced to run :-) ) run a 1.3.2 on a oc4j 10.1.2.2.0 without any > problems. > > It's rather small, just a viewer and no editing, but it's working with > WicketFilter. > > regards, > tom > > > Igor Vaynberg schrieb: >> from what i remember, filter support is broken in oracle app server. >> dont quote me on that though, but do search this list... >> >> -igor >> >> >> On Wed, Apr 16, 2008 at 10:15 PM, xdirewolfx <[EMAIL PROTECTED]> >> wrote: >> >>> Thank you for your prompt reply. It s working well now >>> >>> >>> >>> igor.vaynberg wrote: >>> > >>> > try using wicketservlet instead of wicketfilter >>> > >>> > -igor >>> > >>> > On Wed, Apr 16, 2008 at 8:46 PM, xdirewolfx <[EMAIL PROTECTED]> >>> wrote: >>> >> >>> >> I can deploy the application can kick up and the first page can be >>> shown >>> >> but >>> >> the rest of the stuff do not work as normal: >>> >> - forms lost validations >>> >> - buttons do not work >>> >> etc.. >>> >> >>> >> wicket 1.3.1 >>> >> -- >>> >> View this message in context: >>> >> >>> http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16738242.html >>> >> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >> >>> >> >>> >> >>> - >>> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> >> For additional commands, e-mail: [EMAIL PROTECTED] >>> >> >>> >> >>> > >>> > - >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] >>> > For additional commands, e-mail: [EMAIL PROTECTED] >>> > >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16739041.html >>> >>> >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16744020.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can only locate or create session in the context of a request cycle.
Right after I got onto my bike to ride home I realized the same thing you did: it sounds like there's no need for the request cycle -- just look for the token upon session creation (and maybe again if there's a subsequent request for a not-yet-validated session). But then there's the logout issue... If you do need to worry about the user logging out in the other app too, it might be simplest to just use a cookie to represent the fact that the user's logged in, and check it (in the requestCycle) on each request. Assuming your two apps are in the same domain, it works. There's some complication in trying to make the cookie secure enough to avoid forgery, but it's doable. You mentioned the possibility of just invalidating the wicket session from the other app -- if you can do that, go for it -- it sounds simpler. In my case the other apps aren't java based, so that wasn't an attractive option. Good luck, Alex That is what I meant, but I wasn't sure if the token you were referring to was in a cookie or in the URL. Since it's in the URL, it does complicate stuff. Here's my proposal: use the custom request cycle to grab the initial token and store that auth info in the request cycle. Then when you create a new wicket session, check if the request cycle has a valid auth token -- if so, you validate the session, save the auth token there if necessary, and never worry about the request cycle (or URL token) again. Do i need to retain this in the RequestCycle at the first place ? I mean i can just fetch the token from the request object itself..in my CustomSession constructor as follows : public MyCustomSession(Request request) { super(request); String authToken = request.getParameter("authToken"); if (authenticate(authToken) == "success") { setAuthToken(authToken); } } I am not sure as to when exactly is the Session is created, but given it does before the request processing starts, in that case it is fair enough to have this logic in the Session constructor instead of onBeginRequest(), what do you think ? You don't need to worry about people logging out from outside your app, right? Well we do, havent thought about it much, but the way i see it is to have invoke the InvalidateSessionPage (from this other interface/app), in which 1) i invalid the wicket session 2) Have javascript to delete the cookie (jSessionId) from the browser, though i feel this wouldn't really be necessory if the first step is performed..What do you think ? What do you think? better approach, where the external app isnt tightly coupled with my app (where it needs to invoke the InvalidateSessionPage).. Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket+Userforum integration?
Nino Saturnino Martinez Vazquez Wael schrieb: Has anybody done this? OR perhaps written a forum app in wicket?:)) I've been looking a bit around, but only thing which seems okay are jforum... i have a problem, and jforum is what i´ve found. not sure yet, if it could be reasonably pimped to what i need AND integrated with Wicket reasonably. i might need some extra features or at least hooks for them (notification, moderation, linking with content outside of the forum, exporting metadata for searching) etc. if anyone is willing to start a wicket-project for a forum build with wicket, i might well be able to contribute. cu uwe -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stack Overflow exception
i believe this is fixed in svn. you can either install a snapshot or wait for 1.3.4 -igor On Thu, Apr 17, 2008 at 3:17 AM, Eyal Golan <[EMAIL PROTECTED]> wrote: > Hi, > I recently got a few times a StackOverFlow exception when refreshing. > I have an iframe (don't ask why, this is how they chose it in here). > Inside the iframe there's a table and a button that refreshes the table's > provider. > > Here's what I get: (I have also added this as attachment) > > java.lang.StackOverflowError > at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source) > at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) > at > java.io.ObjectInputStream$BlockDataInputStream.readUnsignedShort(Unknown > Source) > at java.io.ObjectInputStream$BlockDataInputStream.readUTF(Unknown > Source) > at java.io.ObjectInputStream.readUTF(Unknown Source) > at java.io.ObjectStreamClass.readNonProxy(Unknown Source) > at java.io.ObjectInputStream.readClassDescriptor(Unknown Source) > at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) > at java.io.ObjectInputStream.readClassDesc(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > ... > at java.io.ObjectInputStream.readObject(Unknown Source) > at > org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:392) > at > org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:702) > at > org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311) > at org.apache.wicket.Session.getPage(Session.java:745) > at > org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageHolder.readResolve(AbstractPageStore.java:354) > at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.readObject(Unknown Source) > at > org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageSerializer.deserializePage(AbstractPageStore.java:328) > at org.apache.wicket.Page.readObject(Page.java:1268) > at sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) > at java.io.ObjectInputStream.readSerialData(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.defaultReadFields(Unknown Source) > at java.io.ObjectInputStream.readSerialData(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.defaultReadFields(Unknown Source) > at java.io.ObjectInputStream.readSerialData(Unknown Source) > at... > > I am using Wicket 1.3.1 > > Guys, I really don't know how to start debug this thing. > Another problem is that it doesn't happen all the time. > > Thanks > ... > > -- > Eyal Golan > [EMAIL PROTECTED] > > Visit: http://jvdrums.sourceforge.net/ > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternative method to initialise page
fixed in trunk for 1.4, i will fix in 1.3.x later today when i can get to my desktop. https://issues.apache.org/jira/browse/WICKET-1548 -igor On Thu, Apr 17, 2008 at 3:54 AM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > PaginNavigation is not setup properly for extending, we are aware of > this and probably will fix it in wicket 1.5. in the meantime you could > try and copy paste the classes into your own project and then modify > them. > > Maurice > > > > On Thu, Apr 17, 2008 at 12:14 PM, John Patterson <[EMAIL PROTECTED]> wrote: > > > > > > > > John Patterson wrote: > > > > > > Hi, > > > > > > I am extending the PagingNavigatation and need to access some member > > > variables to create my page links. Because these links are created in > > > PagingNavigatation's constructor me subclasses newPagingNavigationLink() > > > method is called before my subclasses member variables are initialised. > I > > > realised that this situation must occur quite often when extending any > > > class that allows subclasses to provide or override any components. > > > > > > Does anyone have a nice workaround? > > > > > > It seems to me that creating the pages component tree in some kind of > > > initialisation step would make classes easier to extend. Or is there > > > already a method that should be used to do this? > > > > > > Thanks, > > > > > > John > > > > > > > Just to be a bit clearer > > > > class MySubclass extends WicketBaseclass > > { > > MyDomainObject _parameter; > > MySubclass(String id, MyDomainObject parameter) > > { > > super(id); > > _parameter = parameter; > > } > > > > @Override > > protected Component overrideToCreateCustomComponent() > > { > > return new MyCustomisedCompopnent(_parameter.getSomething()); > > } > > } > > > > So _parameter will always be null when overrideToCreateCustomComponent() > is > > called from the base class > > -- > > View this message in context: > http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html > > > > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shared tab component across pages
dont get you, maybe you can show a more concrete usecase -igor On Thu, Apr 17, 2008 at 5:43 AM, byhisdeeds <[EMAIL PROTECTED]> wrote: > > > > igor.vaynberg wrote: > > > > you can replace any panel with any other panel. so maybe instead of > > modeling your app as pages you can model it as panels > > > > -igor > > > Yeah, but how do I then change a panel referenced in the HomePage class > markup from another XXXPage class markup? > > John > -- > View this message in context: > http://www.nabble.com/Shared-tab-component-across-pages-tp16722526p16743966.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reloading HTML resources on the fly?
Hello, I'm trying to get tomcat and wicket to pick up changes to html files and reload them. I thought this was the default behavior of wicket. I'm wondering if it's not working because I'm keeping my html files in a separate location than beside my java classes: public class MyApp extends WebApplication { @Override protected void init() { super.init(); addComponentInstantiationListener(new SpringComponentInjector(this)); IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder("html/"); resourceSettings.setResourceStreamLocator(new PathStripperLocator()); resourceSettings.setResourcePollFrequency(Duration.ONE_SECOND); } } Am I misunderstanding wicket and tomcat's ability to pick up changes to resources on the fly? Thanks, Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nice small component to share Toolbar for DataTable
This was taken from an example I don't remember where from. Probably Java thoughts ... but I'm not sure. package com.eurekify.web.components.dropdown; import java.io.Serializable; import java.util.List; import org.apache.wicket.MarkupContainer; import org.apache.wicket.ajax.IAjaxIndicatorAware; import org.apache.wicket.extensions.ajax.markup.html.WicketAjaxIndicatorAppender; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.IChoiceRenderer; import org.apache.wicket.model.IModel; public class DropDownChoiceWithAjaxIndicator extends DropDownChoice implements IAjaxIndicatorAware { private static final long serialVersionUID = 1365817942506006686L; private final WicketAjaxIndicatorAppender indicatorAppender = new WicketAjaxIndicatorAppender(); public DropDownChoiceWithAjaxIndicator(String id, IModel choices, IChoiceRenderer renderer, MarkupContainer markupContainer) { super(id, choices, renderer); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, IModel model, IModel choices, IChoiceRenderer renderer, MarkupContainer markupContainer) { super(id, model, choices, renderer); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, IModel model, IModel choices, MarkupContainer markupContainer) { super(id, model, choices); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, IModel model, List data, IChoiceRenderer renderer, MarkupContainer markupContainer) { super(id, model, data, renderer); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, IModel model, List choices, MarkupContainer markupContainer) { super(id, model, choices); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, IModel choices, MarkupContainer markupContainer) { super(id, choices); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, List data, IChoiceRenderer renderer, MarkupContainer markupContainer) { super(id, data, renderer); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, List choices, MarkupContainer markupContainer) { super(id, choices); init(markupContainer); } public DropDownChoiceWithAjaxIndicator(String id, MarkupContainer markupContainer) { super(id); init(markupContainer); } public String getAjaxIndicatorMarkupId() { return indicatorAppender.getMarkupId(); } private void init(MarkupContainer markupContainer) { add(indicatorAppender); } } On Thu, Apr 17, 2008 at 6:46 PM, Don Hass <[EMAIL PROTECTED]> wrote: > Could you post the code of: > com.eurekify.web.components.dropdown.DropDownChoiceWithAjaxIndicator; > > Since it is not a standard DDC. > > Thanks for sharing! > > On Thu, Apr 17, 2008 at 8:59 AM, Eyal Golan <[EMAIL PROTECTED]> wrote: > > Ok. > > Here is the code: > > > > package com.eurekify.web.components.table; > > > > import java.util.ArrayList; > > import java.util.Collections; > > import java.util.HashSet; > > import java.util.List; > > import java.util.Set; > > > > import org.apache.wicket.ajax.AjaxRequestTarget; > > import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; > > import org.apache.wicket.behavior.HeaderContributor; > > import org.apache.wicket.behavior.SimpleAttributeModifier; > > import > > > org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractToolbar; > > import > > org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; > > import org.apache.wicket.markup.html.WebMarkupContainer; > > import org.apache.wicket.markup.html.basic.Label; > > import org.apache.wicket.model.AbstractReadOnlyModel; > > import org.apache.wicket.model.IModel; > > import org.apache.wicket.model.Model; > > import org.apache.wicket.model.PropertyModel; > > > > import com.eurekify.i18n.LocalizationHelper; > > import > com.eurekify.web.components.dropdown.DropDownChoiceWithAjaxIndicator; > > > > class NumRecordsToolbar extends AbstractToolbar { > > private static final long serialVersionUID = -7038331743460229883L; > > > > NumRecordsToolbar(DataTable table, int initialRecordsPerPage) { > > super(table); > > > > add(HeaderContributor.forCss("/eurekify/style/EurekifyDataTable.css")); > > WebMarkupContainer span = new WebMarkupContainer("span"); > > add(span); > > span.add(new SimpleAttributeModifier("colspan", String > > .valueOf(getTable().getColumns().length))); > > span.add(getUsersPerPageSelect(initialRecordsPerPage)); > > Label numOfRecordLabel = new Label("pagingLabel", new > > Model(LocalizationHelper > >
Re: Override IE AutoComplete with wicket's AutoCompleteTextField
Thank you Ryan and Gerolf. I also came across this useful post for anyone reading this thread ... http://www.jroller.com/wireframe/entry/wicket_autocomplete_text_field -Andy -- View this message in context: http://www.nabble.com/Override-IE-AutoComplete-with-Wicket%27s-AutoCompleteTextField-tp16733561p16745438.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading HTML resources on the fly?
Is you application running in development mode? This feature is turned off by default in deployment mode. Maurice On Thu, Apr 17, 2008 at 5:14 PM, Geoffrey Gallaway <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to get tomcat and wicket to pick up changes to html files > and reload them. I thought this was the default behavior of wicket. > I'm wondering if it's not working because I'm keeping my html files in > a separate location than beside my java classes: > > public class MyApp extends WebApplication { > @Override > protected void init() { > super.init(); > > addComponentInstantiationListener(new SpringComponentInjector(this)); > IResourceSettings resourceSettings = getResourceSettings(); > resourceSettings.addResourceFolder("html/"); > resourceSettings.setResourceStreamLocator(new PathStripperLocator()); > resourceSettings.setResourcePollFrequency(Duration.ONE_SECOND); > } > } > > Am I misunderstanding wicket and tomcat's ability to pick up changes > to resources on the fly? > > Thanks, > Geoff > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic DataTable columns, paging by columns
Hi, I have to show a table where the number of columns and their titles are Dynamic. And since there could be hundreds of columns, how can I do paging by columns and/or paging by rows. Thanks, Liza -- View this message in context: http://www.nabble.com/Dynamic-DataTable-columns%2C--paging-by-columns-tp16746544p16746544.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading HTML resources on the fly?
Yes, the application is in development mode (as evidenced by the "WARNING: Wicket is running in DEVELOPMENT mode."). On Thu, Apr 17, 2008 at 11:32 AM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Is you application running in development mode? > This feature is turned off by default in deployment mode. > > Maurice > > > > On Thu, Apr 17, 2008 at 5:14 PM, Geoffrey Gallaway <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I'm trying to get tomcat and wicket to pick up changes to html files > > and reload them. I thought this was the default behavior of wicket. > > I'm wondering if it's not working because I'm keeping my html files in > > a separate location than beside my java classes: > > > > public class MyApp extends WebApplication { > > @Override > > protected void init() { > > super.init(); > > > > addComponentInstantiationListener(new > SpringComponentInjector(this)); > > IResourceSettings resourceSettings = getResourceSettings(); > > resourceSettings.addResourceFolder("html/"); > > resourceSettings.setResourceStreamLocator(new > PathStripperLocator()); > > resourceSettings.setResourcePollFrequency(Duration.ONE_SECOND); > > } > > } > > > > Am I misunderstanding wicket and tomcat's ability to pick up changes > > to resources on the fly? > > > > Thanks, > > Geoff > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [WUG] Copenhagen
And the address for Jayway dk are: jakob danefærdsvej 6b Frederikssberg You can still sign up btw:) http://cwiki.apache.org/confluence/display/WICKET/Community+meetups Guðmundur Bjarni wrote: Hey Nino, I just saw this message now. I signed up myself and a friend of mine who is quite interested about Wicket. regards, Guðmundur Bjarni Nino.Martinez wrote: Hi This is a reminder, and callout as it would be really nice to be some more people in order to get discussions going. Heres the proposed content: *Wicket-Spring-JPA-Hibernate (Could also be a discussion of the upcomming archetype wicket Iolith) *Wicket Testsing experiences *Creating behaviors *Selling Wicket (to your company, and customers) * Integrating javascript libraries with wicket Please sign up here: 23 april 16 hrs is date and time. http://cwiki.apache.org/confluence/display/WICKET/Community+meetups If you have any suggestions on content, etc please write. This also goes for requests on content. -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic DataTable columns, paging by columns
you will have to roll your own component. i would take a look at how datatable works: it is basically a repeater (for columns) inside another repeater(for rows) -igor On Thu, Apr 17, 2008 at 9:36 AM, liza6218 <[EMAIL PROTECTED]> wrote: > > Hi, > > I have to show a table where the number of columns and > their titles are Dynamic. And since there could be hundreds of columns, > how can I do paging by columns and/or paging by rows. > > Thanks, > Liza > -- > View this message in context: > http://www.nabble.com/Dynamic-DataTable-columns%2C--paging-by-columns-tp16746544p16746544.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to design tables that support 50-100K rows?
Thanks for all the quick help! I am communicating with a back-end RESTful web service that I've designed myself, so paginating the data from the repository is actually no problem. But it's cool to see the sample DB code, and I'm sure others will find it useful when they search the mailing list. (I now realize my third bullet point was slightly misleading!) Thank you, Igor, for the pointers to relevant classes: dataview, idataprovider, and pagingnavigator. I will start investigating them. If anyone happens to have a link to sample code illustrating how these three classes work together, and could easily point me to it, I would be very appreciative! Cheers, Philip -- View this message in context: http://www.nabble.com/How-to-design-tables-that-support-50-100K-rows--tp16737855p16746811.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can only locate or create session in the context of a request cycle.
Do i need to retain this in the RequestCycle at the first place ? I mean i can just fetch the token from the request object itself..in my CustomSession constructor as follows : public MyCustomSession(Request request) { super(request); String authToken = request.getParameter("authToken"); if (authenticate(authToken) == "success") { setAuthToken(authToken); } } I am not sure as to when exactly is the Session is created, but given it does before the request processing starts, in that case it is fair enough to have this logic in the Session constructor instead of onBeginRequest(), what do you think ? You don't need to worry about people logging out from outside your app, right? Well we do, havent thought about it much, but the way i see it is to have invoke the InvalidateSessionPage (from this other interface/app), in which 1) i invalid the wicket session 2) Have javascript to delete the cookie (jSessionId) from the browser, though i feel this wouldn't really be necessory if the first step is performed..What do you think ? What do you think? better approach, where the external app isnt tightly coupled with my app (where it needs to invoke the InvalidateSessionPage).. Alex Alex Jacoby-2 wrote: > > Farhan, I figure we should take this back on-list. Messages in > chronological order, with my last response at the bottom. > > > > On Apr 16, 2008, at 5:06 PM, [EMAIL PROTECTED] wrote: > > > Alex, > > > > > > Wasn't sure how frequent are u in the forum, so thought to mail you > > directly the reply...As below.. > > > > > > Subclassing RequestCycle would give me control on begin/end of the > > request, i wouldnt still have access to the Wicket Session (as the > Wicket > > Session isnt created at that time) > > > > > > A plain servlet filter also gives me control in the beginning of > the > > request (if not at the end), except for the fact that i have am > playing with > > HttpRequest,HttpResponse, where as wicket RequestCycle gives me an > > abstracted view of these classes, other than that i am just > wondering what > > is the real benefit of extending WebRequestCycle..I can still do > all the > > authentication stuff (check for authtoken/cookie etc) in a normal > filter > > too..isnt it?..unless am missing some benefits which extending > RequestCycle > > would provide > > > > > > Farhan. > >> On Wed, Apr 16, 2008 at 2:20 PM, Alex Jacoby <[EMAIL PROTECTED]> >> wrote: >> > Farhan, >> > >> > Good call emailing me - I only check the forum when I get to work >> in the >> > morning. >> > >> > Why use the (wicket) session for auth info at all? You can use a >> custom >> > request cycle just like you use a custom session. That way the >> fact that >> > the session doesn't exist at request time is irrelevant. >> > >> > Then in your pages you can use RequestCycle.get() instead of >> Session.get() >> > to extract auth info. >> > >> > My custom AuthenticatedWebSession's auth methods all delegate to >> my custom >> > request cycle methods. >> > >> > Does that make sense? >> > >> > I'm not sure if this will help in your case, but it sounds like >> it might. >> > >> > Alex > > On Apr 16, 2008, at 5:42 PM, Farhan Sarwar wrote: >> I kind of get you but to be sure, so u suggesting to store the auth >> data within the request cycle itself and access it using >> ((MyCustomRequestCycle)RequestCycle.get()).getAuthToken (offcourse >> once i have set the same attributes onBeginRequest) as below.. >> >> public class MyCustomRequestCycle extends WebRequestCycle >> { >> String authToken; >> String cookieName; >> >> public String getAuthToken() >> { >>return authToken; >> } >> >> public void setAuthToken(String authToken) >> { >>this.authToken = authToken; >> } >> >> public String getCookieName() >> { >>return cookieName; >> } >> >> public void setCookieName(String cookieName) >> { >>this.cookieName = cookieName; >> } >> >> public VCertRetailRequestCycle(WebApplication application, Request >> request, >> Response response) >> { >>super(application, (WebRequest) request, response); >> } >> >> protected void onBeginRequest() >> { >>// getToken from the url passed as a query string >>setAuthToken(request.getParameter("authToken")); >> } >> >> protected void onEndRequest() >> { >>authToken = null; >>cookieName = null; >> } >> } >> >> Please comment if i am correctly understanding the approach u are >> suggesting >> >> Now if that is the correct understanding, its just helping me >> maintain the values submitted with each request, available to all >> the pages in that particular request cycle...but i would want to >> maintain that information across the whole session, so that i dont >> have to append the authToken (passed to me in the url at the first >> place by the authentication framework) in every url i have in my >> wicket app (in the f
RE: No get method defined for class
Hello Ritesh. You were correct, it was in a method called that returned a model incorrectly. Thanks very much for your input. Bruce McGuire -Original Message- From: Ritz123 [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 April, 2008 03:46 PM To: users@wicket.apache.org Subject: Re: No get method defined for class It seems like its related to the choice list box, the values of the options are getting rendered using that class. Do you not have a choice list on the page? if mwh.entity.PoolRole is your class, check if it has name property - if not you probably will have to change the choicerenderer model to use different property Bruce McGuire-2 wrote: > > Hello. > > > > I am getting an error that I can't figure out how to track down. The > entity > in the exception doesn't have, nor has it ever had, a piece of data called > 'name'. Nor does there seem to be a place where this is getting > instantiated, at least as far as I can tell from the exception trace. > > > > Would anyone have a thought on how to figure out where the error > originates? > > > > org.apache.wicket.WicketRuntimeException: No get method defined for class: > class mwh.entity.PoolRole expression: name > > > at > org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve > r.java:419) > > > at > org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR > esolver.java:283) > > > at > org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java: > 89) > > > at > org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend > erer.java:119) > > > at > org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC > hoice.java:373) > > > at > org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac > tChoice.java:350) > > > at org.apache.wicket.Component.renderComponent(Component.java:2189) > > > at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315) > > > at org.apache.wicket.Component.render(Component.java:2013) > > > at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200) > > > at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav > a:1370) > > > at > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13 > 05) > > > at org.apache.wicket.Component.renderComponent(Component.java:2189) > > > at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315) > > > at org.apache.wicket.Component.render(Component.java:2013) > > > at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200) > > > at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav > a:1370) > > > at > org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav > a:642) > > > at > org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112) > > > at org.apache.wicket.Component.renderComponent(Component.java:2189) > > > at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315) > > > at org.apache.wicket.Component.render(Component.java:2013) > > > at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200) > > > at > org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332) > > > at org.apache.wicket.Page.onRender(Page.java:1433) > > > at org.apache.wicket.Component.render(Component.java:2013) > > > at org.apache.wicket.Page.renderPage(Page.java:922) > > > at > org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res > pond(BookmarkablePageRequestTarget.java:225) > > > at > org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ > estCycleProcessor.java:103) > > > at > org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103 > 8) > > > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108) > > > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177) > > > at org.apache.wicket.RequestCycle.request(RequestCycle.java:500) > > > at > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261) > > > at > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127) > > > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > FilterChain.java:202) > > > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java:173) > > > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja > va:213) > > > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja > va:178) > > > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 >
Re: 1.3, resource locator and properties
It seems that the problem is that the ComponentStringResourceLoader does not handle the MyApplication.properties (never mind what its javadoc says). Instead the ClassStringResourceLoader does. It is registered in the Settings constructor. The ClassSRL ultimately delegates to super return super.loadStringResource((Class)clazzRef.get(), key, locale, style); And that means that it calls back up to ComponentStringResourceLoader. So I have copied the code (!!!) from ClassSRL into "VcomClassSRL extends VcomComponentSRL" and registered VcomClassSRL with my application. Now the app.properties are found. Excellent. This means that I had to write my own: VcomResourceStreamLoader VcomComponentStringResourceLoader VcomClassStringResourceLoader This is a decent step backward from the centralized strategy in Wicket 1.2. All of the above could have been eliminated if I could have registered my: VcomResourceNameIterator With my application. Then the ResourceStreamLoader would have used it, the ComponentSRLwould have used it, and the ClassSRL would have delegated back to the ComponentSRL. I don't know whether the Wicket devs want to expose the ResourceNameIterator and add it to Settings, but since that is currently where the resource location strategy is centralized I would prefer that it be exposed. What do the devs think? Thank you, Scott On Wed, Apr 16, 2008 at 10:37 PM, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > No problem, thank me after the issue are solved:) But you would send the > thing to me? I haven't received anything yet FYI... > > > > Scott Swank wrote: > > > Thank you Nino. I'll send the quickstart directly to you since the > > list doesn't allow attachments. I'm extracting everything from our > > sandbox app that you're not interested in. I do have the behavior > > reproduced there. > > > > - Scott > > > > On Wed, Apr 16, 2008 at 1:02 PM, Nino Saturnino Martinez Vazquez Wael > > <[EMAIL PROTECTED]> wrote: > > > > > > > Hi Scott > > > > > > Could you provide a quickstart? I have some time tomorrow... > > > > > > Scott Swank wrote: > > > > > > > > > > > > > > > > > I have subclassed ComponentStringResourceLoader so that I can drive it > > > > from a custom ResourceNameIterator (in particular to look in the right > > > > directories). In particular, I just overrode > > > > > > > > public String loadStringResource(Class clazz, final String key, > > > > final Locale locale, final String style) > > > > > > > > and only changed the line > > > > > > > > ResourceNameIterator iter = new ResourceNameIterator(path, style, > > > > locale, "properties,xml"); > > > > > > > > to use our iterator. Now it cannot find myApplication.properties and > > > > I am at a bit of a loss as how this class ever got to > > > > myApplication.properties. When it is constructing its list of > > > > components it clearly stops at the Page and I don't see how it would > > > > ever get to the Application. > > > > > > > > private List getComponentStack(final Component component) > > > > { > > > > // Build the search stack > > > > final List searchStack = new ArrayList(); > > > > searchStack.add(component.getClass()); > > > > > > > > if (!(component instanceof Page)) > > > > { > > > > // Add all the component on the way to the Page > > > > MarkupContainer container = > component.getParent(); > > > > while (container != null) > > > > { > > > > searchStack.add(container.getClass()); > > > > if (container instanceof Page) > > > > { > > > > break; > > > > } > > > > > > > > container = container.getParent(); > > > > } > > > > } > > > > return searchStack; > > > > } > > > > > > > > What am I missing? > > > > > > > > Thank you, > > > > Scott > > > > > > > > On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]> > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > Previously we retrieved the CompoundResourceStreamLocator and added > > > > > our ResourceStreamLocator to it. In 1.2 did this take care of > > > > > StringResourceLoader too? > > > > > > > > > > WebApplicationPath resourceFinder = (WebApplicationPath) > > > > > getResourceSettings().getResourceFinder(); > > > > > resourceFinder.add(Env.getInstance().getAthenaDocRoot()); > > > > > > > > > > CompoundResourceStreamLocator locator = > > > > > (CompoundResourceStreamLocator) > > > > > getResourceSettings().getResourceStreamLocator(); > > > > > locator.add(0, new WebPageResourceStreamLocator(resourceFinder)); > > > > > > > > > > Thank you, > > > > > Scott > > > > > > > > > > > > > > > >
Re: 1.3, resource locator and properties
Would a patch be useful for evaluating this? Essentially I'm talking about 1) adding get/setResourceNameIterator to IResourceSettings & Settings 2) calling Application.get().getResourceSettings().getResourceNameIterator() from ResourceStreamLocator and ComponentStringResourceLocator - Scott On Thu, Apr 17, 2008 at 10:36 AM, Scott Swank <[EMAIL PROTECTED]> wrote: > It seems that the problem is that the ComponentStringResourceLoader > does not handle the MyApplication.properties (never mind what its > javadoc says). Instead the ClassStringResourceLoader does. It is > registered in the Settings constructor. > > The ClassSRL ultimately delegates to super > >return super.loadStringResource((Class)clazzRef.get(), key, locale, style); > > And that means that it calls back up to ComponentStringResourceLoader. > So I have copied the code (!!!) from ClassSRL into "VcomClassSRL > extends VcomComponentSRL" and registered VcomClassSRL with my > application. Now the app.properties are found. Excellent. > > This means that I had to write my own: > >VcomResourceStreamLoader >VcomComponentStringResourceLoader >VcomClassStringResourceLoader > > This is a decent step backward from the centralized strategy in Wicket > 1.2. All of the above could have been eliminated if I could have > registered my: > >VcomResourceNameIterator > > With my application. Then the ResourceStreamLoader would have used > it, the ComponentSRLwould have used it, and the ClassSRL would have > delegated back to the ComponentSRL. > > I don't know whether the Wicket devs want to expose the > ResourceNameIterator and add it to Settings, but since that is > currently where the resource location strategy is centralized I would > prefer that it be exposed. > > What do the devs think? > > Thank you, > Scott > > > > On Wed, Apr 16, 2008 at 10:37 PM, Nino Saturnino Martinez Vazquez Wael > > > <[EMAIL PROTECTED]> wrote: > > No problem, thank me after the issue are solved:) But you would send the > > thing to me? I haven't received anything yet FYI... > > > > > > > > Scott Swank wrote: > > > > > Thank you Nino. I'll send the quickstart directly to you since the > > > list doesn't allow attachments. I'm extracting everything from our > > > sandbox app that you're not interested in. I do have the behavior > > > reproduced there. > > > > > > - Scott > > > > > > On Wed, Apr 16, 2008 at 1:02 PM, Nino Saturnino Martinez Vazquez Wael > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi Scott > > > > > > > > Could you provide a quickstart? I have some time tomorrow... > > > > > > > > Scott Swank wrote: > > > > > > > > > > > > > > > > > > > > > > I have subclassed ComponentStringResourceLoader so that I can drive > it > > > > > from a custom ResourceNameIterator (in particular to look in the > right > > > > > directories). In particular, I just overrode > > > > > > > > > > public String loadStringResource(Class clazz, final String key, > > > > > final Locale locale, final String style) > > > > > > > > > > and only changed the line > > > > > > > > > > ResourceNameIterator iter = new ResourceNameIterator(path, style, > > > > > locale, "properties,xml"); > > > > > > > > > > to use our iterator. Now it cannot find myApplication.properties and > > > > > I am at a bit of a loss as how this class ever got to > > > > > myApplication.properties. When it is constructing its list of > > > > > components it clearly stops at the Page and I don't see how it would > > > > > ever get to the Application. > > > > > > > > > > private List getComponentStack(final Component component) > > > > > { > > > > > // Build the search stack > > > > > final List searchStack = new ArrayList(); > > > > > searchStack.add(component.getClass()); > > > > > > > > > > if (!(component instanceof Page)) > > > > > { > > > > > // Add all the component on the way to the Page > > > > > MarkupContainer container = > > component.getParent(); > > > > > while (container != null) > > > > > { > > > > > searchStack.add(container.getClass()); > > > > > if (container instanceof Page) > > > > > { > > > > > break; > > > > > } > > > > > > > > > > container = container.getParent(); > > > > > } > > > > > } > > > > > return searchStack; > > > > > } > > > > > > > > > > What am I missing? > > > > > > > > > > Thank you, > > > > > Scott > > > > > > > > > > On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]> > > > > > > > > > > > > > > wrote: > > > > > > > > > > > >
Re: Reloading HTML resources on the fly?
it definitely works. don't know if it works with your own resource locator. my suggestion: extract a quickstart app that demos the problem and attach it to a jira bug. Geoffrey Gallaway wrote: > > Hello, > > I'm trying to get tomcat and wicket to pick up changes to html files > and reload them. I thought this was the default behavior of wicket. > I'm wondering if it's not working because I'm keeping my html files in > a separate location than beside my java classes: > > public class MyApp extends WebApplication { > @Override > protected void init() { > super.init(); > > addComponentInstantiationListener(new > SpringComponentInjector(this)); > IResourceSettings resourceSettings = getResourceSettings(); > resourceSettings.addResourceFolder("html/"); > resourceSettings.setResourceStreamLocator(new > PathStripperLocator()); > resourceSettings.setResourcePollFrequency(Duration.ONE_SECOND); > } > } > > Am I misunderstanding wicket and tomcat's ability to pick up changes > to resources on the fly? > > Thanks, > Geoff > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Reloading-HTML-resources-on-the-fly--tp16748845p16750977.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading HTML resources on the fly?
my personal advice is to stick with wicket's default markup location. we designed it this way for a lot of reasons you will eventually discover. the old world way of placing resources is simply not a good idea. Geoffrey Gallaway wrote: > > Hello, > > I'm trying to get tomcat and wicket to pick up changes to html files > and reload them. I thought this was the default behavior of wicket. > I'm wondering if it's not working because I'm keeping my html files in > a separate location than beside my java classes: > > public class MyApp extends WebApplication { > @Override > protected void init() { > super.init(); > > addComponentInstantiationListener(new > SpringComponentInjector(this)); > IResourceSettings resourceSettings = getResourceSettings(); > resourceSettings.addResourceFolder("html/"); > resourceSettings.setResourceStreamLocator(new > PathStripperLocator()); > resourceSettings.setResourcePollFrequency(Duration.ONE_SECOND); > } > } > > Am I misunderstanding wicket and tomcat's ability to pick up changes > to resources on the fly? > > Thanks, > Geoff > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Reloading-HTML-resources-on-the-fly--tp16748845p16750981.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AbstractDefaultAjaxBehavior ....shows the ajax indicator even if precondition script returns false.
*https://issues.apache.org/jira/browse/WICKET-1550* On Thu, Apr 17, 2008 at 7:48 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > file a bug in jira please > > -igor > > On Wed, Apr 16, 2008 at 6:52 PM, atul singh <[EMAIL PROTECTED]> wrote: > > AbstractDefaultAjaxBehavior shows the ajax indicator even if > precondition > > script returns false. That means no call will be made actually to the > server > > right(And hence no indicator should be shown). I know i can have my own > > implementation to get this, but i wanted to use IAjaxIndicatorAware > > Should i file a bug about this?? (In my particular scenario it keeps > showing > > all the time, though i go to the server only when a javascript variable > > returns true) > > Thanks > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Override IE AutoComplete with wicket's AutoCompleteTextField
Glad you liked it...That's actually my blog. =) you may want to check out the updated version of the autocomplete wicket components... http://jroller.com/wireframe/entry/from_components_to_behaviors On Thu, Apr 17, 2008 at 10:59 AM, ak <[EMAIL PROTECTED]> wrote: > > Thank you Ryan and Gerolf. > > I also came across this useful post for anyone reading this thread ... > http://www.jroller.com/wireframe/entry/wicket_autocomplete_text_field > > -Andy > -- > View this message in context: > http://www.nabble.com/Override-IE-AutoComplete-with-Wicket%27s-AutoCompleteTextField-tp16733561p16745438.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Wicket+Userforum integration?
hi, jforum is actually not so bad - rafael does a great job on it and it took some inspiration out of his work. i think there is a complete rewrite undergoing for v3.x (with some bigger sponsors as far as i have read). if i'd had more time i would love to implement my own... best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to design tables that support 50-100K rows?
PhilipJohnson wrote: > > If anyone happens to have a link to sample code illustrating how these > three classes work together, and could easily point me to it, I would be > very appreciative! > I'm going to answer my own question to save current and future readers the trouble: http://wicketstuff.org/wicket13/repeater/ Contains nice sample code. Cheers, Philip -- View this message in context: http://www.nabble.com/How-to-design-tables-that-support-50-100K-rows--tp16737855p16754896.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DropDownChoice problem
Hi, I have a DropDownChoice in a form, with markup: In my Form class, I add it like this: add(new DropDownChoice("authors", new PropertyModel(this.article, "articleAuthorId"), acService.getAuthors(), new ChoiceRenderer("authorDisplayName", "articleAuthorId"))); this.article refers to a class that has a property of articleAuthorId: public long getArticleAuthorId() { return articleAuthorId; } public void setArticleAuthorId(long articleAuthorId) { this.articleAuthorId = articleAuthorId; } The acService.getAuthors() call gets a list of Author objects: public class Author implements Serializable { private long articleAuthorId; private String authorFirstName; private String authorMiddleName; private String authorLastName; private String authorDisplayName; public String getAuthorFirstName() { return authorFirstName; } public void setAuthorFirstName(String authorFirstName) { this.authorFirstName = authorFirstName; } public String getAuthorMiddleName() { return authorMiddleName; } public void setAuthorMiddleName(String authorMiddleName) { this.authorMiddleName = authorMiddleName; } public String getAuthorLastName() { return authorLastName; } public void setAuthorLastName(String authorLastName) { this.authorLastName = authorLastName; } public String getAuthorDisplayName() { return authorDisplayName; } public void setAuthorDisplayName(String authorDisplayName) { this.authorDisplayName = authorDisplayName; } public Long getId() { return new Long(getArticleAuthorId()); } public long getArticleAuthorId() { return articleAuthorId; } public void setArticleAuthorId(long articleAuthorId) { this.articleAuthorId = articleAuthorId; } } The error I get when I try to render the page is: WicketMessage: No get method defined for class: class java.lang.Long expression: articleAuthorId I don't understand this, as the class used for the choices is Author, not java.lang.Long Any help appreciated! Thanks ___ The information in this email or in any file attached hereto is intended only for the personal and confiden- tial use of the individual or entity to which it is addressed and may contain information that is propri- etary and confidential. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communica- tion is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product. Email trans- mission cannot be guaranteed to be secure or error- free. P6070214
Re: DropDownChoice problem
Use Long instead of long On Thu, Apr 17, 2008 at 5:05 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote: > Hi, > > I have a DropDownChoice in a form, with markup: > > > > In my Form class, I add it like this: > > add(new DropDownChoice("authors", new > PropertyModel(this.article, "articleAuthorId"), > acService.getAuthors(), new > ChoiceRenderer("authorDisplayName", "articleAuthorId"))); > > this.article refers to a class that has a property of articleAuthorId: > > public long getArticleAuthorId() { > return articleAuthorId; > } > > public void setArticleAuthorId(long articleAuthorId) { > this.articleAuthorId = articleAuthorId; > } > > The acService.getAuthors() call gets a list of Author objects: > > public class Author implements Serializable { > > private long articleAuthorId; > private String authorFirstName; > private String authorMiddleName; > private String authorLastName; > private String authorDisplayName; > > > public String getAuthorFirstName() { > return authorFirstName; > } > public void setAuthorFirstName(String authorFirstName) { > this.authorFirstName = authorFirstName; > } > public String getAuthorMiddleName() { > return authorMiddleName; > } > public void setAuthorMiddleName(String authorMiddleName) { > this.authorMiddleName = authorMiddleName; > } > public String getAuthorLastName() { > return authorLastName; > } > public void setAuthorLastName(String authorLastName) { > this.authorLastName = authorLastName; > } > public String getAuthorDisplayName() { > return authorDisplayName; > } > public void setAuthorDisplayName(String authorDisplayName) { > this.authorDisplayName = authorDisplayName; > } > public Long getId() > { > return new Long(getArticleAuthorId()); > } > public long getArticleAuthorId() { > return articleAuthorId; > } > public void setArticleAuthorId(long articleAuthorId) { > this.articleAuthorId = articleAuthorId; > } > } > > The error I get when I try to render the page is: > > WicketMessage: No get method defined for class: class java.lang.Long > expression: articleAuthorId > > I don't understand this, as the class used for the choices is Author, not > java.lang.Long > > Any help appreciated! > > Thanks > > > > > ___ > > The information in this email or in any file attached > hereto is intended only for the personal and confiden- > tial use of the individual or entity to which it is > addressed and may contain information that is propri- > etary and confidential. If you are not the intended > recipient of this message you are hereby notified that > any review, dissemination, distribution or copying of > this message is strictly prohibited. This communica- > tion is for information purposes only and should not > be regarded as an offer to sell or as a solicitation > of an offer to buy any financial product. Email trans- > mission cannot be guaranteed to be secure or error- > free. P6070214 > -- Ryan Gravener http://ryangravener.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Auto-Complete TextField Problem
Gerolf, thanks for the info.. Vatroslav Gerolf Seitz wrote: > > it's fixed in trunk for 1.3.4 and 1.4M1 > > Gerolf > > On Tue, Apr 15, 2008 at 12:25 PM, Vatroslav <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> I've problem with AutoCompleteTextField with IE6 and Wicket >> 1.3.3.installed >> on Tomcat6 and/or Jetty6. >> > -- View this message in context: http://www.nabble.com/Auto-Complete-TextField-Problem-tp16698982p16756375.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Selecting a radio programmatically?
Yes, I remembered that - my problem was not drilling down into my model properly to get the Boolean. Works now - thanks anyway for your input. Michael -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 16, 2008 7:11 PM To: users@wicket.apache.org Subject: Re: Selecting a radio programmatically? Radio objects can have values other than boolean. On Wed, Apr 16, 2008 at 8:53 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote: > Simple actually - I need to select a radio in a group programmatically > (without user interaction). Is this done via setting the model of the > radio to a true Boolean? > > > > Michael > > -- Nick Heudecker Professional Wicket Training & Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DropDownChoice problem
I tried changing both the property being set by the DropDownChoice and the property used in the Author class to Long, and it didn't make any difference any help appreciated! Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gravener Sent: Thursday, April 17, 2008 4:23 PM To: users@wicket.apache.org Subject: Re: DropDownChoice problem Use Long instead of long On Thu, Apr 17, 2008 at 5:05 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote: > Hi, > > I have a DropDownChoice in a form, with markup: > > > > In my Form class, I add it like this: > > add(new DropDownChoice("authors", new > PropertyModel(this.article, "articleAuthorId"), > acService.getAuthors(), new > ChoiceRenderer("authorDisplayName", "articleAuthorId"))); > > this.article refers to a class that has a property of articleAuthorId: > > public long getArticleAuthorId() { > return articleAuthorId; > } > > public void setArticleAuthorId(long articleAuthorId) { > this.articleAuthorId = articleAuthorId; > } > > The acService.getAuthors() call gets a list of Author objects: > > public class Author implements Serializable { > > private long articleAuthorId; > private String authorFirstName; > private String authorMiddleName; > private String authorLastName; > private String authorDisplayName; > > > public String getAuthorFirstName() { > return authorFirstName; > } > public void setAuthorFirstName(String authorFirstName) { > this.authorFirstName = authorFirstName; > } > public String getAuthorMiddleName() { > return authorMiddleName; > } > public void setAuthorMiddleName(String authorMiddleName) { > this.authorMiddleName = authorMiddleName; > } > public String getAuthorLastName() { > return authorLastName; > } > public void setAuthorLastName(String authorLastName) { > this.authorLastName = authorLastName; > } > public String getAuthorDisplayName() { > return authorDisplayName; > } > public void setAuthorDisplayName(String authorDisplayName) { > this.authorDisplayName = authorDisplayName; > } > public Long getId() > { > return new Long(getArticleAuthorId()); > } > public long getArticleAuthorId() { > return articleAuthorId; > } > public void setArticleAuthorId(long articleAuthorId) { > this.articleAuthorId = articleAuthorId; > } > } > > The error I get when I try to render the page is: > > WicketMessage: No get method defined for class: class java.lang.Long > expression: articleAuthorId > > I don't understand this, as the class used for the choices is Author, not > java.lang.Long > > Any help appreciated! > > Thanks > > > > > ___ > > The information in this email or in any file attached > hereto is intended only for the personal and confiden- > tial use of the individual or entity to which it is > addressed and may contain information that is propri- > etary and confidential. If you are not the intended > recipient of this message you are hereby notified that > any review, dissemination, distribution or copying of > this message is strictly prohibited. This communica- > tion is for information purposes only and should not > be regarded as an offer to sell or as a solicitation > of an offer to buy any financial product. Email trans- > mission cannot be guaranteed to be secure or error- > free. P6070214 > -- Ryan Gravener http://ryangravener.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
checkboxes and Link
Hi! I need to add Checkboxes to a listview and a way to check, uncheck all checkboxes using a Link. any pointers would be appreciated. -- View this message in context: http://www.nabble.com/checkboxes-and-Link-tp16757399p16757399.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Status of acegi/wasp/swarm?
We use acegi for one purpose, and that is to authenticate and authorize (AA) against our corporate SiteMinder server. We have existing Spring-based applications that successfully auth against SiteMinder via acegi. We're starting a new project and are planning to use Wicket. It looks as though one currently has to use some Spring bridging to inject acegi into a Wicket application. Are there plans to replicate the functionality of acegi as it relates to AA? Basically, is there, or wlll there be, a means for me to authenticate/ authorize/etc against something like SiteMinder without having to slide in bits of Spring to do it? -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Get working URL
Hi! Is there any way that I can get the the current URL from my wicket application. the getServletContext() let me get the real path but I want the url. like http://localhost/myapplication/... -- View this message in context: http://www.nabble.com/Get-working-URL-tp16758219p16758219.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DropDownChoice problem
This has to qualify as one of the most common questions on the list! Hopefully, generics in 1.4 will make it more clear. The items in your list have to be the same type as the value model (the PropertyModel in your case). In your case, Wicket is complaining because the PropertyModel returns a long, but the list contains Authors. The cleanest solution is to change your property type to Author. If you can't, you can either give the DDC a list of author IDs instead of Authors (in which case you need to implement ChoiceRenderer.getDisplayValue to look up the author's name given an ID) or implement a custom model instead of the property model: IModel authorModel = IModel() { public Object getObject() { return lookUpAuthor(article.getArticleAuthorId()); } public void setObject(Object object) { article.setArticleAuthorId(((Author) object).getId()); } } HTH jk On Thu, Apr 17, 2008 at 04:05:45PM -0500, Andrew Broderick wrote: > Hi, > > I have a DropDownChoice in a form, with markup: > > > > In my Form class, I add it like this: > > add(new DropDownChoice("authors", new > PropertyModel(this.article, "articleAuthorId"), > acService.getAuthors(), new > ChoiceRenderer("authorDisplayName", "articleAuthorId"))); > > this.article refers to a class that has a property of articleAuthorId: > > public long getArticleAuthorId() { > return articleAuthorId; > } > > public void setArticleAuthorId(long articleAuthorId) { > this.articleAuthorId = articleAuthorId; > } > > The acService.getAuthors() call gets a list of Author objects: > > public class Author implements Serializable { > > private long articleAuthorId; > private String authorFirstName; > private String authorMiddleName; > private String authorLastName; > private String authorDisplayName; > > > public String getAuthorFirstName() { > return authorFirstName; > } > public void setAuthorFirstName(String authorFirstName) { > this.authorFirstName = authorFirstName; > } > public String getAuthorMiddleName() { > return authorMiddleName; > } > public void setAuthorMiddleName(String authorMiddleName) { > this.authorMiddleName = authorMiddleName; > } > public String getAuthorLastName() { > return authorLastName; > } > public void setAuthorLastName(String authorLastName) { > this.authorLastName = authorLastName; > } > public String getAuthorDisplayName() { > return authorDisplayName; > } > public void setAuthorDisplayName(String authorDisplayName) { > this.authorDisplayName = authorDisplayName; > } > public Long getId() > { > return new Long(getArticleAuthorId()); > } > public long getArticleAuthorId() { > return articleAuthorId; > } > public void setArticleAuthorId(long articleAuthorId) { > this.articleAuthorId = articleAuthorId; > } > } > > The error I get when I try to render the page is: > > WicketMessage: No get method defined for class: class java.lang.Long > expression: articleAuthorId > > I don't understand this, as the class used for the choices is Author, not > java.lang.Long > > Any help appreciated! > > Thanks > > > > > ___ > > The information in this email or in any file attached > hereto is intended only for the personal and confiden- > tial use of the individual or entity to which it is > addressed and may contain information that is propri- > etary and confidential. If you are not the intended > recipient of this message you are hereby notified that > any review, dissemination, distribution or copying of > this message is strictly prohibited. This communica- > tion is for information purposes only and should not > be regarded as an offer to sell or as a solicitation > of an offer to buy any financial product. Email trans- > mission cannot be guaranteed to be secure or error- > free. P6070214 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can we expose ExceptionErrorPage via IApplicationSettings please?!
I'd like to get a custom look and feel just for the exception page, and perhaps some behaviour too. Unfortunately, instantiation of this class appears concreted into the AbstractRequestCycleProcessor.respond(RuntimeException, RequestCycle). There doesn't appear to be an elegant extension point for this. Am I missing something? How can I style up / control the ExceptionErrorPage for my app without overriding "respond" and duplicating most of the code? -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758488.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Get working URL
you can reconstruct the url from the bits in httpservletrequest ((webrequest)getrequest()).gethttpservletrequest() -igor On Thu, Apr 17, 2008 at 5:12 PM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > Hi! > > Is there any way that I can get the the current URL from my wicket > application. > > the getServletContext() let me get the real path but I want the url. > > like http://localhost/myapplication/... > > > > -- > View this message in context: > http://www.nabble.com/Get-working-URL-tp16758219p16758219.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
I have found https://issues.apache.org/jira/browse/WICKET-1357 And it's marked as invalid which is a bit annoying. Seems like a pretty easy thing to expose. I'm not sure why you would not allow override of this page. Not all of us want to see an orange exception stack :) - we want corporate blue. My application can be consumed by other corporate devs, and the should see the exceptions (in a nice pretty blue). -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758538.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
whats wrong with just subclassing requestcycle, overriding onruntimeexception, and returning any kind of error page you want? -igor On Thu, Apr 17, 2008 at 5:40 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > I'd like to get a custom look and feel just for the exception page, and > perhaps some behaviour too. > > Unfortunately, instantiation of this class appears concreted into the > AbstractRequestCycleProcessor.respond(RuntimeException, RequestCycle). > > There doesn't appear to be an elegant extension point for this. > > Am I missing something? How can I style up / control the ExceptionErrorPage > for my app without overriding "respond" and duplicating most of the code? > -- > View this message in context: > http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758488.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Get working URL
Thanks Igor ((WebRequest) getRequest()).getHttpServletRequest().getRequestURL().toString() did the trick! -- View this message in context: http://www.nabble.com/Get-working-URL-tp16758219p16758760.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
igor.vaynberg wrote: > > whats wrong with just subclassing requestcycle, overriding > onruntimeexception, and returning any kind of error page you want? > > -igor > The app elegantly exposes other settings like pages for handling AuthorizationException, PageExpiredException. Both of these extend WicketRuntimeException, so if I check for it in onRuntimeException I'm going to lose the handling of anything thats extending WicketRuntimeException unless I specifically exclude those interfaces, and it makes it quite brittle if you guys change the behaviour of "AbstractRequestCycleProcessor.respond" getApplicationSettings().setInternalErrorPage(MyInternalExceptionPage.class); seems so easy why not getApplicationSettings().setExternalErrorPage(MyExternalPage.class); I guess a further question would be, why not just have a single exception page (for both internal and external) that has scope to the exception so we can handle it however we like, and allow us to extend this. (Ie, if InternalErrorPage had scope to the exception or there was only one page, I wouldn't have been posting here). -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758764.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
because one page is meant for production use and another for development. you dont want your end customers seeing your stacktrace do you? -igor On Thu, Apr 17, 2008 at 6:26 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > > igor.vaynberg wrote: > > > > whats wrong with just subclassing requestcycle, overriding > > onruntimeexception, and returning any kind of error page you want? > > > > -igor > > > The app elegantly exposes other settings like pages for handling > AuthorizationException, PageExpiredException. > > Both of these extend WicketRuntimeException, so if I check for it in > onRuntimeException I'm going to lose the handling of anything thats > extending WicketRuntimeException unless I specifically exclude those > interfaces, and it makes it quite brittle if you guys change the behaviour > of "AbstractRequestCycleProcessor.respond" > > > getApplicationSettings().setInternalErrorPage(MyInternalExceptionPage.class); > seems so easy > why not > getApplicationSettings().setExternalErrorPage(MyExternalPage.class); > > > I guess a further question would be, why not just have a single exception > page (for both internal and external) that has scope to the exception so we > can handle it however we like, and allow us to extend this. (Ie, if > InternalErrorPage had scope to the exception or there was only one page, I > wouldn't have been posting here). > > -- > View this message in context: > http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758764.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket markup documentation and question on threading/clustering
Hi Wicket Community: I'm new to Wicket - I'm using it to rebuild and enhance my www.ddpoker.com website. So far I am very impressed with Wicket. I have two books - the Wicket in Action MEAP early access edition and "enjoy web development with wicket". I'm looking for a complete list of all wicket markup (e.g., wicket-panel, wicket-child, wicket-exclude etc). I didn't find anything obvious via Google or the wiki. Am I missing something? As a newcomer, it would be helpful to know what all the choices are and what they do so as to not miss anything. Also, I am looking for an explanation of the threading / clustering architecture with Wicket. Neither of the books address these topics in any depth. For example, in the simple "Link Counter" example in "Wicket in Action", how does that counter work with multiple people accessing the page? It doesn't appear to be synchronized unless this is under the covers. If there is an instance of each page per person that would mean the total displayed is per person (and not per all users). Finally, if one wants to have multiple application servers for load balancing / failover, what options does one have with Wicket? I assume you use some sort of clustered session that wicket utilizes. Perhaps something like Gigaspaces? Thanks for any answers. Hopefully these questions give some insight into what an experienced developer might ask as a newcomer to the platform. Finally, Thanks, -Doug -- View this message in context: http://www.nabble.com/wicket-markup-documentation-and-question-on-threading-clustering-tp16758965p16758965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange ClassCastException with DropDownChoice
I'm creating my own DropDownChoice: private class WeekdayChoice extends DropDownChoice { public WeekdayChoice(String id, IModel model) { super(id, model, new Model(new DateFormatSymbols().getWeekdays())); } @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(Object newSelection) { setWeekDayChoice(newSelection); } } ... and instantiating it like this: weeklyLayer.add(weeklyWeekDayChoice = new WeekdayChoice("weeklyWeekDayChoice", new PropertyModel(SubmitForm.this, "weekDayChoice"))); However, before the page even paints I get the exception below - any ideas? [ERROR RequestCycle] Exception in rendering component: [MarkupContainer [Component id = weeklyWeekDayChoice, page = com.foo.event.web.create.CreateEventPage, path = 0:eventTabbedPanel:panel:createEventForm:recurringEventModalWindow:conte nt:submitForm:weeklyLayer:weeklyWeekDayChoice.CreateRecurringEventPanel$ SubmitForm$WeekdayChoice, isVisible = true, isVersioned = false]] org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = weeklyWeekDayChoice, page = com.foo.event.web.create.CreateEventPage, path = 0:eventTabbedPanel:panel:createEventForm:recurringEventModalWindow:conte nt:submitForm:weeklyLayer:weeklyWeekDayChoice.CreateRecurringEventPanel$ SubmitForm$WeekdayChoice, isVisible = true, isVersioned = false]] at org.apache.wicket.Component.renderComponent(Component.java:2509) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.Component.render(Component.java:2308) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1464) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1401) at org.apache.wicket.Component.renderComponent(Component.java:2471) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.Component.render(Component.java:2308) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1464) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1401) at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:165 3) at org.apache.wicket.Component.renderComponent(Component.java:2471) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1692) at org.apache.wicket.Component.render(Component.java:2308) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1464) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer .java:639) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java: 112) at org.apache.wicket.Component.renderComponent(Component.java:2471) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.Component.render(Component.java:2308) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1464) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer .java:639) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java: 112) at org.apache.wicket.Component.renderComponent(Component.java:2471) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.Component.render(Component.java:2308) at org.apache.wicket.Component.renderComponent(Component.java:2411) at org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTar get.java:703) at org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTa rget.java:605) at org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxReque
Re: wicket markup documentation and question on threading/clustering
On Thu, Apr 17, 2008 at 6:48 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote: > > I'm looking for a complete list of all wicket markup (e.g., wicket-panel, > wicket-child, wicket-exclude etc). I didn't find anything obvious via > Google or the wiki. Am I missing something? As a newcomer, it would be > helpful to know what all the choices are and what they do so as to not miss > anything. http://cwiki.apache.org/confluence/display/WICKET/Wicket%27s+XHTML+tags > Also, I am looking for an explanation of the threading / clustering > architecture with Wicket. Neither of the books address these topics in any > depth. For example, in the simple "Link Counter" example in "Wicket in > Action", how does that counter work with multiple people accessing the page? > It doesn't appear to be synchronized unless this is under the covers. If > there is an instance of each page per person that would mean the total > displayed is per person (and not per all users). each user gets their own instance of Page. Access to the page object is synced on user's session (thats not exactly correct but for purposes of this discussion it will do) so you do not have to worry about all the nasty syncing yourself. if you have data that you want users to share/interact with it has to be kept in some global store: database, servlet context, memory, etc. > Finally, if one wants to have multiple application servers for load > balancing / failover, what options does one have with Wicket? I assume you > use some sort of clustered session that wicket utilizes. Perhaps something > like Gigaspaces? wicket will work with regular servlet container clustering. it stores the page in http session and page is serializable so it will be replicated. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
Ok, what I have is... protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override public void respond(RuntimeException e, RequestCycle requestCycle) { //get the original response page before calling the super method. final Page responsePage = requestCycle.getResponsePage(); //catching the response here as we want to be able to present our own error page with scope to the exception. try { super.respond(e, requestCycle); } catch (RestartResponseException restartResponseException) { if (requestCycle.getResponsePage() instanceof ExceptionErrorPage) { //here we want to use our own exception page. throw new RestartResponseException(new MyExceptionPage(e, responsePage)); } throw restartResponseException; } } } } This does feel a little ugly, but its working. -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758968.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with DateTextField in wicket 1.3
all, i'm trying to move from wicket-1.3.0-rc2 to wicket-1.3.3. for some reason i started having problems with DateTextField. it's displaying an error in java script: Line: 2072Error: Object doesn't support this property or method it looks like the error comes from file: yuiloader-beta.js line:2072: this.moduleInfo = lang.merge(YUI.info.moduleInfo); which gets called from the script generated in my page: if (typeof wicketYuiLoader == 'undefined') { wicketYuiLoader = new YAHOO.util.YUILoader({ base: "resources/org.apache.wicket.extensions.yui.YuiLib/", filter: "RAW", allowRollup: false, require: ["wicket-date"],onSuccess: function() { wicketCalendarInitFinished = true;while (wicketCalendarInits.length > 0) { wicketCalendarInits.pop()(); }} }); if i switch back to wicket-1.3.0-rc2, the error goes away. below is my markup and java code. does anyone have any suggestions on how to fix the issue? Thanks, Vadim here's the markup: here's java code: final DateField df = new DateField("textStart", new PropertyModel(this, PROP_START)) { private static final long serialVersionUID = 1L; @Override protected DateTextField newDateTextField(final String id_, final PropertyModel model_) { return (new DateTextField(id_, model_, new StyleDateConverter("S-", true))); } }; getForm().add(df); _ Pack up or back up–use SkyDrive to transfer files or keep extra copies. Learn how. http://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_packup_042008
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
ok...but you can just as simply do class myrequestcycle extends webrequestcycle { protected Page onRuntimeException(RuntimeExcepton e, Page cause) { return new MyExceptionPage(e); } } -igor On Thu, Apr 17, 2008 at 7:03 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > Ok, what I have is... > > protected IRequestCycleProcessor newRequestCycleProcessor() { > return new WebRequestCycleProcessor() { > @Override > public void respond(RuntimeException e, RequestCycle requestCycle) { > //get the original response page before calling the super method. > final Page responsePage = requestCycle.getResponsePage(); > > //catching the response here as we want to be able to present our own > error page with scope to the exception. > try { > super.respond(e, requestCycle); > } catch (RestartResponseException restartResponseException) { > if (requestCycle.getResponsePage() instanceof ExceptionErrorPage) { > //here we want to use our own exception page. > throw new RestartResponseException(new MyExceptionPage(e, > responsePage)); > } > throw restartResponseException; > } > } > } > } > > > This does feel a little ugly, but its working. > > -- > View this message in context: > http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758968.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
As far as I can see - this means double handling of some exceptions. Ie, PageExpiredException and AuthirzationException which are handled in the AbstractRequestCycleProcessor AFTER the override section. I would have to explicitly exclude these types when i check the RuntimeException - otherwise the customisations to application.getApplicationSettings().getPageExpiredErrorPage() become obsolete because AbstractRequestCycleProcessor.respond terminates at the "override" section. or copy/paste most of the AbstractRequestCycleProcessor into my own implementation - which will work but sucks for obvious code reuse reasons. Am I missing something obvious? igor.vaynberg wrote: > > ok...but you can just as simply do > > class myrequestcycle extends webrequestcycle { > protected Page onRuntimeException(RuntimeExcepton e, Page cause) { > return new MyExceptionPage(e); >} > } > > -igor > -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16759896.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
My customers can be a middle man developer - consuming my product as developers - these guys should see the strack trace - but it should be nice and blue, have my headers, and some of my behaviour in it :) I'd like to be able to style and customise exceptions on a page that has scope to the exceptions AND use the settings exposed thru the IApplicationSettings interface (ie, set error pages, page expired etc). Maybe I turn it on in production, but you only get the full stack trace if you have a certain permission (ie, Role = admin). Again, I'm unsure this is not exposed. igor.vaynberg wrote: > > because one page is meant for production use and another for > development. you dont want your end customers seeing your stacktrace > do you? > > -igor > -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16760013.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange ClassCastException with DropDownChoice
It looks like your model object is returning a String[], while the class is expecting a List. On Thu, Apr 17, 2008 at 8:51 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote: > I'm creating my own DropDownChoice: > > > > private class WeekdayChoice extends DropDownChoice { > > > >public WeekdayChoice(String id, > IModel model) { > >super(id, model, new > Model(new DateFormatSymbols().getWeekdays())); > >} > > > >@Override > >protected boolean > wantOnSelectionChangedNotifications() { > >return true; > >} > > > >@Override > >protected void > onSelectionChanged(Object newSelection) { > > > setWeekDayChoice(newSelection); > >} > > > >} > > > > ... and instantiating it like this: > > > > weeklyLayer.add(weeklyWeekDayChoice = new > WeekdayChoice("weeklyWeekDayChoice", > >new > PropertyModel(SubmitForm.this, "weekDayChoice"))); > > > > However, before the page even paints I get the exception below - any > ideas? > > > > [ERROR RequestCycle] Exception in rendering component: [MarkupContainer > [Component id = weeklyWeekDayChoice, page = > com.foo.event.web.create.CreateEventPage, path = > 0:eventTabbedPanel:panel:createEventForm:recurringEventModalWindow:conte > nt:submitForm:weeklyLayer:weeklyWeekDayChoice.CreateRecurringEventPanel$ > SubmitForm$WeekdayChoice, isVisible = true, isVersioned = false]] > > org.apache.wicket.WicketRuntimeException: Exception in rendering > component: [MarkupContainer [Component id = weeklyWeekDayChoice, page = > com.foo.event.web.create.CreateEventPage, path = > 0:eventTabbedPanel:panel:createEventForm:recurringEventModalWindow:conte > nt:submitForm:weeklyLayer:weeklyWeekDayChoice.CreateRecurringEventPanel$ > SubmitForm$WeekdayChoice, isVisible = true, isVersioned = false]] > >at > org.apache.wicket.Component.renderComponent(Component.java:2509) > >at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) > >at org.apache.wicket.Component.render(Component.java:2308) > >at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) > >at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > .java:1464) > >at > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav > a:1401) > >at > org.apache.wicket.Component.renderComponent(Component.java:2471) > >at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) > >at org.apache.wicket.Component.render(Component.java:2308) > >at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) > >at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > .java:1464) > >at > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav > a:1401) > >at > org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:165 > 3) > >at > org.apache.wicket.Component.renderComponent(Component.java:2471) > >at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) > >at > org.apache.wicket.markup.html.form.Form.onRender(Form.java:1692) > >at org.apache.wicket.Component.render(Component.java:2308) > >at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) > >at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > .java:1464) > >at > org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer > .java:639) > >at > org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java: > 112) > >at > org.apache.wicket.Component.renderComponent(Component.java:2471) > >at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) > >at org.apache.wicket.Component.render(Component.java:2308) > >at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) > >at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > .java:1464) > >at > org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer > .java:639) > >at > org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java: > 112) > >at > org.apache.wicket.Component.renderComponent(Component.java:2471) > >at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) > >at org.apache.wicket.Comp
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
sounds to me like what you should do is simply subclass webrequestcycleprocessor and override the entire respondonruntimeexception() and ignore whatever is in the app settings. simply return your own page that would inspect the user and based on that display the general message and maybe the stacktrace if appropriate. it can also take the applicaton's deployment mode if you want. sounds to me like what you want is so custom there is no positive reason to reuse what is already there. -igor On Thu, Apr 17, 2008 at 8:47 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > My customers can be a middle man developer - consuming my product as > developers - these guys should see the strack trace - but it should be nice > and blue, have my headers, and some of my behaviour in it :) > > I'd like to be able to style and customise exceptions on a page that has > scope to the exceptions AND use the settings exposed thru the > IApplicationSettings interface (ie, set error pages, page expired etc). > > Maybe I turn it on in production, but you only get the full stack trace if > you have a certain permission (ie, Role = admin). > > Again, I'm unsure this is not exposed. > > > > igor.vaynberg wrote: > > > > because one page is meant for production use and another for > > development. you dont want your end customers seeing your stacktrace > > do you? > > > > -igor > > > > -- > View this message in context: > http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16760013.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Swarm/Wasp or wicket-auth-roles or ?
Guys, I need some suggestions as to which of the above would be the right framework for the the application i am currently working on..Some important fact which would help are as follows : 1) All the pages in the application would be secure and hence would require authentication. 2) There would be two type of users accessing the application. For now, i see access being restricted on the whole page itself rather on more granular components. But later down the road that would come in too as the scope increases. 3) IMP - The application has to support inter-operability with some other external apps. Now these (non java) external apps already have their own mini authentication framework and thats what i will be using for user authentication. So basically for all my Secure Pages i would have to redirect to the LoginPage part of these external apps (and not wicket), I hope thats possible ? , i believe it is with SWARM, some hints would be really appreciated on that too. A bit on the authentication mechanism, so basically on succesful login, this external app would 1) encode an authtoken in the url 2) transfer the control over to my wicket app, and thats where i would check if it is a valid/authenticated user based on the authToken. Later on we plan to change this though, and instead have the authtoken passed over in the cookie instead. Initially when i started of i wasnt planning to use any of the above frameworks but than taking a look into SWARM made me feel like that it might be a good choice, but would still want to have everyones opinion Please comment.. Thanks in advance -- View this message in context: http://www.nabble.com/Swarm-Wasp-or-wicket-auth-roles-or---tp16760342p16760342.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
Ok ill stay with what I have then because it will work when you enhance your respond method :) I do not think being able to skin or extend the ExceptionErrorPage is "so custom" as to be unsupported, but I do have an ugly solution that works around this shortcoming. Rgds Ned igor.vaynberg wrote: > > sounds to me like what you should do is simply subclass > webrequestcycleprocessor and override the entire > respondonruntimeexception() and ignore whatever is in the app > settings. simply return your own page that would inspect the user and > based on that display the general message and maybe the stacktrace if > appropriate. it can also take the applicaton's deployment mode if you > want. > > sounds to me like what you want is so custom there is no positive > reason to reuse what is already there. > > -igor > -- View this message in context: http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16760381.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!
the unusual part here is that you want a stacktrace page to be outwards facing. 99% usecase is that it is reserved for development mode only. that is why we have settings for this. we cant possibly accomodate every possible usecase, add every possible option, it would bloat the framework. -igor On Thu, Apr 17, 2008 at 11:17 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > Ok ill stay with what I have then because it will work when you enhance your > respond method :) > > I do not think being able to skin or extend the ExceptionErrorPage is "so > custom" as to be unsupported, but I do have an ugly solution that works > around this shortcoming. > > Rgds > > Ned > > > > igor.vaynberg wrote: > > > > sounds to me like what you should do is simply subclass > > webrequestcycleprocessor and override the entire > > respondonruntimeexception() and ignore whatever is in the app > > settings. simply return your own page that would inspect the user and > > based on that display the general message and maybe the stacktrace if > > appropriate. it can also take the applicaton's deployment mode if you > > want. > > > > sounds to me like what you want is so custom there is no positive > > reason to reuse what is already there. > > > > -igor > > > > -- > View this message in context: > http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16760381.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: client side handling of ajax request session expiration
Hi Ywtsang, Not an answer to your question, but you can also consider using a ajax timer to keep the session alive. For example as outlined in http://chillenious.wordpress.com/2007/06/19/how-to-create-a-text-area-with-a-heart-beat-with-wicket/. Regards, Erik. ywtsang wrote > we want to handle session expiration exception triggered by an ajax request > > since the session is expired, the ajax request can't be forwarded to the > corresponding ajax behavior, instead, the server throw session expiration > exception > (we have configured the handling by > getApplicationSettings().setPageExpiredErrorPage) > > the handling is ok for non-ajax request, but not ajax request > > we want to handle that using client side javascript > > how can we achieve that? > > -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SWARM OR wicket-auto-roles ?
Guys, I need some suggestions as to which of the above would be the right framework for the the application i am currently working on..Some important fact which would help are as follows : 1) All the pages in the application would be secure and hence would require authentication. 2) There would be two type of users accessing the application. For now, i see access being restricted on the whole page itself rather on more granular components. But later down the road that would come in too as the scope increases. 3) IMP - The application has to support inter-operability with some other external apps. Now these (non java) external apps already have their own mini authentication framework and thats what i will be using for user authentication. So basically for all my Secure Pages i would have to redirect to the LoginPage part of these external apps (and not wicket), I hope thats possible ? , i believe it is with SWARM, some hints would be really appreciated on that too. A bit on the authentication mechanism, so basically on succesful login, this external app would 1) encode an authtoken in the url 2) transfer the control over to my wicket app, and thats where i would check if it is a valid/authenticated user based on the authToken. Later on we plan to change this though, and instead have the authtoken passed over in the cookie instead. Initially when i started of i wasnt planning to use any of the above frameworks but than taking a look into SWARM made me feel like that it might be a good choice, but would still want to have everyones opinion Please comment.. Thanks in advance -- View this message in context: http://www.nabble.com/SWARM-OR-wicket-auto-roles---tp16760752p16760752.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form clear
Hi! I have an user Form that is posted with AjaxFallbackButton. When the forms gets submitted without error I want to clear the form. How can I reset the form? -- View this message in context: http://www.nabble.com/Form-clear-tp16760778p16760778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]