Re: Reload TabbedPanel preserving active tab

2017-01-13 Thread Maxim Solodovnik
Jquery :)
Thaks a lot!

WBR, Maxim
(from mobile, sorry for the typos)

On Jan 14, 2017 01:30, "Sebastien"  wrote:

> Hi Maxim,
>
> good question! i think we can do it, i will have a look tomorrow... jquery
> or kendo ?
>
> best regards,
> sebastien
>
>
> On Jan 13, 2017 19:15, "Maxim Solodovnik"  wrote:
>
> Hello Sebastien,
>
> Is there any option to update TabbedPanel preserving active tab?
> Both
> tabs.reload(handler)
> and
> handler.add(tabs)
>
> resets active tab :(((
>
> or maybe if TabbedPanel was created as follows:
> new TabbedPanel("tabs", Arrays.asList(userTab, fileTab)).*setActiveTab*(0)
> it will be "re-assirned" on reload?
>
> --
> WBR
> Maxim aka solomax
>
>
>


Re: Reload TabbedPanel preserving active tab

2017-01-13 Thread Sebastien
Hi Maxim,

good question! i think we can do it, i will have a look tomorrow... jquery
or kendo ?

best regards,
sebastien


On Jan 13, 2017 19:15, "Maxim Solodovnik"  wrote:

Hello Sebastien,

Is there any option to update TabbedPanel preserving active tab?
Both
tabs.reload(handler)
and
handler.add(tabs)

resets active tab :(((

or maybe if TabbedPanel was created as follows:
new TabbedPanel("tabs", Arrays.asList(userTab, fileTab)).*setActiveTab*(0)
it will be "re-assirned" on reload?

-- 
WBR
Maxim aka solomax


Reload TabbedPanel preserving active tab

2017-01-13 Thread Maxim Solodovnik
Hello Sebastien,

Is there any option to update TabbedPanel preserving active tab?
Both
tabs.reload(handler)
and
handler.add(tabs)

resets active tab :(((

or maybe if TabbedPanel was created as follows:
new TabbedPanel("tabs", Arrays.asList(userTab, fileTab)).*setActiveTab*(0)
it will be "re-assirned" on reload?

-- 
WBR
Maxim aka solomax


Re: Cannot modify component hierarchy after render phase has started

2017-01-13 Thread Sven Meier

Hi Dirk,

problem is that TestPanel.onConfigure() is called during render phase 
only, while in 7.4 it was (correctly) called in #beforeRender() (where 
hierarchy changes are still allowed).


So I assume this is caused by WICKET-6216, component queuing might be 
involved.


Regards
Sven

Stacktrace 7.5.0
org.apache.wicket.WicketRuntimeException: Cannot modify component 
hierarchy after render phase has started (page version cant change then 
anymore)
at 
org.apache.wicket.Component.checkHierarchyChange(Component.java:3674) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Page.dirty(Page.java:271) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Page.dirty(Page.java:250) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Page.componentModelChanging(Page.java:904) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.modelChanging(Component.java:2230) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.setDefaultModelObject(Component.java:3133) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
com.mycompany.front.wicket.components.TestPanel.onConfigure(TestPanel.java:30) 
~[classes/:?]
at org.apache.wicket.Component.configure(Component.java:1069) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:954) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.beforeRender(Component.java:1031) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.onBeforeRender(Component.java:3928) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:963) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.beforeRender(Component.java:1031) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalPrepareForRender(Component.java:2248) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.render(Component.java:2337) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1659) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:517) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:70) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2613) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onRender(Border.java:527) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.internalRender(Component.java:2413) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.render(Component.java:2341) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1659) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:70) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2613) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.internalRender(Component.java:2413) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.render(Component.java:2341) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729) 
~[wicket-core-7.5.0.jar:7.5.0]
at 

Re: Cannot mock final SortableDataProvider.getSortState

2017-01-13 Thread Eric J. Van der Velden
Hoi Bas,

I am at the office now, so now I would like to comment on the first
question in your last answer.

My experience is that when you mock a class, and you call a final method on
the mock, Mockito returns null. So it is not that you can trust a final
method or not, the mock's method returns null. Or maybe I make a mistake.

It happens in OrderByBorder.onComponentTag. This method calls the
provider's getSortState(), which will return null. That is why I wanted to
mock this method, but I cannot, because it is final.

Thanks, I will comment on your other remarks later.

On Fri, Jan 13, 2017 at 1:41 PM, Bas Gooren  wrote:

> Hi Eric,
>
>
> Well - looking at SortableDataProvider I suppose you cold mock an
> implementation of it. As getSortState() is final, you need to trust that it
> does it’s job. Why do you want to mock that method?
>
> The same applies to LoadableDetachableModel - why do you need to mock
> final getObject(), which has a know contract/implementation?
>
>
> In general I’m not sure I understand yet why you are mocking your
> SortableContactDataProvider.
>
>
> If you want to test that your SortableContactDataProvider does it’s job
> properly, provide it with a mock database so you can verify that it makes
> all expected calls.
>
> Since you are using a static call to locate your database, you could
> introduce a way to force a ContactsDatabase for the current thread in your
> locator class.
>
>
> For example (pseudocode for a unit test):
>
>
> … run before test
>
> ContactsDatabase mockDatabase = createMock(…)
>
> DatabaseLocator.setDatabaseForCurrentThread(mockDatabase)
>
>
> … in test
>
> expect(mockDatabase.getIndex(anyObject())).andReturn(…)
>
> SortableContactDataProvider.iterator(….)
>
> etc.
>
>
> … run after test
>
> DatabaseLocator.clearDatabaseForCurrentThread()
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 13 januari 2017 bij 12:10:03, Eric J. Van der Velden (
> ericjvandervel...@gmail.com) schreef:
>
> Hoi Bas,
>
> Thank you for your answer!
>
> So maybe I am doing it wrong.
>
> Let's take an example. In the wicket examples, in package
> org.apache.wicket.examples.repeater, there is the provider:
>
> public class SortableContactDataProvider_my extends
> SortableDataProvider_my implements IFilterStateLocator<
> ContactFilter_my>
> {
> ...
>
> protected ContactsDatabase getContactsDB()
> {
> return DatabaseLocator.getDatabase();
> }
>
> @Override
> public Iterator iterator(long first, long count)
> {
> List contactsFound = getContactsDB().getIndex(getSort());
> return filterContacts(contactsFound).
> subList((int)first, (int)(first + count)).
> iterator();
> }
>
> I mocked the iterator method. But you are saying that I should mock the
> getContactsDB method?
>
> Thank you.
>
> On Thu, Jan 12, 2017 at 11:10 AM, Bas Gooren  wrote:
>
>> 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 called on the mocked objects.
>>
>>
>> What functionality in your (custom) data providers do you have that you
>> want to test? In general I would say that final methods in a known and
>> tested library (wicket) do not need to be tested anyway - that is the
>> responsibility of the library.
>>
>> Met vriendelijke groet,
>> Kind regards,
>>
>> Bas Gooren
>>
>> Op 12 januari 2017 bij 10:23:12, Eric J. Van der Velden (
>> ericjvandervel...@gmail.com) schreef:
>>
>> 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 LoadableDetachableModel.getObject(), but in
>> this case I could mock LoadableDetachableModel.load().
>>
>> So why are these methods final, and how do programmers test the provider?
>>
>> Thank you!
>>
>>
>


Idea for a template component

2017-01-13 Thread Marcel Barbosa Pinto
Hi guys,

I had an idea last night and decided to implement it.

On my wicket app I have a lot of labels that is used just to display the
model values to the user.
So my code was some thing like this:

WebMarkupContainer container = new WebMarkupContainer("container", new
CompoundPropertyModel(myModel));
container.add(
new Label("prop1");
new Label("prop2.name");
new Label("prop2.lastname")
);
add(container);

html was like this:

Prop1: 
Prop2 name: 
Prop2 lastname: 


So I decided to try to simplify the HTML code and created a
TemplateMarkupComponent which basically uses the VariableInterpolator class
and PropertyResolver:

java looks like this:

TemplateMarkupContainer container = new
TemplateMarkupContainer("container", myModel);
add(container);

Html code:


Prop1: ${prop1}
Prop2 name: ${prop2.name}
Prop2 lastname:  ${prop2.lastname}


To display the values the component apply the PropertyConverter, so fields
are displayed with the correct format.
It uses the same expressions that PropertyModel uses to get its properties.
I think this could be used to render scripts as well.

You can just remove the expression tag from HTML without having to change
the java code.
You can choose if and Exception should be raised if the Model doesn't
contains the property, like the MapVariableInterpolator does.

These two I am still thinking about:
You can override the onValue(String expression, Object value) in order to
modify the value that is rendered
If you pass a Model with is not an Object with properties, like just a
String or Int, you can render it by using ${this}

It is just two classes:
ModelVariableInterpolator.java
TemplateMarkupContainer.java


Do you think that this could be useful?
What problems could be raised by this approach?


-- 

Marcel Barbosa Pinto


Re: Cannot mock final SortableDataProvider.getSortState

2017-01-13 Thread Bas Gooren
Hi Eric,


Well - looking at SortableDataProvider I suppose you cold mock an
implementation of it. As getSortState() is final, you need to trust that it
does it’s job. Why do you want to mock that method?

The same applies to LoadableDetachableModel - why do you need to mock final
getObject(), which has a know contract/implementation?


In general I’m not sure I understand yet why you are mocking your
SortableContactDataProvider.


If you want to test that your SortableContactDataProvider does it’s job
properly, provide it with a mock database so you can verify that it makes
all expected calls.

Since you are using a static call to locate your database, you could
introduce a way to force a ContactsDatabase for the current thread in your
locator class.


For example (pseudocode for a unit test):


… run before test

ContactsDatabase mockDatabase = createMock(…)

DatabaseLocator.setDatabaseForCurrentThread(mockDatabase)


… in test

expect(mockDatabase.getIndex(anyObject())).andReturn(…)

SortableContactDataProvider.iterator(….)

etc.


… run after test

DatabaseLocator.clearDatabaseForCurrentThread()

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 13 januari 2017 bij 12:10:03, Eric J. Van der Velden (
ericjvandervel...@gmail.com) schreef:

Hoi Bas,

Thank you for your answer!

So maybe I am doing it wrong.

Let's take an example. In the wicket examples, in package
org.apache.wicket.examples.repeater, there is the provider:

public class SortableContactDataProvider_my extends
SortableDataProvider_my implements
IFilterStateLocator
{
...

protected ContactsDatabase getContactsDB()
{
return DatabaseLocator.getDatabase();
}

@Override
public Iterator iterator(long first, long count)
{
List contactsFound = getContactsDB().getIndex(getSort());
return filterContacts(contactsFound).
subList((int)first, (int)(first + count)).
iterator();
}

I mocked the iterator method. But you are saying that I should mock the
getContactsDB method?

Thank you.

On Thu, Jan 12, 2017 at 11:10 AM, Bas Gooren  wrote:

> 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 called on the mocked objects.
>
>
> What functionality in your (custom) data providers do you have that you
> want to test? In general I would say that final methods in a known and
> tested library (wicket) do not need to be tested anyway - that is the
> responsibility of the library.
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 12 januari 2017 bij 10:23:12, Eric J. Van der Velden (
> ericjvandervel...@gmail.com) schreef:
>
> 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 LoadableDetachableModel.getObject(), but in
> this case I could mock LoadableDetachableModel.load().
>
> So why are these methods final, and how do programmers test the provider?
>
> Thank you!
>
>


Re: AW: AW: AW: Update ListMultipleChoice by Ajax

2017-01-13 Thread Sven Meier

Ah, it didn't have anything to do with Ajax or models after all:

- PasswordTextField#setResetPassword(false) lets it render the password 
(you don't have a login form here, so it's safe)


- Group has to implement #equals() and #hashCode() *or* you have to use 
an id value other than index (which is ChoiceRenderer's default)


Have fun
Sven


On 13.01.2017 11:18, christoph.ma...@t-systems.com wrote:

Ok I created an Account on GitHub. Here is the example: 
https://github.com/CManig/WicketChoiceExample


Mit freundlichen Grüßen
Christoph Manig


-Ursprüngliche Nachricht-
Von: Maxim Solodovnik [mailto:solomax...@gmail.com]
Gesendet: Freitag, 13. Januar 2017 10:48
An: users@wicket.apache.org
Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax

you can use any publicaly available project hosting (your SVN, bitbucket, 
github etc.) Or you can create JIRA issue and attach your quickstart (I would 
use this option only if I know for sure it is JIRA bug)

On Fri, Jan 13, 2017 at 4:07 PM,   wrote:

I've only have a GitLab Account will this also work for you? Can you send me a 
link to the right place in Jira?


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Maxim Solodovnik [mailto:solomax...@gmail.com]
Gesendet: Freitag, 13. Januar 2017 10:05
An: users@wicket.apache.org
Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax

You can share github link
or attach it to JIRA :)

On Fri, Jan 13, 2017 at 4:02 PM,   wrote:

I created a small example. How can I send this to you?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport & Logistics Annenstr. 5
01067 Dresden
tel.:   +49 (0) 351 / 4744 - 188
fax:+49 (0) 351 / 4744 - 209
email:  christoph.ma...@t-systems.com

T-SYSTEMS INTERNATIONAL GMBH
Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri
Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen
Rickmann
Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der
Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Freitag, 13. Januar 2017 08:16
An: users@wicket.apache.org
Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax

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 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
An: users@wicket.apache.org
Betreff: Re: AW: Update ListMultipleChoice by Ajax

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 build a quickstart for a deeper look?

Regards
Sven



On 12.01.2017 15:35, christoph.ma...@t-systems.com wrote:

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 Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Donnerstag, 12. Januar 2017 14:20
An: users@wicket.apache.org
Betreff: Re: Update ListMultipleChoice by Ajax

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.

ListMultipleChoice groups = new
ListMultipleChoice<>("groups", groupDao.getAllGroups(), new
ChoiceRenderer("groupname"));


PasswordTextField password = new
RequiredPasswordField("password");


After clicking an AjaxLink I set a user object to the default model of the 
form. Then the form will be rendered and I see all data of the user in the 
fields of the form.

But the ListMultipleChoice and the PasswordTextField are not updated. But the 
user object contains the data for the ListMultipleChoice and the 
PasswordTextField.
Can anyone help please.


Mit freundlichen Grüßen
Christoph Manig




---
-
- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For 

Re: Cannot mock final SortableDataProvider.getSortState

2017-01-13 Thread Eric J. Van der Velden
Hoi Bas,

Thank you for your answer!

So maybe I am doing it wrong.

Let's take an example. In the wicket examples, in package
org.apache.wicket.examples.repeater, there is the provider:

public class SortableContactDataProvider_my extends
SortableDataProvider_my implements
IFilterStateLocator
{
...

protected ContactsDatabase getContactsDB()
{
return DatabaseLocator.getDatabase();
}

@Override
public Iterator iterator(long first, long count)
{
List contactsFound = getContactsDB().getIndex(getSort());
return filterContacts(contactsFound).
subList((int)first, (int)(first + count)).
iterator();
}

I mocked the iterator method. But you are saying that I should mock the
getContactsDB method?

Thank you.

On Thu, Jan 12, 2017 at 11:10 AM, Bas Gooren  wrote:

> 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 called on the mocked objects.
>
>
> What functionality in your (custom) data providers do you have that you
> want to test? In general I would say that final methods in a known and
> tested library (wicket) do not need to be tested anyway - that is the
> responsibility of the library.
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 12 januari 2017 bij 10:23:12, Eric J. Van der Velden (
> ericjvandervel...@gmail.com) schreef:
>
> 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 LoadableDetachableModel.getObject(), but in
> this case I could mock LoadableDetachableModel.load().
>
> So why are these methods final, and how do programmers test the provider?
>
> Thank you!
>
>


AW: AW: AW: Update ListMultipleChoice by Ajax

2017-01-13 Thread Christoph.Manig
Ok I created an Account on GitHub. Here is the example: 
https://github.com/CManig/WicketChoiceExample


Mit freundlichen Grüßen
Christoph Manig


-Ursprüngliche Nachricht-
Von: Maxim Solodovnik [mailto:solomax...@gmail.com] 
Gesendet: Freitag, 13. Januar 2017 10:48
An: users@wicket.apache.org
Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax

you can use any publicaly available project hosting (your SVN, bitbucket, 
github etc.) Or you can create JIRA issue and attach your quickstart (I would 
use this option only if I know for sure it is JIRA bug)

On Fri, Jan 13, 2017 at 4:07 PM,   wrote:
> I've only have a GitLab Account will this also work for you? Can you send me 
> a link to the right place in Jira?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
> -Ursprüngliche Nachricht-
> Von: Maxim Solodovnik [mailto:solomax...@gmail.com]
> Gesendet: Freitag, 13. Januar 2017 10:05
> An: users@wicket.apache.org
> Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax
>
> You can share github link
> or attach it to JIRA :)
>
> On Fri, Jan 13, 2017 at 4:02 PM,   wrote:
>> I created a small example. How can I send this to you?
>>
>>
>> Mit freundlichen Grüßen
>> Christoph Manig
>> Systems Engineer
>>
>> T-Systems International GmbH
>> Systems Integration - SC Travel, Transport & Logistics Annenstr. 5
>> 01067 Dresden
>> tel.:   +49 (0) 351 / 4744 - 188
>> fax:+49 (0) 351 / 4744 - 209
>> email:  christoph.ma...@t-systems.com
>>
>> T-SYSTEMS INTERNATIONAL GMBH
>> Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
>> Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri 
>> Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen 
>> Rickmann
>> Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der
>> Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567
>>
>>
>> -Ursprüngliche Nachricht-
>> Von: Sven Meier [mailto:s...@meiers.net]
>> Gesendet: Freitag, 13. Januar 2017 08:16
>> An: users@wicket.apache.org
>> Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax
>>
>> 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 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
>>> An: users@wicket.apache.org
>>> Betreff: Re: AW: Update ListMultipleChoice by Ajax
>>>
>>> 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 build a quickstart for a deeper look?
>>>
>>> Regards
>>> Sven
>>>
>>>
>>>
>>> On 12.01.2017 15:35, christoph.ma...@t-systems.com wrote:
 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 Grüßen
 Christoph Manig

 -Ursprüngliche Nachricht-
 Von: Sven Meier [mailto:s...@meiers.net]
 Gesendet: Donnerstag, 12. Januar 2017 14:20
 An: users@wicket.apache.org
 Betreff: Re: Update ListMultipleChoice by Ajax

 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.
>
> ListMultipleChoice groups = new 
> ListMultipleChoice<>("groups", groupDao.getAllGroups(), new 
> ChoiceRenderer("groupname"));
> 
>
> PasswordTextField password = new 
> RequiredPasswordField("password");
> 
>
> After clicking an AjaxLink I set a user object to the default model of 
> the form. Then the form will be rendered and I see all data of the user 
> in the fields of the form.
>
> But the ListMultipleChoice and the PasswordTextField are not updated. But 
> the user object contains the data for the ListMultipleChoice and the 
> PasswordTextField.
> Can anyone help please.
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
>
>
 

Re: AW: AW: Update ListMultipleChoice by Ajax

2017-01-13 Thread Maxim Solodovnik
you can use any publicaly available project hosting (your SVN,
bitbucket, github etc.)
Or you can create JIRA issue and attach your quickstart (I would use
this option only if I know for sure it is JIRA bug)

On Fri, Jan 13, 2017 at 4:07 PM,   wrote:
> I've only have a GitLab Account will this also work for you? Can you send me 
> a link to the right place in Jira?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
> -Ursprüngliche Nachricht-
> Von: Maxim Solodovnik [mailto:solomax...@gmail.com]
> Gesendet: Freitag, 13. Januar 2017 10:05
> An: users@wicket.apache.org
> Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax
>
> You can share github link
> or attach it to JIRA :)
>
> On Fri, Jan 13, 2017 at 4:02 PM,   wrote:
>> I created a small example. How can I send this to you?
>>
>>
>> Mit freundlichen Grüßen
>> Christoph Manig
>> Systems Engineer
>>
>> T-Systems International GmbH
>> Systems Integration - SC Travel, Transport & Logistics Annenstr. 5
>> 01067 Dresden
>> tel.:   +49 (0) 351 / 4744 - 188
>> fax:+49 (0) 351 / 4744 - 209
>> email:  christoph.ma...@t-systems.com
>>
>> T-SYSTEMS INTERNATIONAL GMBH
>> Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
>> Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri
>> Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen
>> Rickmann
>> Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der
>> Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567
>>
>>
>> -Ursprüngliche Nachricht-
>> Von: Sven Meier [mailto:s...@meiers.net]
>> Gesendet: Freitag, 13. Januar 2017 08:16
>> An: users@wicket.apache.org
>> Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax
>>
>> 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 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
>>> An: users@wicket.apache.org
>>> Betreff: Re: AW: Update ListMultipleChoice by Ajax
>>>
>>> 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 build a quickstart for a deeper look?
>>>
>>> Regards
>>> Sven
>>>
>>>
>>>
>>> On 12.01.2017 15:35, christoph.ma...@t-systems.com wrote:
 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 Grüßen
 Christoph Manig

 -Ursprüngliche Nachricht-
 Von: Sven Meier [mailto:s...@meiers.net]
 Gesendet: Donnerstag, 12. Januar 2017 14:20
 An: users@wicket.apache.org
 Betreff: Re: Update ListMultipleChoice by Ajax

 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.
>
> ListMultipleChoice groups = new
> ListMultipleChoice<>("groups", groupDao.getAllGroups(), new
> ChoiceRenderer("groupname"));
> 
>
> PasswordTextField password = new RequiredPasswordField("password");
> 
>
> After clicking an AjaxLink I set a user object to the default model of 
> the form. Then the form will be rendered and I see all data of the user 
> in the fields of the form.
>
> But the ListMultipleChoice and the PasswordTextField are not updated. But 
> the user object contains the data for the ListMultipleChoice and the 
> PasswordTextField.
> Can anyone help please.
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
>
>
 
 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 
 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For 

Re: Cannot modify component hierarchy after render phase has started

2017-01-13 Thread Dirk Forchel
Hi Sven,
attached you can find a quickstart which demonstrates the problem. I've
added 3 test pages all with a TextField and a Panel with a TextField. For
each component, the model object is set at the onConfigure method. At the
first page both components are added to the page itself. At the second page
both components are added to the border body container of a Border
component. At the third page both components are added to a "Layout"
container (a Border component too). 
With Wicket 7.4.0 all pages are rendered without any problem, with Wicket
7.5.0 the third page isn't.  Instead the following exception is thrown:

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
 at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3674)
 at org.apache.wicket.Page.dirty(Page.java:271)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
 at org.apache.wicket.Page.dirty(Page.java:250)
 at org.apache.wicket.Page.componentModelChanging(Page.java:904)
 at org.apache.wicket.Component.modelChanging(Component.java:2230)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3133)
 at
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
 at
com.mycompany.front.wicket.components.TestPanel.onConfigure(TestPanel.java:30)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676736.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AW: AW: AW: Update ListMultipleChoice by Ajax

2017-01-13 Thread Christoph.Manig
I've only have a GitLab Account will this also work for you? Can you send me a 
link to the right place in Jira?


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Maxim Solodovnik [mailto:solomax...@gmail.com] 
Gesendet: Freitag, 13. Januar 2017 10:05
An: users@wicket.apache.org
Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax

You can share github link
or attach it to JIRA :)

On Fri, Jan 13, 2017 at 4:02 PM,   wrote:
> I created a small example. How can I send this to you?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
>
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics Annenstr. 5
> 01067 Dresden
> tel.:   +49 (0) 351 / 4744 - 188
> fax:+49 (0) 351 / 4744 - 209
> email:  christoph.ma...@t-systems.com
>
> T-SYSTEMS INTERNATIONAL GMBH
> Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
> Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri 
> Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen 
> Rickmann
> Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der 
> Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567
>
>
> -Ursprüngliche Nachricht-
> Von: Sven Meier [mailto:s...@meiers.net]
> Gesendet: Freitag, 13. Januar 2017 08:16
> An: users@wicket.apache.org
> Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax
>
> 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 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
>> An: users@wicket.apache.org
>> Betreff: Re: AW: Update ListMultipleChoice by Ajax
>>
>> 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 build a quickstart for a deeper look?
>>
>> Regards
>> Sven
>>
>>
>>
>> On 12.01.2017 15:35, christoph.ma...@t-systems.com wrote:
>>> 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 Grüßen
>>> Christoph Manig
>>>
>>> -Ursprüngliche Nachricht-
>>> Von: Sven Meier [mailto:s...@meiers.net]
>>> Gesendet: Donnerstag, 12. Januar 2017 14:20
>>> An: users@wicket.apache.org
>>> Betreff: Re: Update ListMultipleChoice by Ajax
>>>
>>> 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.

 ListMultipleChoice groups = new 
 ListMultipleChoice<>("groups", groupDao.getAllGroups(), new 
 ChoiceRenderer("groupname"));
 

 PasswordTextField password = new RequiredPasswordField("password");
 

 After clicking an AjaxLink I set a user object to the default model of the 
 form. Then the form will be rendered and I see all data of the user in the 
 fields of the form.

 But the ListMultipleChoice and the PasswordTextField are not updated. But 
 the user object contains the data for the ListMultipleChoice and the 
 PasswordTextField.
 Can anyone help please.


 Mit freundlichen Grüßen
 Christoph Manig



>>> 
>>> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>> 
>>> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: 

Re: AW: AW: Update ListMultipleChoice by Ajax

2017-01-13 Thread Maxim Solodovnik
You can share github link
or attach it to JIRA :)

On Fri, Jan 13, 2017 at 4:02 PM,   wrote:
> I created a small example. How can I send this to you?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
>
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics
> Annenstr. 5
> 01067 Dresden
> tel.:   +49 (0) 351 / 4744 - 188
> fax:+49 (0) 351 / 4744 - 209
> email:  christoph.ma...@t-systems.com
>
> T-SYSTEMS INTERNATIONAL GMBH
> Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
> Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, 
> Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
> Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
> Sitz der Gesellschaft: Frankfurt am Main
> WEEE-Reg.-Nr. DE50335567
>
>
> -Ursprüngliche Nachricht-
> Von: Sven Meier [mailto:s...@meiers.net]
> Gesendet: Freitag, 13. Januar 2017 08:16
> An: users@wicket.apache.org
> Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax
>
> 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 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
>> An: users@wicket.apache.org
>> Betreff: Re: AW: Update ListMultipleChoice by Ajax
>>
>> 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 build a quickstart for a deeper look?
>>
>> Regards
>> Sven
>>
>>
>>
>> On 12.01.2017 15:35, christoph.ma...@t-systems.com wrote:
>>> 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 Grüßen
>>> Christoph Manig
>>>
>>> -Ursprüngliche Nachricht-
>>> Von: Sven Meier [mailto:s...@meiers.net]
>>> Gesendet: Donnerstag, 12. Januar 2017 14:20
>>> An: users@wicket.apache.org
>>> Betreff: Re: Update ListMultipleChoice by Ajax
>>>
>>> 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.

 ListMultipleChoice groups = new
 ListMultipleChoice<>("groups", groupDao.getAllGroups(), new
 ChoiceRenderer("groupname"));
 

 PasswordTextField password = new RequiredPasswordField("password");
 

 After clicking an AjaxLink I set a user object to the default model of the 
 form. Then the form will be rendered and I see all data of the user in the 
 fields of the form.

 But the ListMultipleChoice and the PasswordTextField are not updated. But 
 the user object contains the data for the ListMultipleChoice and the 
 PasswordTextField.
 Can anyone help please.


 Mit freundlichen Grüßen
 Christoph Manig



>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For 

AW: AW: AW: Update ListMultipleChoice by Ajax

2017-01-13 Thread Christoph.Manig
I created a small example. How can I send this to you?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport & Logistics
Annenstr. 5
01067 Dresden 
tel.:   +49 (0) 351 / 4744 - 188
fax:+49 (0) 351 / 4744 - 209
email:  christoph.ma...@t-systems.com

T-SYSTEMS INTERNATIONAL GMBH
Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo 
Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
Sitz der Gesellschaft: Frankfurt am Main
WEEE-Reg.-Nr. DE50335567


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Freitag, 13. Januar 2017 08:16
An: users@wicket.apache.org
Betreff: Re: AW: AW: Update ListMultipleChoice by Ajax

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 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
> An: users@wicket.apache.org
> Betreff: Re: AW: Update ListMultipleChoice by Ajax
>
> 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 build a quickstart for a deeper look?
>
> Regards
> Sven
>
>
>
> On 12.01.2017 15:35, christoph.ma...@t-systems.com wrote:
>> 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 Grüßen
>> Christoph Manig
>>
>> -Ursprüngliche Nachricht-
>> Von: Sven Meier [mailto:s...@meiers.net]
>> Gesendet: Donnerstag, 12. Januar 2017 14:20
>> An: users@wicket.apache.org
>> Betreff: Re: Update ListMultipleChoice by Ajax
>>
>> 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.
>>>
>>> ListMultipleChoice groups = new 
>>> ListMultipleChoice<>("groups", groupDao.getAllGroups(), new 
>>> ChoiceRenderer("groupname"));
>>> 
>>>
>>> PasswordTextField password = new RequiredPasswordField("password");
>>> 
>>>
>>> After clicking an AjaxLink I set a user object to the default model of the 
>>> form. Then the form will be rendered and I see all data of the user in the 
>>> fields of the form.
>>>
>>> But the ListMultipleChoice and the PasswordTextField are not updated. But 
>>> the user object contains the data for the ListMultipleChoice and the 
>>> PasswordTextField.
>>> Can anyone help please.
>>>
>>>
>>> Mit freundlichen Grüßen
>>> Christoph Manig
>>>
>>>
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org