Re: Opening a stateful page in a new window/tab with ajax

2019-11-22 Thread mscoon
Thanks for the prompt answer. On Thu, Nov 21, 2019 at 6:38 PM Sven Meier wrote: > Hi, > > that's a perfectly valid usage. > > Have fun > Sven > > > On 21.11.19 13:44, mscoon wrote: > > Hi all, > > > > We are using the following code inside an aj

Opening a stateful page in a new window/tab with ajax

2019-11-21 Thread mscoon
Hi all, We are using the following code inside an ajax callback to create a new page and open it in a new window. Are there any gotchas with respect to how we create MyPage and get the url for it? Is it guaranteed to be found in the user's session when the request for it comes in? void

Re: Java 8 access to effectively final variables/method parameters from anonymous classes

2019-08-04 Thread mscoon
e persisted to the DB > right away. Your ajax link is a good example. Also single-page forms where > the final "Save/Next" button persists the changes to the DB. Whenever we > have a multi-step process (like a wizard) for creating or editing domain > objects, we use custom v

Re: Java 8 access to effectively final variables/method parameters from anonymous classes

2019-08-04 Thread mscoon
Hi, If you don't mind me following up on your comment... > Personally, I rarely encounter serialization issues. None of our domain > objects implement Serializable. They can only be used with > LoadableDetachableModels that only store the identifier. > >> >> Would you mind to elaborate on this

Re: Java 8 access to effectively final variables/method parameters from anonymous classes

2019-08-04 Thread mscoon
for > variables that are implicitly final) > - Checkstyle or similar tools that you can hook into your build process > might have similar inspections > > Best, > > Thomas > > On Sun, Aug 4, 2019 at 9:18 AM mscoon wrote: > > > Hi all, > > > > Java 8

Java 8 access to effectively final variables/method parameters from anonymous classes

2019-08-04 Thread mscoon
Hi all, Java 8 introduced the ability to access effectively final variables/method parameters from anonymous classes without having to add explicitly the "final" keyword. This has resulted in a lot of cases where the programmer does not notice that they are referencing a model object from an

Re: ExportToolbar and caching

2019-04-13 Thread mscoon
o the > data are not reflected in repeated exports. > > We should improve that: > > - no caching as default > - users should be able to change this easily > > Can you create a Jira issue please? > > Thanks > Sven > > > Am 12.04.19 um 11:24 schrieb mscoon: &

ExportToolbar and caching

2019-04-12 Thread mscoon
Hi all, We have run into some problems when using the ExportToolbar the generated file seems to be cached in some browsers so that user's don't get a new version if the table contents change. I think there should be a way to tell the ExportToolbar to call setCacheDuraction(Duration.NONE) to the

Re: AjaxDownloadBehavior with location=blob and greek filenames problems

2019-04-05 Thread mscoon
Thank you! On Fri, Apr 5, 2019 at 1:14 PM Martin Grigorov wrote: > https://issues.apache.org/jira/browse/WICKET-6650 > > On Thu, Apr 4, 2019 at 5:29 PM Sven Meier wrote: > > > > > > > Hi, > > > > > > > > You're right, our JavaScript should decode the filename. > > > > > > > > Please open a

AjaxDownloadBehavior with location=blob and greek filenames problems

2019-04-04 Thread mscoon
Hi all, When using the AjaxDownloadBehavior with Location=Blob and a greek filename, the filename is url encoded. E.g. if the file is "αρχείο.txt" (as defined in ResourceStreamResource.setFilename()), the downloaded file is "%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%BF.txt" which is the url encoded

Re: Undesirable behavior of AutoLabelMarker

2019-02-12 Thread mscoon
Hi Ernesto, Yes, that is possible but it opens the route for lazy initialization exceptions and such problems. Really, why is it so hard to send multiple component values with an ajax request? Maybe an AjaxFormComponentUpdating behavior which can update multiple components? On Mon, Feb 11,

Re: Undesirable behavior of AutoLabelMarker

2019-02-11 Thread mscoon
d()) since onValidateObjectModel checks them and finds them empty Cheers Marios On Mon, Feb 11, 2019 at 9:08 AM Martin Grigorov wrote: > Hi, > > On Sun, Feb 10, 2019 at 10:29 PM mscoon wrote: > > > Hi Martin, > > > > The form reloads the entity from the database (it uses

Re: Undesirable behavior of AutoLabelMarker

2019-02-10 Thread mscoon
gt; its form components. > I think you want to use AjaxForm[Choice]ComponentUpdatingBehavior - it will > submit only the value of the modified field. > > On Fri, Feb 8, 2019 at 2:57 PM mscoon wrote: > > > Hi all, > > > > We have an outer form and an inner form. The inner f

Undesirable behavior of AutoLabelMarker

2019-02-08 Thread mscoon
Hi all, We have an outer form and an inner form. The inner form contains some form components which all have an AjaxFormSubmitBehavior in order to update each - other when the user changes one of them. The actual submitting button is in the outer form. When the AjaxFormSubmitBehavior runs and

Re: How to handle "Service Unavailable" errors in ajax requests

2018-06-15 Thread mscoon
ect will work only if the error page is served by something that > is still up, because "Service Unavailable" means that the web server (e.g. > Tomcat) is down. > > On Mon, Jun 11, 2018 at 3:10 PM, mscoon wrote: > > > Hi all, > > > > I have an AjaxSubmitL

How to handle "Service Unavailable" errors in ajax requests

2018-06-11 Thread mscoon
Hi all, I have an AjaxSubmitLink which fails silently if the back-end server goes away. In debug mode, the ajax debug console shows: ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Service Unavailable This is in Wicket 6.x Is there a way to catch these kinds of errors and show

wicket-rest - logging requests and responses

2018-02-13 Thread mscoon
Hi everyone, Is there an example or some guidelines for logging requests and responses (including request and response headers and body) to resources implemented with wicket-rest-annotations? I'm looking for something low-level and cross-cutting, such as the cxf logging interceptors - i.e.

Wicket rest annotations - introduction

2018-01-26 Thread mscoon
Hi all, We are considering using wicket rest annotations for extending a large existing application with a small (for now at least) rest api. Could you share your opinions on the state of the rest annotations project and also any pointers to examples and documentation? Thank you in advance

Re: log4j MDC IRequestLogger

2016-02-17 Thread mscoon
Hi, In a similar situation we have sub-classed RequestLogger and we are clearing the thread context in the end of MyRequestLogger.log(), so that the thread context is available when super.log() is called. It is not as clean as using AbstractRequestCycleListener.onDetach, but it works. Marios On

Initializer problem - resources not being loaded

2015-05-12 Thread mscoon
Hi all, We have a web application which is using an internal library called wicket-sol. The library is installed in our local maven repository. wicket-sol contains a property file wicket.properties which has a single entry: initializer=gr.sol.wicket.Initializer The gr.sol.wicket.Initializer

Re: Initializer problem - resources not being loaded

2015-05-12 Thread mscoon
wicket-sol artefact in your local maven repository? Regards Sven On 12.05.2015 13:35, mscoon wrote: Hi all, We have a web application which is using an internal library called wicket-sol. The library is installed in our local maven repository. wicket-sol contains a property file

Re: Checking obscure serialization bugs during development

2015-05-03 Thread mscoon
Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Jan 13, 2015 at 6:30 PM, mscoon msc...@gmail.com wrote: Hi all, There are some application (not wicket!) bugs that occur only when wicket serializes a page, while the same code works if the page is kept

Re: Checking obscure serialization bugs during development

2015-05-03 Thread mscoon
Heh, and a wrong carriage-return in the end makes me look like I'm trying to assume Martin's identity :) So anyway, thanks for the help Martin, as always you give very good guidance! Marios On Sun, May 3, 2015 at 7:01 PM, mscoon msc...@gmail.com wrote: Hi, it turns out that removing

Re: FormComponentPanel and propagating model value to components

2015-04-09 Thread mscoon
MyFormComponentPanel(IModel myModel){ add(new TextField(id, myModel)); } } (add generics if needed) Patrick Am 08.04.2015 um 09:27 schrieb mscoon: Hi all, I have a FormComponentPanel. Is it okay if I set its components models using a behavior that overrides onConfigure

FormComponentPanel and propagating model value to components

2015-04-08 Thread mscoon
Hi all, I have a FormComponentPanel. Is it okay if I set its components models using a behavior that overrides onConfigure() as below? public class MyFormComponentPanel extends FormComponentPanel { protected void onInitialize() { super.onInitialize(); componentA = new

Re: Issues with multiple FeedbackPanels

2015-03-26 Thread mscoon
Note sure what may be wrong unless you show more code. Some guesses: 1. You are refreshing the feedback panels in the ajax request target? I.e. in your ajax link's on click: void onClick(AjaxRequestTarget target) { ... do stuff, add message target.add(feedback1, feedback2); } 2. Neither

Re: Ajax submit form with FileUploadField

2015-02-12 Thread mscoon
Since no-one has responded, let me try to rephrase the question: is wicket doing something different when submitting a form via ajx without and with a FileUploadField? If yes, could you please give me some pointers in the code to look at? Thanks Marios On Tue, Feb 10, 2015 at 4:36 PM, mscoon msc

Re: Ajax submit form with FileUploadField

2015-02-12 Thread mscoon
://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L623 Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Feb 12, 2015 at 11:36 PM, mscoon msc...@gmail.com wrote: Since no-one has responded

Ajax submit form with FileUploadField

2015-02-10 Thread mscoon
Hi all, We are seeing strange behavior in a form that contains a FileUploadField when submitted with an AjaxSubmitLink. What happens is: 1. The form is embedded in another form, so wicket renders it as a div 2. The form is removed from it's parent element and placed within a JQuery dialog 3. The

Checking obscure serialization bugs during development

2015-01-13 Thread mscoon
Hi all, There are some application (not wicket!) bugs that occur only when wicket serializes a page, while the same code works if the page is kept in memory during subsequent requests. For instance a == comparison may fail if either side of the expression is serialized/deserialized. These bugs

Wicket 7 for production use?

2015-01-09 Thread mscoon
Hi all, Is there any estimate when wicket 7 will be ready for production use? We would really like to migrate our applications to it, and help with testing, but we are worried that we may encounter bugs in things that work in wicket 6 (such as wicket-5800 that I recently reported). Since there

Re: Wicket 7.0.4M - bug related to queueing and wicket:enclosure

2015-01-09 Thread mscoon
Thanks Andrea. On Mon, Jan 5, 2015 at 2:29 PM, andrea del bene an.delb...@gmail.com wrote: Hi, now the snapshot should work. Andrea. On 05/01/2015 11:32, mscoon wrote: Hi Martin, I just tried it with 7.0.0-SNAPSHOT and I get the same exception. I have opened https://issues.apache.org

Re: How to solve this login problem?

2015-01-07 Thread mscoon
If I recall correctly I read a description of a QR-Code login in which the page is constantly (periodically most likely) polling the server to see if the user has been authenticated. I.e.: You probably need two resources (or one with parameters): One to authenticate and one to ask if the user has

Re: Wicket 7.0.4M - bug related to queueing and wicket:enclosure

2015-01-05 Thread mscoon
in 7.0.0-SNAPSHOT. Please try it if you can. Thanks! On Dec 24, 2014 9:47 AM, mscoon msc...@gmail.com wrote: Hi, I have a component extending a FormComponentPanel which includes wicket:enclosures. It is embedded in tab in an ajax tabbed panel. I am getting the following exception

Wicket 7.0.4M - bug related to queueing and wicket:enclosure

2014-12-23 Thread mscoon
Hi, I have a component extending a FormComponentPanel which includes wicket:enclosures. It is embedded in tab in an ajax tabbed panel. I am getting the following exception when trying to change the active tab. It was working fine with wicket 6.15.0. I saw there are some issues in jira related

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread mscoon
, 2014 at 12:08 AM, mscoon msc...@gmail.com wrote: Thank you both for your answers. I have reasons to roll my own autocomplete component. But I did take a look at the way wiqiery and wicket-jquery are serving the choices. As far as I can tell neither is using a stateless/lightweight way

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread mscoon
synchronization - yes. But I think you won't need to retrieve it later at all. So just make sure it is not added several times Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Dec 15, 2014 at 10:31 PM, mscoon msc...@gmail.com wrote: Thanks Martin for your answer

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread mscoon
()) - CharSequence url = RequestCycle.get().urlFor(new MyResRef(), null); i.e. two different instances! They are matched by #equals(), not by identity Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Dec 15, 2014 at 10:46 PM, mscoon msc...@gmail.com wrote: Hmm now

Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-13 Thread mscoon
Hi all, I am making an autocomplete component based on jquery-autocomplete. I have currently implemented the data source using a stateless web page which writes the json response. What I don't like about this is that it is a separate file/class from my autocomplete component. But I like that

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-13 Thread mscoon
Thank you both for your answers. I have reasons to roll my own autocomplete component. But I did take a look at the way wiqiery and wicket-jquery are serving the choices. As far as I can tell neither is using a stateless/lightweight way for serving the choices. Both serve them with a request to

Re: IComponentOnBeforeRenderListener and ListView

2014-11-25 Thread mscoon
, and this record has some wrong data in it, I want to immediately show the validation errors when the page renders and not have to wait until a submit. On Tue, Nov 25, 2014 at 11:50 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Mon, Nov 24, 2014 at 10:34 PM, mscoon msc...@gmail.com wrote

Re: IComponentOnBeforeRenderListener and ListView

2014-11-25 Thread mscoon
with IComponentOnBeforeRenderListener too ? Just add the new IComponentOnBeforeRenderListener in the collection before FormErrorDecorator. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 4:15 PM, mscoon msc...@gmail.com wrote

Re: IComponentOnBeforeRenderListener and ListView

2014-11-25 Thread mscoon
On Tue, Nov 25, 2014 at 11:40 PM, Martin Grigorov mgrigo...@apache.org wrote: On Tue, Nov 25, 2014 at 11:33 PM, mscoon msc...@gmail.com wrote: I don't want to use an IComponentOnBeforeRenderListener as it is an application wide facility whereas what I'm doing applies to a couple of pages

IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread mscoon
Hi all, I am using a FormErrorDecorator that implements an IComponentOnBeforeRenderListener in order to automatically attach a css class to form components with validation errors (see https://cwiki.apache.org/confluence/display/WICKET/Automatic+styling+of+form+errors ). Sometimes I want to

Re: IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread mscoon
at 3:23 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Try with org.apache.wicket.Application#getComponent*Post* OnBeforeRenderListeners() Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Nov 24, 2014 at 2:50 PM, mscoon msc...@gmail.com wrote: Hi

Re: IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread mscoon
for understanding where is the problem. On Mon, Nov 24, 2014 at 4:52 PM, mscoon msc...@gmail.com wrote: Martin, Application#getComponentPostOnBeforeRenderListeners is how I am already registering my FormErrorDecorator. Attaching the validation errors after super.onBeforeRender() does

Re: Auto-reloading markup during development

2014-11-23 Thread mscoon
-soft.de wrote: Guten Tag mscoon, am Samstag, 22. November 2014 um 21:44 schrieben Sie: Is it possible to set wicket to reload markup and other resources during development so that one does not need to redeploy-restart the server in order to see their changes? From my

Auto-reloading markup during development

2014-11-22 Thread mscoon
Hi all, Is it possible to set wicket to reload markup and other resources during development so that one does not need to redeploy-restart the server in order to see their changes? I have figured out how to do the equivalent for changes in java code using DCEVM but I can't seem to make it work

Re: turning off page versioning

2014-09-26 Thread mscoon
Martin, I found you single-page-instance sample very interesting. I have the following question if you can spare some time: What happens if you completely remove the local map in SinglePageManager (and the associated) code? I.e. if SinglePageManager#getPage(int id) always delegates to the

Re: turning off page versioning

2014-09-26 Thread mscoon
NoVersionMapper is not in the official Wicket distro. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 26, 2014 at 10:52 AM, mscoon msc...@gmail.com wrote: Martin, I found you single-page-instance sample very interesting. I have the following

Re: turning off page versioning

2014-09-26 Thread mscoon
:23 PM, mscoon msc...@gmail.com wrote: Okay I see. I imagine this approach breaks if the render strategy is REDIRECT_TO_RENDER and works in ONE_PASS_RENDER and REDIRECT_TO_BUFFER. Wicket will redirect only if the requested url differs with the response url. Since the ?pageId

Re: turning off page versioning

2014-09-26 Thread mscoon
to test and optimize it further. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 26, 2014 at 12:58 PM, mscoon msc...@gmail.com wrote: I just tried your demo, it does seem to redirect (the requested url is ?0 while the current url has no version

Re: JQWicket - Modal/Dialog to an External URL, Or Something Like It?

2014-09-25 Thread mscoon
Hi, You could simply put an iframe inside your dialog div: div wicket:id=dialog title=Basic dialog iframe src=.../ /div In case the url is dynamic you can attach the iframe to a wicket component and use an attribute modifier to set the src attribute. On Thu, Sep 25, 2014 at 2:04 AM,

Re: turning off page versioning

2014-09-23 Thread mscoon
It is true that page version does seem kind of redundant or even annoying at times. If you have a wicket app that is full ajax (remember that ajax requests don't increment the page version), the only reason you need the page version is so you can have the same page open in two different tabs with

Re: Unit tests that use wicket's session and spring session

2014-09-02 Thread mscoon
Thank you both for your answers. Recent versions of Spring have their own way of creating a mock servlet context and their own mock sessions and requests (MockHttpServletRequest) and those cannot be combined with wicket (at least I didn't find a way to do it), because if you go that route there

Unit tests that use wicket's session and spring session

2014-09-01 Thread mscoon
Hi all, Might I ask if there are any pointers to writing tests for wicket that can successfully access wicket's session (i.e. Session.get()) and spring's session (i.e. use session scoped beans either by autowiring or using the spring injector)? Thanks Marios

Dynamically changing column visibility on DataTable during ajax refresh

2014-06-04 Thread mscoon
Hi all, Is there a way to change the visibility of one or more columns of a DataTable during an ajax refresh? The only way I've found so far is to create a new list of columns and replace the DataTable but this is a bit cumbersome compared to simply writing ajaxRequestTarget.add(dataTable);

Re: Dynamically changing column visibility on DataTable during ajax refresh

2014-06-04 Thread mscoon
DataTable(id, columns, ...); onConfigure() { columns.clear(); columns.addAll(...); } onClick() { target.add(dataTable); } Regards Sven On 06/04/2014 12:20 PM, mscoon wrote: Hi all, Is there a way to change the visibility of one or more

Re: AjaxTabbedPanel and validation for all tabs

2014-05-17 Thread mscoon
you want to avoid that? Cheers, -Tom On 06.05.2014, at 16:13, mscoon msc...@gmail.com wrote: Is there a way to solve this? Client side tabs are a solution I guess but one I'd like to avoid if possible.

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-17 Thread mscoon
(Kunde); } before the save everything is fine But I hoped to avoid such lines by AbstractEntityModel. My idea was to implant Kunde through the form. But how could you do it only by a Label. Am 05.05.2014 20:40, schrieb mscoon: ​Actually what I said below is wrong because

AjaxTabbedPanel and validation for all tabs

2014-05-06 Thread mscoon
Hi all, I have a complex form for editing existing objects. I am planning to use AjaxTabbedPanel with adapted ajax links for the tabs to submit the current tab when the user switches tabs. There will be a save button under the tabbed panel that will save the entire object. For new objects, I

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-05 Thread mscoon
On Mon, May 5, 2014 at 11:26 AM, Yahoo hansheinrichbr...@yahoo.de wrote: First I have to tell you concerning the mapping I used the wrong word the dependencies in the mapping are not recursive bur circular. Am 04.05.2014 22:24, schrieb mscoon: I'm not sure I see something wrong in your

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-05 Thread mscoon
to move this line to saveNachweise(). On Mon, May 5, 2014 at 2:54 PM, Yahoo hansheinrichbr...@yahoo.de wrote: Am 05.05.2014 11:05, schrieb mscoon: In a previous message you sent the following snippets: //@XmlTransient @ManyToOne(cascade = CascadeType.MERGE,fetch=FetchType.LAZY

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-05 Thread mscoon
the problem if hibernate tries to save kunde with nachweiseform.getModelObject() which is a new object with a null id. You may try to move this line to saveNachweise(). On Mon, May 5, 2014 at 2:54 PM, Yahoo hansheinrichbr...@yahoo.de wrote: Am 05.05.2014 11:05, schrieb mscoon: In a previous

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-04 Thread mscoon
I have a MANYTOONE-Field which is preset and not set in the Form. This field is not stored. Am 02.05.2014 01:24, schrieb mscoon: No you don't. The referenced objects will be serialized along with the entity you are serializing and everything should work just fine. On Thu, May 1, 2014

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-04 Thread mscoon
result Am 04.05.2014 08:55, schrieb mscoon: Usually this is not a problem. But maybe you are doing something different that the usual. I think you will need to show us your code to help you any further. On Sun, May 4, 2014 at 9:12 AM, Yahoo hansheinrichbr...@yahoo.de wrote: It's

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-01 Thread mscoon
Heiner, You didn't tell us which dependency injection framework you you using. If you're using Spring then simply use the @SpringBean annotation to get a reference to an EntityManager or a Dao. @SpringBean automatically works only for components so you'll also need to add a call to injector to

Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-01 Thread mscoon
are set byDropDownChoices. In the case of a new entity, do I have to load all these Entities too and to save their ids ? Am 01.05.2014 15:01, schrieb mscoon: Heiner, You didn't tell us which dependency injection framework you you using. If you're using Spring then simply use