AW: AW: nested forms with modal window

2017-02-24 Thread Christoph.Manig
I close the window in the onSubmit method of the modal window form, you see 
this below. How can I notify the Button of the mother form that he can execute 
the other statements because the window is closed?

I don't want to update an component what should I put in the 
WindowClosedCallback?


Mit freundlichen Grüßen
Christoph Manig


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Freitag, 24. Februar 2017 10:58
An: users@wicket.apache.org
Betreff: Re: AW: nested forms with modal window

Hi,

it's your code which closes the ModalWindow, you can notify other parts of your 
project that the window will be closed.

Or use a WindowClosedCallback.

Have fun
Sven


On 24.02.2017 10:00, christoph.ma...@t-systems.com wrote:
> Hello,
>
> what can I do to realize it that the loop will be executed after the modal 
> window was closed? I need the data which adds the modal window to the message 
> objects.
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
> -Ursprüngliche Nachricht-
> Von: Sven Meier [mailto:s...@meiers.net]
> Gesendet: Donnerstag, 23. Februar 2017 16:36
> An: users@wicket.apache.org
> Betreff: Re: nested forms with modal window
>
> Hi,
>
>> public void onSubmit(AjaxRequestTarget target, Form form) {
>>   remarkModalWindow.show(target);
>>   for(FaultModel fm : selectedModel.getObject()) {
>> System.out.println("ActionButton Remark: " + fm.getFaultRemark());
>>   }
>> }
>> the submit of my modal window will be executed ... after he runs through the 
>> selectedModel.
> Wicket's modal window isn't 'modal' in that it holds processing until it is 
> closed again.
> So of course your loop will execute immediately after telling the model 
> window to be shown - it will not be shown until the current thread has 
> finished request processing.
>
> Regards
> Sven
>
>
> On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:
>> Hello,
>>
>> I have a form which contains a modal window. The submit button of this form 
>> is an AjaxButton and should first open the modal window. This form contains 
>> a collection of message object which should be changed by the modal window.
>>
>> The modal window also contains a form and a AjaxButton to submit the form. 
>> Here the user can write something into a textfield and submit this form of 
>> the modal window. So the message objects will be changed by the users input 
>> and then the modal window will be closed by modalWindow.close(target).
>>
>> This is the submit of the mother form:
>> @Override
>> public void onSubmit(AjaxRequestTarget target, Form form) {
>>   remarkModalWindow.show(target);
>>   for(FaultModel fm : selectedModel.getObject()) {
>>   System.out.println("ActionButton Remark: " + 
>> fm.getFaultRemark());
>>   }
>> }
>>
>> The selected model is a collection of messages which should be changed by 
>> the modal window. Therefore I will show the submit of the form of the modal 
>> window:
>> @Override
>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>>   RemarkForm remarkForm = (RemarkForm)form;
>>   for(FaultModel faultModel : 
>> remarkForm.getSelectedModel().getObject()) {
>>   System.out.println("Sets the old remark " + 
>> faultModel.getFaultRemark() + " to " + 
>> remarkForm.getModelObject().getFaultRemark());
>>   
>> faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
>>   }
>>   remarkForm.getRemarkModalWindow().close(target);
>> }
>>
>> The change of the remark is successful and the window will be closed fine. 
>> But on my console I see the output:
>>
>> ActionButton Remark: null
>> Sets the old remark null to testen
>>
>> So it says the submit of my modal window will be executed to late. It will 
>> be triggered after he runs through the selectedModel. But first I want to 
>> change the selectedModel by the modal window and close it and then I want to 
>> write the output in the mother submit to the console. Why did he trigger the 
>> next steps after calling modalWindow.show? I thought the inner form have to 
>> be submitted before the next steps of the mother submit will be called.
>>
>> What can I do here?
>>
>>
>> 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: 

Re: AW: nested forms with modal window

2017-02-24 Thread Sven Meier

Hi,

it's your code which closes the ModalWindow, you can notify other parts 
of your project that the window will be closed.


Or use a WindowClosedCallback.

Have fun
Sven


On 24.02.2017 10:00, christoph.ma...@t-systems.com wrote:

Hello,

what can I do to realize it that the loop will be executed after the modal 
window was closed? I need the data which adds the modal window to the message 
objects.


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Donnerstag, 23. Februar 2017 16:36
An: users@wicket.apache.org
Betreff: Re: nested forms with modal window

Hi,


public void onSubmit(AjaxRequestTarget target, Form form) {
  remarkModalWindow.show(target);
  for(FaultModel fm : selectedModel.getObject()) {
System.out.println("ActionButton Remark: " + fm.getFaultRemark());
  }
}
the submit of my modal window will be executed ... after he runs through the 
selectedModel.

Wicket's modal window isn't 'modal' in that it holds processing until it is 
closed again.
So of course your loop will execute immediately after telling the model window 
to be shown - it will not be shown until the current thread has finished 
request processing.

Regards
Sven


On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:

Hello,

I have a form which contains a modal window. The submit button of this form is 
an AjaxButton and should first open the modal window. This form contains a 
collection of message object which should be changed by the modal window.

The modal window also contains a form and a AjaxButton to submit the form. Here 
the user can write something into a textfield and submit this form of the modal 
window. So the message objects will be changed by the users input and then the 
modal window will be closed by modalWindow.close(target).

This is the submit of the mother form:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
  remarkModalWindow.show(target);
  for(FaultModel fm : selectedModel.getObject()) {
  System.out.println("ActionButton Remark: " + 
fm.getFaultRemark());
  }
}

The selected model is a collection of messages which should be changed by the 
modal window. Therefore I will show the submit of the form of the modal window:
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
  RemarkForm remarkForm = (RemarkForm)form;
  for(FaultModel faultModel : 
remarkForm.getSelectedModel().getObject()) {
  System.out.println("Sets the old remark " + faultModel.getFaultRemark() 
+ " to " + remarkForm.getModelObject().getFaultRemark());
  
faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
  }
  remarkForm.getRemarkModalWindow().close(target);
}

The change of the remark is successful and the window will be closed fine. But 
on my console I see the output:

ActionButton Remark: null
Sets the old remark null to testen

So it says the submit of my modal window will be executed to late. It will be 
triggered after he runs through the selectedModel. But first I want to change 
the selectedModel by the modal window and close it and then I want to write the 
output in the mother submit to the console. Why did he trigger the next steps 
after calling modalWindow.show? I thought the inner form have to be submitted 
before the next steps of the mother submit will be called.

What can I do here?


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



AW: nested forms with modal window

2017-02-24 Thread Christoph.Manig
Hello,

what can I do to realize it that the loop will be executed after the modal 
window was closed? I need the data which adds the modal window to the message 
objects.


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Donnerstag, 23. Februar 2017 16:36
An: users@wicket.apache.org
Betreff: Re: nested forms with modal window

Hi,

>public void onSubmit(AjaxRequestTarget target, Form form) {
>  remarkModalWindow.show(target);
>  for(FaultModel fm : selectedModel.getObject()) {
>System.out.println("ActionButton Remark: " + fm.getFaultRemark());
>  }
>}
> the submit of my modal window will be executed ... after he runs through the 
> selectedModel.

Wicket's modal window isn't 'modal' in that it holds processing until it is 
closed again.
So of course your loop will execute immediately after telling the model window 
to be shown - it will not be shown until the current thread has finished 
request processing.

Regards
Sven


On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:
> Hello,
>
> I have a form which contains a modal window. The submit button of this form 
> is an AjaxButton and should first open the modal window. This form contains a 
> collection of message object which should be changed by the modal window.
>
> The modal window also contains a form and a AjaxButton to submit the form. 
> Here the user can write something into a textfield and submit this form of 
> the modal window. So the message objects will be changed by the users input 
> and then the modal window will be closed by modalWindow.close(target).
>
> This is the submit of the mother form:
> @Override
> public void onSubmit(AjaxRequestTarget target, Form form) {
>  remarkModalWindow.show(target);
>  for(FaultModel fm : selectedModel.getObject()) {
>  System.out.println("ActionButton Remark: " + 
> fm.getFaultRemark());
>  }
> }
>
> The selected model is a collection of messages which should be changed by the 
> modal window. Therefore I will show the submit of the form of the modal 
> window:
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form form) {
>  RemarkForm remarkForm = (RemarkForm)form;
>  for(FaultModel faultModel : 
> remarkForm.getSelectedModel().getObject()) {
>  System.out.println("Sets the old remark " + 
> faultModel.getFaultRemark() + " to " + 
> remarkForm.getModelObject().getFaultRemark());
>  
> faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
>  }
>  remarkForm.getRemarkModalWindow().close(target);
> }
>
> The change of the remark is successful and the window will be closed fine. 
> But on my console I see the output:
>
> ActionButton Remark: null
> Sets the old remark null to testen
>
> So it says the submit of my modal window will be executed to late. It will be 
> triggered after he runs through the selectedModel. But first I want to change 
> the selectedModel by the modal window and close it and then I want to write 
> the output in the mother submit to the console. Why did he trigger the next 
> steps after calling modalWindow.show? I thought the inner form have to be 
> submitted before the next steps of the mother submit will be called.
>
> What can I do here?
>
>
> 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



Re: Java Wickets Delete Multiple Entries CheckboxGroup

2017-02-24 Thread Martin Grigorov
Hi,

Do not use " String users = group.getDefaultModelObjectAsString();"
group.getModelObject() will return a List which you can use to do the
DB operations.

The problem is in your DAO code so it is not Wicket issue. You should ask
in some other forum for help.
I'd recommend you to improve your DAO to work with List and execute batch
update, e.g. DELETE FROM Users where username IN (?). This way it will
execute 1 SQL query instead of N.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Feb 22, 2017 at 7:14 PM, ASHU_JAVA  wrote:

> Hello All,
>
> I've been using CheckBoxGroup in my application and followed the below
> example URL:-
> http://examples7x.wicket.apache.org/compref/wicket/
> bookmarkable/org.apache.wicket.examples.compref.CheckGroupPage;jsessionid=
> A65260928022BEDC4A2943D0F5FD6996?0
>  bookmarkable/org.apache.wicket.examples.compref.CheckGroupPage;jsessionid=
> A65260928022BEDC4A2943D0F5FD6996?0>
>
> I need to remove single, multiple or all entries from database by selecting
> checkbox.
>
> 
>
> On clicking the delete button, I was able to fetch the corresponding
> entries
> like "Manoj", "Neeraj" and then I performed below operation in my panel:-
>
>
>
> For first username record, deleteUserStoreDomain() method return TRUE but
> for each next username record it returns FALSE.
>
> Thus, I'm unable to perform 'multiple' and 'all' username records deletion.
>
> Kindly suggest solutions for this issue.
> Thanks in advance.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Java-Wickets-Delete-Multiple-Entries-
> CheckboxGroup-tp4677171.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
>
>


Re: http://examples8x.wicket.apache.org/websockets/ partial down?

2017-02-24 Thread Martin Grigorov
This is a known issue.
For some reason WebSockets do not work out of the box on OpenShift. The
examples worked fine on Wildfly 10 last time I've tried. Needs debugging ...

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Feb 21, 2017 at 8:35 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Does not seem to work? Also clicking source code gives an internal error..
> Once there where disk space problems..?
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>