Re: Relative Path and Resource loading in wicket

2012-11-16 Thread Martin Grigorov
On Fri, Nov 16, 2012 at 7:55 AM, delta458 delta...@hotmail.com wrote: Hello, Im sitting now 6 hours non-stop on this problem and cant get it work. I want a simple thing. I have a Invoice.js file in my resource folder. I want to get this file and write something to it: so I did: /

Re: CouldNotLockPageException in production

2012-11-16 Thread Martin Grigorov
Hi, Look again in the logs. Next to this exception there is another one explaining which thread keeps a reference to the page for more than one minute. References: org.apache.wicket.settings.IExceptionSettings#setThreadDumpStrategy org.apache.wicket.settings.IRequestCycleSettings#getTimeout On

Re: Asking for user confirmation - Wicket 6

2012-11-16 Thread Dieter Tremel
Am 15.11.2012 18:47, schrieb Sven Meier: ajaxCallListener.onPrecondition(return confirm('are you sure'?);); I made a test and found the small Typo, should be: ajaxCallListener.onPrecondition(return confirm('are you sure?');); Dieter

Add filter serch in datatable sortable

2012-11-16 Thread anton
someone can lend a hand. I found this example but is for a single datatable. http://www.javabeat.net/2011/04/displaying-data-using-datatable-in-apache-wicket/ paragraph filtering. ??? -- View this message in context:

Re: CouldNotLockPageException in production

2012-11-16 Thread Alfonso Quiroga
Martin, thank you, I could resolve this problem yesterday, I share the solution because it helps somebody We have a backend, and in some custom searches it can take 50 or 60 seconds (or more) to get the results. When the backend is searching, and the user press BACK BUTTON, we've a strategy that

Re: Wicket and file upload with blueimp jquery file upload

2012-11-16 Thread Raul
I solved the problems I had, modifying the main.js file of the demo, as follows. $(function () { 'use strict'; $('#${componentMarkupId}').fileupload({ url: '${url}', paramName: '${paramName}', singleFileUploads: true, maxFileSize: 500,

Re: Asking for user confirmation - Wicket 6

2012-11-16 Thread Nick Pratt
Thanks - I noticed that also - the wiki entry has the correct code. Nick On Fri, Nov 16, 2012 at 4:26 AM, Dieter Tremel tre...@tremel-computer.dewrote: Am 15.11.2012 18:47, schrieb Sven Meier: ajaxCallListener.onPrecondition(return confirm('are you sure'?);); I made a test and found the

Re: retriving the actual page instance

2012-11-16 Thread Martin Grigorov
Hi, The official way is: session.getPageManager().getPage(pageId) This will look in the httpsession and fallback to disk. On Fri, Nov 16, 2012 at 4:33 PM, Alfonso Quiroga alfonsose...@gmail.comwrote: Hi, is there a way to get the actual IRequestablePage? I have only one, and if I debug the

Re: Relative Path and Resource loading in wicket

2012-11-16 Thread delta458
@Ernest I just need to write some variables to the .js file like var price; var user; @MartinGrigorov so what should I do to make this work? How can I set my resource to the classpath? and what should I call to make it work? -- View this message in context:

Re: retriving the actual page instance

2012-11-16 Thread Alfonso Quiroga
Martin, thank you again! This helps me a lot! what I dislike is that I need to know the page id, is there a way to know the last page id? by now.. I'll put this id in the session On Fri, Nov 16, 2012 at 11:47 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, The official way is:

Re: retriving the actual page instance

2012-11-16 Thread Martin Grigorov
Why do you need this functionality ? On Fri, Nov 16, 2012 at 5:54 PM, Alfonso Quiroga alfonsose...@gmail.comwrote: Martin, thank you again! This helps me a lot! what I dislike is that I need to know the page id, is there a way to know the last page id? by now.. I'll put this id in the

Re: retriving the actual page instance

2012-11-16 Thread Alec Swan
I used this approach https://cwiki.apache.org/WICKET/requestcycle-in-wicket-15.html to retrieve the last page instance from request cycle. 1. Register handler in your Application: getRequestCycleListeners().add(new PageRequestHandlerTracker()); 2. Retrieve page as follows: IPageRequestHandler

Re: Relative Path and Resource loading in wicket

2012-11-16 Thread Alec Swan
I had a similar problem and considered Martin's approach, but ended up creating a div wicket:id=myVar class=myVarvar value/div on my page and accessed it from JS file using $(div.myVar).text() or something like that. The advantage of div approach is that you can test it statically without

Re: retriving the actual page instance

2012-11-16 Thread Alfonso Quiroga
Thanks to both. Alec approach worked for me in other case, not in this one. In this case, we had the problem that StaleException was rising, when user open multiple tabs with the same session (like Firefox) In that case, I was invalidating the whole session and redirecting to login. But now, the

how to fix this error in wicket app

2012-11-16 Thread saty
[12:52:52.119] Wicket.Ajax: FunctionsExecuter.processNext: [Exception... Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIObserverService.addObserver] nsresult: 0x80004002 (NS_NOINTERFACE) location: JS frame :: resource:///components/ConsoleAPI.js :: CA_init :: line 57 data: no]

Re: how to fix this error in wicket app

2012-11-16 Thread Timo Schmidt
On Fri 16.11.2012 10:51, saty wrote: I have this additional info on wicket debug panel. [ ... ] ERROR: FunctionsExecuter.processNext: InternalError: too much recursion ERROR: FunctionsExecuter.processNext: [Exception... Component returned failure code: 0x80004002 (NS_NOINTERFACE)

Re: any book about wicket 6?

2012-11-16 Thread Andrea Del Bene
I didn't write an article on tree components yet :) , but I've built a very basic example for NestedTree. The code is quite simple and it uses both nodes and model from Swing package (like the old Tree component). You can find it here:

update webmarkupcontainer from fragment , container onBeforeRender() method is not being called

2012-11-16 Thread fachhoch
I have a fragment with a link inside, onclick of this link I want to update a webmarkupcontainer in my page for which I add this container to the target. surprisingly its not calling onBeforeRender() method of this container, in ajaxdebug window I see the container mark in the response ? I

Re: Access to markup

2012-11-16 Thread Andrea Del Bene
Take a look at Component's method onComponentTagBody. One of its parameters is MarkupStream which provides access to previous tags (it has method getPreviousTag()). Is it possible to get access to the markup of preceding elements in a Component's rendering? Im wondering if I can detect the