Re: DropDownChoice models

2017-01-12 Thread Zbynek Vavros
Hi, sry got to this just now. You are correct sir! Thanks! Zbynek On Wed, Jan 11, 2017 at 1:47 PM, Sven Meier wrote: > Hi, > > Im not sure I got this right but seems to me you still have to call >> "User.findOne(id)" for each user >> > > actually not, findOne() is called for

Re: Cannot modify component hierarchy after render phase has started

2017-01-12 Thread Dirk Forchel
Hi Sven, could it be that this belongs to https://issues.apache.org/jira/browse/WICKET-6303? I'm not sure, but after migrating to Wicket 7.5.0 we've got several errors belonging to this issue. I'll try to provide a quickstart though. Thanks, Dirk -- View this message in context:

Re: AW: Update ListMultipleChoice by Ajax

2017-01-12 Thread Sven Meier
Hm, with CompoundPropertyModel all inherited models after dropped on detach and re-acquired on following access. So in theory that should work. What happens if you refresh the page (F5) after clicking the Ajax link? Does the new data show up in the listView and passwordField? Could you

Cannot mock final SortableDataProvider.getSortState

2017-01-12 Thread Eric J. Van der Velden
Hello, SortableDataProvider, in package org.apache.wicket.extensions.markup.html.repeater.util, has a final method getSortState(). I cannot mock this method. I have copied SortableDataProvider under a different name, and subclassed this one,but I do not like this. The same happens with final

Re-create bookmarkable pages on Ajax calls

2017-01-12 Thread Thomas Heigl
Hi all, I'm looking for a solution to avoid serialization of bookmarkable pages. These are yesterday's metrics from an instrumented version of Fast2WicketSerializer: "WicketSerializer.deserialize" : { > "count" : 4084, > "max" : 0.0308421623, > "mean" : 0.005861568417930906, >

Re: Re-create bookmarkable pages on Ajax calls

2017-01-12 Thread Thomas Heigl
I forgot to add: We are using the HTML5 History API to push state to the (bookmarkable) URL, so a page can be re-created with *all* state from the URL alone. Thomas On Thu, Jan 12, 2017 at 11:47 AM, Thomas Heigl wrote: > Hi all, > > I'm looking for a solution to avoid

Re: Cannot mock final SortableDataProvider.getSortState

2017-01-12 Thread Bas Gooren
Eric, All of our data providers use an external source to load the actual data, e.g. a repository or dao. As all of our repositories and daos are interfaces, those are easy to mock. Testing the provider is then simply a matter of ensuring the right methods, with the right parameters are

Update ListMultipleChoice by Ajax

2017-01-12 Thread Christoph.Manig
Hello, I have a form which contains a ListMultipleChoice and a PasswordTextField. ListMultipleChoice groups = new ListMultipleChoice<>("groups", groupDao.getAllGroups(), new ChoiceRenderer("groupname")); PasswordTextField password = new RequiredPasswordField("password"); After clicking an

Re: Re-create bookmarkable pages on Ajax calls

2017-01-12 Thread Martin Grigorov
Hi, You can setup a no-op IPageStore. This way there won't be a call to ISerializer#serialize(Object) at all. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Jan 12, 2017 at 11:53 AM, Thomas Heigl wrote: > I forgot to add: > > We are

AW: Update ListMultipleChoice by Ajax

2017-01-12 Thread Christoph.Manig
They are member of a form and this has a CompoundPropertyModel. setDefaultModel(new CompoundPropertyModel(new UserModel())); And this holds all data which are relevant for user. The other components of the form show the data of the user which I set as the default model. Mit freundlichen

Re: Cannot modify component hierarchy after render phase has started

2017-01-12 Thread Sven Meier
Hi, a quick lock on a 7.4-7.5 diff didn't reveal any change that has something to do with checking the hierarchy. Could you provide a quickstart, so I can find the difference? Sven On 12.01.2017 08:56, Dirk Forchel wrote: Hi, I would like to know why we shouldn't change the model object

Re: Update ListMultipleChoice by Ajax

2017-01-12 Thread Sven Meier
Hi, your components probably hold a reference to the former model. Where do 'groups' and 'password' get their model from? Have fun Sven On 12.01.2017 12:37, christoph.ma...@t-systems.com wrote: Hello, I have a form which contains a ListMultipleChoice and a PasswordTextField.

Re: AW: AW: Update ListMultipleChoice by Ajax

2017-01-12 Thread Sven Meier
Hi Christoph, a https://wicket.apache.org/start/quickstart.html allows us to debug the problem. You've probably got your model usage wrong, that will be hard to analyze without seeing more code. Regards Sven On 13.01.2017 08:08, christoph.ma...@t-systems.com wrote: After refreshing the

AW: AW: Update ListMultipleChoice by Ajax

2017-01-12 Thread Christoph.Manig
After refreshing the page I see the same page. Its not a listView it is a ListMultipleChoice. What do you mean with a quickstart. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Sven Meier [mailto:s...@meiers.net] Gesendet: Donnerstag, 12. Januar 2017 22:51

Re: Re-create bookmarkable pages on Ajax calls

2017-01-12 Thread Thomas Heigl
Alternatively, if this does not make any sense or is not possible at all, would it be an option to approach this from the opposite direction, i.e. make the pages really stateless, but still store them in the application level cache so they don't have to be fully re-created for every Ajax call? On

Re: Re-create bookmarkable pages on Ajax calls

2017-01-12 Thread Thomas Heigl
Hi Martin, Yes, I tried that, but what happens is this: When a user clicks on the an an Ajax link on a page that is not in the application cache, the whole page gets refreshed and nothing else happens. This is due to the following code in ListenerInterfaceRequestHandler: if