RadioGroup to select DataTable rows, any example?

2008-09-03 Thread Martin Dietze
Hello, I am still fairly new to Wicket and currently trying to create a table with a still unknown number of entries from which one row can be selected. I created a table using the DefaultDataTable class, was able to fill it using PropertyColumn for data columns and AbstractColum for links (e.g.

Interfaces for component hierarchies (e.g. Buttons)?

2008-10-07 Thread Martin Dietze
Hi, I am currently running into the following: I extend the button class by a snappy foo-feature. I build stuff which uses it. Now I need a foo-ified AjaxButton within this infrastructure. The obvious way to do this is to write an interface FooButton which gives me this foo-feature. However

Addition [Re: Interfaces for component hierarchies (e.g. Buttons)?]

2008-10-07 Thread Martin Dietze
On Tue, October 07, 2008, Martin Dietze wrote: Just wondering, whould it be a good idea to add such interfaces to the Wicket-API? Or am I missing something? commenting on my comments: (1) This would of course mean to interface-ify basically the whole component type hierarchy, since

Re: Interfaces for component hierarchies (e.g. Buttons)?

2008-10-07 Thread Martin Dietze
On Tue, October 07, 2008, Jeremy Thomerson wrote: Depending on what you are doing, you may want to try implementing the foo feature code as a behavior. Behaviors are like plugins for components, and can be used on any component. So, if it is possible to implement your functionality as a

Re: Interfaces for component hierarchies (e.g. Buttons)?

2008-10-08 Thread Martin Dietze
On Tue, October 07, 2008, Jeremy Thomerson wrote: Maybe supply some code as an example of what you're doing. I really didn't understand your scenario below. See the code below. I use a button panel which allows me to setup form buttons in different ways within a page class hierarchy, i.e. an

Validation: merging wicket and BL validation in Form

2009-09-17 Thread Martin Dietze
Hi, in our project we use a javax.validation implementation for validating our forms. However there are some cases in which we need to consider some information from wicket, like conversion errors etc. Thus merging Wicket's and our own validation results becomes an issue. A reasonable approach

FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread Martin Dietze
Hi, I recently upgraded to wicket 1.4.3 as I heard that from version 1.4.1 and above file uploads are seamlessly handled even in Ajax based components. I now implemented a ModalWindow-based component with a Form, in it an ordinary FileUploadField and an AjaxButton for submitting the form. I

Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread Martin Dietze
On Mon, November 30, 2009, Stefan Lindner wrote: And it works fine. With all browsers. Does it work without ModalWindow? I've had no time to check yet. The last thing I did today was try out the ajax upload example from wicketexamples which worked. I'll take a look at the sources tomorrow and

Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-01 Thread Martin Dietze
On Tue, December 01, 2009, TahitianGabriel wrote: It looks like a bug, so maybe you can open a jira... Just added WICKET-2595. This bug may be related to WICKET-2433, but that one was supposed to be fixed in Wicket 1.4.2 while this problem was observed with 1.4.3. Cheers, M'bert --

onSubmit() not entered (IE6 and IE7)

2009-12-16 Thread Martin Dietze
I have repeatedly run into situations like this one: On very complex pages with lots of Ajax-stuff I sometimes get to a point where (reproducably) my form's onSubmit() method is never entered when submitting the form with a simple submit button. This problem occurs in IE6 and IE7. Usually as a

Re: onSubmit() not entered (IE6 and IE7)

2009-12-16 Thread Martin Dietze
On Wed, December 16, 2009, Douglas Ferguson wrote: On Dec 16, 2009, at 7:42 AM, Martin Dietze wrote: I have repeatedly run into situations like this one: On very complex pages with lots of Ajax-stuff I sometimes get to a point where (reproducably) my form's onSubmit() method

Palette: how to track which entries in either choices element are selected?

2009-12-23 Thread Martin Dietze
For some very special usecase I need a Palette which allows me to track via Ajax which entries in either choices element are selected as long as I have not submitted the form. Just to clarify things: 'selected' in this context does not denote the elements in the 'selected' choices element but

Re: Palette: how to track which entries in either choices element are selected?

2009-12-23 Thread Martin Dietze
On Wed, December 23, 2009, nino martinez wael wrote: From a very vague memory, it has a delimited number of choices in a string or something (in java script).. Yes, there's a lot of JS stuff involved. But since the Choices class is a FormComponent, should I not - if I attach an

Repost: Track selected entries in either of a Palette's Choices components?

2009-12-25 Thread Martin Dietze
I desperately need to find out which entries in a Palette's two Choices components are selected, e.g. to allow additional operations on them using Ajax. As I attached an OnChangeAjaxBehaviour to both of them I expect to be able to access this information just as after a form submit, but of

Solved: Track selected entries in either of a Palette's Choices components?

2010-01-05 Thread Martin Dietze
On Fri, December 25, 2009, Martin Dietze wrote: I desperately need to find out which entries in a Palette's two Choices components are selected, e.g. to allow additional operations on them using Ajax. I solved this issue. First of all: currently the AbstractOptions class used by Palette does

Building 1.3.6 from the source, test failures

2009-05-18 Thread Martin Dietze
Hi, I just checked out wicket 1.3.6 from the svn, changed into the wicket-1.3.6 directory, ran `mvn package' and ran across these test failures: Failed tests: test_1(org.apache.wicket.markup.html.header.testing.HeaderTest)

Re: Building 1.3.6 from the source, test failures

2009-05-19 Thread Martin Dietze
On Mon, May 18, 2009, Martijn Dashorst wrote: [quote order fixed] On Mon, May 18, 2009 at 4:49 PM, Martin Dietze d...@fh-wedel.de wrote: �I just checked out wicket 1.3.6 from the svn, changed into the wicket-1.3.6 directory, ran `mvn package' and ran across these Don't run the tests

Re: Building 1.3.6 from the source, test failures

2009-05-19 Thread Martin Dietze
On Tue, May 19, 2009, Martijn Dashorst wrote: http://lmgtfy.com/?q=wicket+java+6+fails+unit+tests gives you: https://issues.apache.org/jira/browse/WICKET-708 And in comment [1] Juergen says: This is due to java 1.6. The hashmap hash code implementation has changed which leads to a

File retrieval vulnerabilities, bugs #1992, #1996

2009-05-19 Thread Martin Dietze
Hi, I just ported the patch fixing #1992 and #1996 back to Wicket 1.3.6. Unfortunately there is still a different issue which may or may not be related to these two. If, for instance, you open the hello world example app and append the string

Re: File retrieval vulnerabilities, bugs #1992, #1996

2009-05-22 Thread Martin Dietze
On Thu, May 21, 2009, Igor Vaynberg wrote: we should backport 1992, please open a jira issue to do that. I've already done this. I am currently investigating how I can block particular file types (the hint you gave in your second reply may be helpful here). Once I am confident that my backport

Re: File retrieval vulnerabilities, bugs #1992, #1996

2009-05-22 Thread Martin Dietze
On Thu, May 21, 2009, Igor Vaynberg wrote: we should backport 1992, please open a jira issue to do that. I just appended my backport to #1992, see [1]. I hope that's OK, I can still open a new jira if this is the preferred way to do this. Cheers, Martin [1]

Update rules in PackageResourceGuard

2009-05-28 Thread Martin Dietze
Hi, I added my own subclass of PackageResourceGuard to my application which provides a configurable interface to the extensions and file names blacklist. After a while I noticed that if I put e.g. 'xml' on my blacklist, the new rule works for all resources which I have not requested before, but

Re: Update rules in PackageResourceGuard

2009-05-28 Thread Martin Dietze
On Thu, May 28, 2009, Igor Vaynberg wrote: can I enforce a new rule on resources even if they have been delivered before? clear your browser cache. Hmm, that was my first guess, I even accessed the page using a different browser. Cheers, Martin -- --- /

Cache key collisions (IMarkupCacheKeyProvider)

2010-08-24 Thread Martin Dietze
We've recently run into a situation where in an application the wrong markup was provided for a component implementing IMarkupCacheKeyProvider. It is pretty obvious how this happened, see below, but I'd like to ask whether this behaviour is actually what we want or a bug. We have two components,

Re: Cache key collisions (IMarkupCacheKeyProvider)

2010-08-25 Thread Martin Dietze
On Tue, August 24, 2010, Igor Vaynberg wrote: IMarkupCacheKeyProvider is for advanced users. you have to know what you are doing when you implement the interface. OK, that's fine with me. Why not add a comment to the interface stating just this plus a hint that in general adding the fully

Visibility change via Ajax does not apply in IE9

2012-07-18 Thread Martin Dietze
Not sure if this is a known issue, in a project using wicket-1.4.7 I have a page with an upload field which is triggered by an Ajax button. After upload some information about the upload is supposed to be made visible via Ajax. The component containing the form has outputMarkupId set to true, and

Migration issue: code using MarkupStream.findCOmponentINdex

2013-02-13 Thread Martin Dietze
I am currently migrating a project based on Wicket 1.4 to 6.60. At some point in that project we have this code: | class Foo extends Panel { | // ... | private boolean hasFragment( final String fragmentId, final MarkupStream markupStream ) { | final boolean found =

Re: Migration issue: code using MarkupStream.findCOmponentINdex

2013-02-14 Thread Martin Dietze
On Wed, February 13, 2013, Francois Meillet wrote: private boolean hasFragment(final String id, final Markup markup) { return markup.find(id) != null; } hope this help Thanks a lot! M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Old

6.0 Migration issue: wrap Wicket Ajax JS-code as previously with AjaxCallDecorators

2013-02-14 Thread Martin Dietze
In the project I'm currently migrating from Wicket 1.4 to 6.6 I have a few pieces of code where AjaxCallDecorator instances would wrap the Wicket-genrated JS code as shown in this little example: | return new AjaxCallDecorator() { | | @Override | public CharSequence decorateScript(

Re: 6.0 Migration issue: wrap Wicket Ajax JS-code as previously with AjaxCallDecorators

2013-02-15 Thread Martin Dietze
On Thu, February 14, 2013, Fred!!! wrote: it's possible to set an throtteling delay by Wicket AjaxRequestAttributes. Have a look at https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax#WicketAjax-AjaxRequestAttributes Something like this: new AjaxEventBehavior(onkeydown){

Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

2013-02-15 Thread Martin Dietze
Another thing I am stuck trying to port my project from Wicket 1.4.x to 6.6.0 is DND-mechanics which so far had been implemented using wiquery 1.2. As I see the 'DroppableAjaxBehavior' class has disappeared from wiquery since the 6.0 release. However no mention could be found on either migration

Re: Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

2013-02-18 Thread Martin Dietze
On Fri, February 15, 2013, Emond Papegaaij wrote: DroppableBehavior is the replacement of DroppableAjaxBehavior. You use it like this: final DroppableBehavior droppableBehavior = new DroppableBehavior(); droppableBehavior.setDropEvent( new AjaxDropCallback() { protected void

Migration issue: page that writes binary data to the response

2013-02-18 Thread Martin Dietze
In the project I'm currently porting from 1.4.x to 6.6.0 I've run into an issue with Wicket pages which stream binary data into the WebResponse (e.g. ZIP archives created on the fly). First thing I found was that obviously I *have* to create templates for these pages even though they are not

Re: Migration issue: page that writes binary data to the response

2013-02-18 Thread Martin Dietze
On Mon, February 18, 2013, Carl-Eric Menzel wrote: Is there a particular reason you're using a page? One - unfortunately - big reason: it's legacy code (most of which I did not even write myself). The Wicket upgrade is badly needed for browser compatibiy, however I don't want to change code if

Re: Migration issue: page that writes binary data to the response

2013-02-19 Thread Martin Dietze
On Mon, February 18, 2013, Carl-Eric Menzel wrote: For generating binaries, I would *really* recommend doing this change. Pages simply are not a good fit for that. Also, it shouldn't be that big of a change, since you're writing to the Response anyway. Within AbstractResource's WriteCallback

Re: Migration issue: page that writes binary data to the response

2013-02-19 Thread Martin Dietze
On Tue, February 19, 2013, Martin Grigorov wrote: You can use requestCycle.replaceAllRequestHandlers(new ResourceRequestHandler(new ByteArrayResource(byteArray))) in your page code. This will stop the page rendering and will return the byte[] from this response. You can still configure the

Re: Migration issue: page that writes binary data to the response

2013-02-19 Thread Martin Dietze
On Tue, February 19, 2013, Martin Grigorov wrote: This is how it works. #replaceAllRequestHandlers() throws an exception to stop doing whatever it does at the moment. #scheduleRequestHandlerAfterCurrent() just appends a new RH to the list and executes it when all previous are executed.

Style question: onInitialize() vs. onBeforeRender()

2013-02-20 Thread Martin Dietze
While porting my project from 1.4.x to 6.6.0, I've stumbled across the onInitialize() method which is now recommended for initializing components which need access to the page instance etc. In my project this had so far been done in onBeforeRender() (and this seems to still work fairly well). Is

Migration issue: fire AjaxFormComponentUpdatingBehavior(change) by Javascript the Wicket 6 way?

2013-02-22 Thread Martin Dietze
I understand that with Wicket 6 the event handlers are no longer inline, thus calling input.onchange() will no longer work. But what do I now do instead? I have hand-written inputs which rely on onchange() being called via Javascript after user interaction. So what do I have to call inside my JS

Re: Render script tag for jQuery before all other Javscript statements in the header?

2013-02-22 Thread Martin Dietze
On Fri, February 22, 2013, Martin Grigorov wrote: Read http://wicketinaction.com/2012/07/wicket-6-resource-management/ Thanks, did so. I modified my code according to the example found here:

Re: Render script tag for jQuery before all other Javscript statements in the header?

2013-02-22 Thread Martin Dietze
On Fri, February 22, 2013, Martin Grigorov wrote: At the bottom of the article there is a link to a demo application. See https://github.com/martin-g/blogs/blob/master/wicket6-resource-management/src/main/java/com/wicketinaction/ResourceManagementApplication.java#L100 But much simpler will

JavsScriptUtils.writeJavaScript() in onRender() after Ajax updates

2013-02-22 Thread Martin Dietze
I've implemented a live search functionality where after changes the search results get displayed in a flyout menu. In the search results I add a css class to the search terms for highlighting them. This is done in the onRender() method: | public abstract class LiveSearchResultsFragment extends

Re: JavsScriptUtils.writeJavaScript() in onRender() after Ajax updates

2013-02-24 Thread Martin Dietze
On Fri, February 22, 2013, Sven Meier wrote: Which Wicket version? Is this rendered on an Ajax request? It's Wicket 6.6.0, and, yes, it's rendered on an Ajax request. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Steht ein Bratscher vor

Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
OK, I've changed the subject, as it seems like I'm running into a more general issue here. The original issue was JS code rendered into a flyout with search results in my application never made it into the markup the browser actually sees. Now I've identified another problem which seems identical

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: Such kind of code should really be executed within #renderHead() with OnDomReadyHeaderItem. Don't let any JS try to use your HTML DOM elements before the DOM is available. Thank you, in this case I get a Wicket Ajax error: | Wicket.Ajax:

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Dietze wrote: Thank you, in this case I get a Wicket Ajax error: | Wicket.Ajax: Wicket.Head.Contributor.processScript: [CKEDITOR.editor.replace] The element with id or name valueb54 was not found.: eval - if (CKEDITOR.instances['valueb54

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: The Ajax response processing looks like: - execute prependJavaScripts - replace components - execute ondomready scripts - execute appendJavascripts I.e. the component DOM element must be there. Show us your new code. Thanks, it's here:

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: replace with: response.render( OnDomReadyHeaderItem.forScript( script ) ); OK, did that. Now I am running into a different error when I press save on my editor component. For this event I have an AjaxCallListener like this: |

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: | AjaxCallListener myAjaxCallListener = new AjaxCallListener(); | myAjaxCallListener.onBeforeSend( return for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); ); except the leading return all looks OK to

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: Well, I have written a Wiki page and few blog articles about the changes in Wicket 6 but it seems you haven't read them before asking :-) I understand your point well, I myself have often spent lots of time writing documentation which people

Infinite Scrolling in Wicket 6

2013-02-27 Thread Martin Dietze
I will soon have to implement infinite scrolling in my project and would thus like to know if there are already libraries or code snippets for this based on Wicket 6? What I found after a quick search was oegyscroll [1], but this seems to be based on Wicket 1.4.x. But as this feature is

Timer-based update to various regions in a page - best approach?

2013-03-07 Thread Martin Dietze
My customer wants me to rewrite an existing application in a way, that the various regions (drag-and-droppable panels) are all updated every xy seconds (most of these panels contain things like list views with search results, the user's mailbox etc.). Following a - what I would call - naive

Re: Timer-based update to various regions in a page - best approach?

2013-03-07 Thread Martin Dietze
On Thu, March 07, 2013, Martin Grigorov wrote: Or you can use one Ajax timer that broadcasts an event to all components in the page and each component can decide whether to add itself to the target or not. That looks pretty interesting. If I understand you correctly, they would all add

Re: Timer-based update to various regions in a page - best approach?

2013-03-07 Thread Martin Dietze
On Thu, March 07, 2013, Sven Meier wrote: Our customer can live with the limitations of this solution: As long as the user doesn't do anything, he won't see any updated data. Unfortunately, ours won't :/ Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org /

Wicket 6: AjaxFormComponentUpdatingBehavior on dropdown leads to page reload

2013-03-08 Thread Martin Dietze
I've just spent several hours trying to debug a rather strange effect with a dropdown and a AjaxFormComponentUpdatingBehavior. I have a component which is used in several places of the system. It contains a dropdown to which a AjaxFormComponentUpdatingBehavior is added. Whenever the user selects

Re: Wicket 6: AjaxFormComponentUpdatingBehavior on dropdown leads to page reload

2013-03-09 Thread Martin Dietze
On Sat, March 09, 2013, Bernard wrote: I would try to debug the constructor of the page and/or override and debug life cycle methods of the page and then work up the call stack why they are executed. Thank you for your reply. Having slept a night over it I found the problem. Like a couple of

Migration issue: update templates in a running system

2013-03-25 Thread Martin Dietze
I recently upgraded a legacy project from Wicket 1.4 to 6.6. In that project we provide a test system to our HTML designers, set up as follows: whenever a change is committed into the git, the test system pulls those changes and copies templates, JS and CSS files into the webapp. It seems like

Re: Migration issue: update templates in a running system

2013-03-25 Thread Martin Dietze
On Mon, March 25, 2013, Martin Grigorov wrote: Wicket reloads HTML templates only when running in Development mode. Do you run your app in Dev mode ? Yes, I do. And I did see some changes coming through (like adding a CSS-class to a div etc.), but today I was asked by our HTMLer, and like him

./. from UrlRenderer.renderUrl()

2013-03-26 Thread Martin Dietze
I found that in some situations, when Component.continueToOriginalDestination is called, the InterceptionData object used there internally points to the home page, i.e., the path element is empty. In that case the RequestCycle's UrlRenderer.renderUrl() produces ./.. This URL seems to cause

Re: ./. from UrlRenderer.renderUrl()

2013-03-26 Thread Martin Dietze
On Tue, March 26, 2013, Martin Grigorov wrote: Which version of Wicket do you use ? 6.6.0 Can you reproduce the problem in a demo application? If YES - please attach it to a ticket in Jira. Thanks! I'll have a look. Cheers, M'bert -- --- /

Re: ./. from UrlRenderer.renderUrl()

2013-03-28 Thread Martin Dietze
On Tue, March 26, 2013, Martin Grigorov wrote: Can you reproduce the problem in a demo application? If YES - please attach it to a ticket in Jira. Thanks! https://issues.apache.org/jira/browse/WICKET-5123 M'bert -- --- / http://herbert.the-little-red-haired-girl.org / -

Use Wicket to construct URLs from batch jobs

2013-04-04 Thread Martin Dietze
I recently migrated my legacy project from Wicket 1.4 to 6.6. In this project there is a batch job for sending out newsletters. As you might expect, in those newsletters there are links to contents from the system. In the old system this was done like this (1.4 code): | public CharSequence

Re: Use Wicket to construct URLs from batch jobs

2013-04-04 Thread Martin Dietze
On Thu, April 04, 2013, Martin Grigorov wrote: You can pass the application name (application.getName()) to the manually started threads and later use it to lookup the Application when needed: Application.get(appName). If you can understand Scala then you can use

Overriding Form.onFileUploadException in nested forms

2013-04-10 Thread Martin Dietze
I am using Wicket 6.6.0, and I'm running into a nasty problem with upload sizes. In a complex editor, there is an upload component which itself contains a Form with an AjaxButton for triggering the upload. If the upload exceeds the allowed max size, the SizeLimitExceededException is caught in

After upgrade to Wicket 6: lots of 'java.io.IOException: Connection reset by peer' in my logs

2013-04-16 Thread Martin Dietze
After upgrading to Wicket 6, I am getting too many of exceptions like the ones below. They 'happen' either when delivering static contents, like Javascript files (via resource references) or even media contents like images or movies which are written into the response. I've appended two

Re: After upgrade to Wicket 6: lots of 'java.io.IOException: Connection reset by peer' in my logs

2013-04-16 Thread Martin Dietze
On Tue, April 16, 2013, Martin Grigorov wrote: Does these errors happen in any browser or only in IE ? I remember such problem in IE - the browser renders the page in modeX and during download of the resources switches to modeY, so it closes the opened connections and downloads the resource

Re: After upgrade to Wicket 6: lots of 'java.io.IOException: Connection reset by peer' in my logs

2013-04-16 Thread Martin Dietze
On Tue, April 16, 2013, Martin Grigorov wrote: I'm not sure what redirect you mean. I was referring to the fact that the error page was called here: | ERROR 2013-04-15T12:29:35 [http-thread-pool-443-(36)] my.company.app.ui.pages.error.ErrorPage [USER.8619]

May Ajax handlers in Wicket 6 slow down rendering?

2013-05-02 Thread Martin Dietze
Since Wicket 6 introduced jQuery as backend for Ajax, there are now rather many jquery-libraries included and there are rather long blocks of Javascript code executed at domready. One of our HTML designers now expressed his concern that on rather complex pages like ours this approach may slow

Re: May Ajax handlers in Wicket 6 slow down rendering?

2013-05-02 Thread Martin Dietze
Than you for your help! On Thu, May 02, 2013, Martin Grigorov wrote: long blocks of Javascript code executed at domready. This depends on how many Ajax components/behaviors you have in your page and how many OnDomReadyHeaderItems are contributed. If you use JavaScript event delegation

Tests based on WicketTester: NPE in ConcatBundleResource.readAllResources

2013-09-06 Thread Martin Dietze
I am currently trying to repair some old tests (which I did not even write myself) based on AbstractWicketTest and WicketTester. At the moment all tests derived from AbstractWicketTest or using TestNGWicketTester fail with some exception inside Wicket. Since I am rather unfamiliar with the wicket

Re: Tests based on WicketTester: NPE in ConcatBundleResource.readAllResources

2013-09-06 Thread Martin Dietze
On Fri, September 06, 2013, Martin Grigorov wrote: Is there a chance that you create a bundle without any resource(reference) ? Not quite sure I understand this correctly, I tried avoiding the use of the ConcatBundleResource altogether by overriding the method that creates it in my Application

Re: Test based on AbstractWicketTest fails with No RequestCycle is currently set

2013-09-06 Thread Martin Dietze
On Fri, September 06, 2013, Martin Grigorov wrote: 2. #testAddingAndSwitchingFields you look at the wrong test we cannot help you when we have the wrong source given Yes, sorry, I picked the wrong stacktrace, however they're all identical anyway. The method 'testAddingAndSwitchingFields'

Re: Test based on AbstractWicketTest fails with No RequestCycle is currently set

2013-09-09 Thread Martin Dietze
On Sat, September 07, 2013, Martin Grigorov wrote: com.mycompany.request.WicketContainerChecker.onInstantiation(WicketContainerChecker.java:48) What is this doing ? Does it start a new thread by chance ? Or doing something like: ThreadContext.detach() /

Re: Tests based on WicketTester: NPE in ConcatBundleResource.readAllResources

2013-09-09 Thread Martin Dietze
On Sat, September 07, 2013, Martin Grigorov wrote: Is there a chance that you create a bundle without any resource(reference) ? Not quite sure I understand this correctly, In YourApplication#init() you something like: getResourceBundles().addXyzBundle(Class, String,

Re: Test based on AbstractWicketTest fails with No RequestCycle is currently set

2013-09-09 Thread Martin Dietze
On Mon, September 09, 2013, Martin Dietze wrote: No, nothing of that kind. It's just a helper to make sure noone uses Ajax on components which are added to the markup as wicket:container wicket:id=../wicket:container OK, that one is solved, too. After replacing the Application used

Adding Wicket to an existing project with Guice

2013-10-10 Thread Martin Dietze
On a legacy project, there are two web frameworks in use, one for the frontend, one for the backoffice application. This project already uses Guice which is instanciated by a ContextListener which also does some initialisation code, like pulling up some particular Guice beans. Now in this project

Re: Adding Wicket to an existing project with Guice

2013-10-10 Thread Martin Dietze
On Thu, October 10, 2013, Martin Grigorov wrote: You can use org.apache.wicket.guice.GuiceComponentInjector#GuiceComponentInjector(Application app, Injector injector) constructor. I.e. in MyApp#init() do: getComponentInstantiationListeners().add(new GuiceComponentInjector(this,

Rendering a component into a String

2013-11-13 Thread Martin Dietze
In a legacy project I've inherited I've got a piece of code that no longer works since the project was upgraded from Wicket 1.4 to Wicket 6. It's about rendering a component (a Wicket panel) into a string in order to return it wrapped into a webservice reply. The webservice is based on Wicket,

Re: Rendering a component into a String

2013-11-13 Thread Martin Dietze
On Wed, November 13, 2013, Martin Grigorov wrote: See the source of http://www.wicket-library.com/wicket-examples-6.0.x/mailtemplate/?2 example In short: instanciate my component, put it into a ComponentRenderer, be happy. That was astonishingly simple :) Cheers, M'bert -- --- /

FileUPloadField alternatives?

2013-11-25 Thread Martin Dietze
In my project I am experiencing IE8 crashes at (Ajax-based) file upload. This happens with some particular machines my client uses, and, no, replacing them is (unfortunately) not an option. I am therefore exploring alternatives, hoping that e.g. a flash- or javascript-based upload might not lead

Re: FileUPloadField alternatives?

2013-11-25 Thread Martin Dietze
On Mon, November 25, 2013, Martin Grigorov wrote: In my project I am experiencing IE8 crashes at (Ajax-based) file upload. This happens with some particular machines my client uses, and, no, replacing them is (unfortunately) not an option. Can you explain what is the issue ? Maybe

Re: FileUPloadField alternatives?

2013-11-25 Thread Martin Dietze
On Mon, November 25, 2013, Martin Grigorov wrote: I guess that the problem is in https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=cc#L856 If I understand this correctly I might get away by producing a deployable

Re: FileUPloadField alternatives?

2013-11-26 Thread Martin Dietze
On Tue, November 26, 2013, Martin Grigorov wrote: If I understand this correctly I might get away by producing a deployable in which that line is simply commented out (as it is intended for Chrome compatibility only)? Also, in a second No. This line is important to process the Ajax XML

Re: FileUPloadField alternatives?

2013-11-26 Thread Martin Dietze
On Tue, November 26, 2013, Martin Grigorov wrote: If you have some more ideas, I'd greatly appreciate this. Try with MultiFileUploadField - http://www.wicket-library.com/wicket-examples-6.0.x/upload/multi?0 No change, still freezes... M'bert -- --- /

Running a TestNG test suite from a wicket page

2013-11-29 Thread Martin Dietze
As in my project a number of resources are only available within the running web application (e.g. message queues and DB access are provided by the Glassfish application server), I would like to run a TestNG suite from a wicket page, thus allowing me to test pieces of the code that depend on those

Re: Running a TestNG test suite from a wicket page

2013-12-01 Thread Martin Dietze
On Sat, November 30, 2013, Martin Grigorov wrote: Usually when running (WicketTester) tests people provide mock implementations of the external services like MQ, DB, ... It is much easier to return some mock data, either good data or broken, to your application and verify that it behaves

Re: Running a TestNG test suite from a wicket page

2013-12-01 Thread Martin Dietze
On Sun, December 01, 2013, Martin Grigorov wrote: In this case you may want to use Selenium/WebDriver tests. Or any kind of robot that will execute your test scenarios against a running web application. I am using geb for frontend tests. However frontend tests do not really help when testing

Re: Running a TestNG test suite from a wicket page

2013-12-04 Thread Martin Dietze
On Mon, December 02, 2013, Paul Bors wrote: Have you considered Mockito to mock your POJOs for the test data and methods? I use that in conjunction with TestNG and then start the wicket app providing it mocked DAOs and POJOs. I've got pretty strong feelings about such frameworks, bluntly

Strange: Ajax-updates from a form inside a modal dialogue echoed in the page underneath

2014-02-06 Thread Martin Dietze
I've just spent several hours trying to figure out what's going wrong here without any success. I am investigating a very strange effect: In my application I have a search panel in which several dropdowns are used to select search settings. Some of these settings depend on each other, so that

Visual HTML diff in Wicket?

2014-02-06 Thread Martin Dietze
In my system there is an editorial submodule for creating HTML contents. As I am about to add a versioning history to it, I'd like to add some kind of visualisation of what changed from edit to edit. Does anyone here know of something like a library for this that can be used conveniently in a

Re: Strange: Ajax-updates from a form inside a modal dialogue echoed in the page underneath

2014-02-06 Thread Martin Dietze
Martin, thanks a lot for your advice! On Thu, February 06, 2014, Martin Grigorov wrote: Check the Ajax response after selecting a component. It contains ajax-response with component id=... elements. The id attribute is used to find the old HTML element and to replace it with the new

Back button

2014-03-07 Thread Martin Dietze
In my application I have an editor page. Pretty often we run into the problem of users saving their work, then remembering that there was something missing and using their browser's back button to get back into the editor. Since they will be using an old instance of the page with the old object,

Customizing or replacing MultiFileUploadField

2014-06-06 Thread Martin Dietze
I need to extend an existing component using a MultiFileUploadField in a way that the entries created after having selected files allow the user to add some information related to the individual uploads. The intended end result is somewhat like this: [select-button] Caption: blah blah x File 1

WiQuery: positioning a dialog when reusing it

2014-08-15 Thread Martin Dietze
In my application I am using WiQuery's 'Dialog' for a global page dialog that gets constructed in my page base class. Each time I want to show a dialog I embed a different panel in it and then show it. Usually I would like to display smaller dialogs that fit on the screen using

Re: WiQuery: positioning a dialog when reusing it

2014-08-20 Thread Martin Dietze
I have looked into that issue a bit further. On 17 August 2014 17:23, Mihir Chhaya mihir.chh...@gmail.com wrote: I have used WQuery Dialog for Wicket 1.4 and could make it work in center using setMinimumHeight and setMinimumWidth methods when adding dialog. That's true, but this is part of the