Re: [Wicket-user] modal window is closed when form inside content panel is submitted

2007-01-10 Thread Matej Knopp
Can you please check your log? Probably there will be an exception. Can 
you post the stacktrace?

-Matej

Nili Adoram wrote:
 I tried replacing the original SubmitLink in the form with an 
 AjaxSubmitLink:
 
 public class AdvancedSearchForm extends Form {
 
 private static final String id = advanedSearchFrom;
 
 public AdvancedSearchForm(IModel model) {
 super(id, model);
   
 add(new TextField(name));
 add(new TextField(user));
 
 //  old code:
 //add(new SubmitLink(submitSearch));
 add(new AjaxSubmitLink(submitSearch,AdvancedSearchForm.this){
 
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 ModalWindow.close(target);

 }});
 }
  
 }
 
 However the modal window did not open and the following errors were 
 displayed:
 
 Firefox Error console:
 
 Error: no element found
 Source File: 
 http://nilia/provision?wicket:interface=:9:simpleSearchPanel:advancedSearch::IBehaviorListenerwicket:behaviorId=0random=0.6456663530703572
 Line: 1, Column: 54
 Source Code:
 ?xml version=1.0 
 encoding=UTF-8?ajax-response-^
 Error: no element found
 Source File: 
 http://nilia/provision/plugins/request-provision/ProvisioningRequests
 Line: 1, Column: 54
 Source Code:
 ?xml version=1.0 
 encoding=UTF-8?ajax-response-^
 
 Wicket Ajax Debug window:
 -
 ?xml version=1.0 encoding=UTF-8?ajax-response
 ERROR: Error while parsing response: Could not find root ajax-response 
 element
  INFO: Invoking post-call handler(s)...
  INFO: Invoking failure handler(s)...
 
 When I replace the AjaxSubmitLink back with a SubmitLink the modal 
 window properly appears.
 
 Thanks
 Nili
 
 Matej Knopp wrote:
 You have to use AjaxSubmitLink and call Window.close(target) inside the 
 onSubmit(AjaxRequestTarget...) method.

 -Matej

 Nili Adoram wrote:
   
 Hi all,

 I have a panel (named AdvancedSearchPanel) containing a Form with a 
 SubmitLink.

 I open this panel inside a modal dialog:

 final ModalWindow modal;
 add(modal = new ModalWindow(modalAdvancedSearch));

 final AdvancedSearchPanel searchPanel = new 
 AdvancedSearchPanel(modal
 .getContentId());
 modal.setContent(searchPanel);

 When the form is submitted, a message is displayed  (Reloading this 
 page will cause the modal window disappear.)  and the modal window is 
 closed.

 However, the CloseButtonCallback and WindowClosedCallback are not called.

 These callbacks are only called if the close button is clicked.

 What causes the submit button to close the window?
 How can verify that these callbacks are invoked whenever the window is 
 closed?

 Thanks,
 Nili



 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] modal window is closed when form inside content panel is submitted

2007-01-10 Thread Nili Adoram

Indeed there was an error since I put an input tag for the 
AjaxSubmitLink inside the markup instead of a tag.
I fixed the markup and now the form is submitted, the modal window is 
closed and the window closed callback is invoked.

Thank you,
Nili


Matej Knopp wrote:
 Can you please check your log? Probably there will be an exception. Can 
 you post the stacktrace?

 -Matej

 Nili Adoram wrote:
   
 I tried replacing the original SubmitLink in the form with an 
 AjaxSubmitLink:

 public class AdvancedSearchForm extends Form {

 private static final String id = advanedSearchFrom;

 public AdvancedSearchForm(IModel model) {
 super(id, model);
   
 add(new TextField(name));
 add(new TextField(user));

 //  old code:
 //add(new SubmitLink(submitSearch));
 add(new AjaxSubmitLink(submitSearch,AdvancedSearchForm.this){

 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 ModalWindow.close(target);

 }});
 }
  
 }

 However the modal window did not open and the following errors were 
 displayed:

 Firefox Error console:
 
 Error: no element found
 Source File: 
 http://nilia/provision?wicket:interface=:9:simpleSearchPanel:advancedSearch::IBehaviorListenerwicket:behaviorId=0random=0.6456663530703572
 Line: 1, Column: 54
 Source Code:
 ?xml version=1.0 
 encoding=UTF-8?ajax-response-^
 Error: no element found
 Source File: 
 http://nilia/provision/plugins/request-provision/ProvisioningRequests
 Line: 1, Column: 54
 Source Code:
 ?xml version=1.0 
 encoding=UTF-8?ajax-response-^

 Wicket Ajax Debug window:
 -
 ?xml version=1.0 encoding=UTF-8?ajax-response
 ERROR: Error while parsing response: Could not find root ajax-response 
 element
  INFO: Invoking post-call handler(s)...
  INFO: Invoking failure handler(s)...

 When I replace the AjaxSubmitLink back with a SubmitLink the modal 
 window properly appears.

 Thanks
 Nili

 Matej Knopp wrote:
 
 You have to use AjaxSubmitLink and call Window.close(target) inside the 
 onSubmit(AjaxRequestTarget...) method.

 -Matej

 Nili Adoram wrote:
   
   
 Hi all,

 I have a panel (named AdvancedSearchPanel) containing a Form with a 
 SubmitLink.

 I open this panel inside a modal dialog:

 final ModalWindow modal;
 add(modal = new ModalWindow(modalAdvancedSearch));

 final AdvancedSearchPanel searchPanel = new 
 AdvancedSearchPanel(modal
 .getContentId());
 modal.setContent(searchPanel);

 When the form is submitted, a message is displayed  (Reloading this 
 page will cause the modal window disappear.)  and the modal window is 
 closed.

 However, the CloseButtonCallback and WindowClosedCallback are not called.

 These callbacks are only called if the close button is clicked.

 What causes the submit button to close the window?
 How can verify that these callbacks are invoked whenever the window is 
 closed?

 Thanks,
 Nili



 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share 
 your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions 

[Wicket-user] modal window is closed when form inside content panel is submitted

2007-01-09 Thread Nili Adoram
Hi all,

I have a panel (named AdvancedSearchPanel) containing a Form with a 
SubmitLink.

I open this panel inside a modal dialog:

final ModalWindow modal;
add(modal = new ModalWindow(modalAdvancedSearch));

final AdvancedSearchPanel searchPanel = new 
AdvancedSearchPanel(modal
.getContentId());
modal.setContent(searchPanel);

When the form is submitted, a message is displayed  (Reloading this 
page will cause the modal window disappear.)  and the modal window is 
closed.

However, the CloseButtonCallback and WindowClosedCallback are not called.

These callbacks are only called if the close button is clicked.

What causes the submit button to close the window?
How can verify that these callbacks are invoked whenever the window is 
closed?

Thanks,
Nili



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] modal window is closed when form inside content panel is submitted

2007-01-09 Thread Carfield Yim
I just get the problem, solved by using ajax form button, you can see
how I solve it at
http://www.nabble.com/Submit-a-form-at-ModalWindow-cause-the-ModalWindow-close.-tf2912895.html#a8139020


On 1/9/07, Nili Adoram [EMAIL PROTECTED] wrote:
 Hi all,

 I have a panel (named AdvancedSearchPanel) containing a Form with a
 SubmitLink.

 I open this panel inside a modal dialog:

 final ModalWindow modal;
 add(modal = new ModalWindow(modalAdvancedSearch));

 final AdvancedSearchPanel searchPanel = new
 AdvancedSearchPanel(modal
 .getContentId());
 modal.setContent(searchPanel);

 When the form is submitted, a message is displayed  (Reloading this
 page will cause the modal window disappear.)  and the modal window is
 closed.

 However, the CloseButtonCallback and WindowClosedCallback are not called.

 These callbacks are only called if the close button is clicked.

 What causes the submit button to close the window?
 How can verify that these callbacks are invoked whenever the window is
 closed?

 Thanks,
 Nili



 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] modal window is closed when form inside content panel is submitted

2007-01-09 Thread Matej Knopp
You have to use AjaxSubmitLink and call Window.close(target) inside the 
onSubmit(AjaxRequestTarget...) method.

-Matej

Nili Adoram wrote:
 Hi all,
 
 I have a panel (named AdvancedSearchPanel) containing a Form with a 
 SubmitLink.
 
 I open this panel inside a modal dialog:
 
 final ModalWindow modal;
 add(modal = new ModalWindow(modalAdvancedSearch));
 
 final AdvancedSearchPanel searchPanel = new 
 AdvancedSearchPanel(modal
 .getContentId());
 modal.setContent(searchPanel);
 
 When the form is submitted, a message is displayed  (Reloading this 
 page will cause the modal window disappear.)  and the modal window is 
 closed.
 
 However, the CloseButtonCallback and WindowClosedCallback are not called.
 
 These callbacks are only called if the close button is clicked.
 
 What causes the submit button to close the window?
 How can verify that these callbacks are invoked whenever the window is 
 closed?
 
 Thanks,
 Nili
 
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] modal window is closed when form inside content panel is submitted

2007-01-09 Thread Nili Adoram
I tried replacing the original SubmitLink in the form with an 
AjaxSubmitLink:

public class AdvancedSearchForm extends Form {

private static final String id = advanedSearchFrom;

public AdvancedSearchForm(IModel model) {
super(id, model);
  
add(new TextField(name));
add(new TextField(user));

//  old code:
//add(new SubmitLink(submitSearch));
add(new AjaxSubmitLink(submitSearch,AdvancedSearchForm.this){

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
ModalWindow.close(target);
   
}});
}
 
}

However the modal window did not open and the following errors were 
displayed:

Firefox Error console:

Error: no element found
Source File: 
http://nilia/provision?wicket:interface=:9:simpleSearchPanel:advancedSearch::IBehaviorListenerwicket:behaviorId=0random=0.6456663530703572
Line: 1, Column: 54
Source Code:
?xml version=1.0 
encoding=UTF-8?ajax-response-^
Error: no element found
Source File: 
http://nilia/provision/plugins/request-provision/ProvisioningRequests
Line: 1, Column: 54
Source Code:
?xml version=1.0 
encoding=UTF-8?ajax-response-^

Wicket Ajax Debug window:
-
?xml version=1.0 encoding=UTF-8?ajax-response
ERROR: Error while parsing response: Could not find root ajax-response element
 INFO: Invoking post-call handler(s)...
 INFO: Invoking failure handler(s)...

When I replace the AjaxSubmitLink back with a SubmitLink the modal 
window properly appears.

Thanks
Nili

Matej Knopp wrote:
 You have to use AjaxSubmitLink and call Window.close(target) inside the 
 onSubmit(AjaxRequestTarget...) method.

 -Matej

 Nili Adoram wrote:
   
 Hi all,

 I have a panel (named AdvancedSearchPanel) containing a Form with a 
 SubmitLink.

 I open this panel inside a modal dialog:

 final ModalWindow modal;
 add(modal = new ModalWindow(modalAdvancedSearch));

 final AdvancedSearchPanel searchPanel = new 
 AdvancedSearchPanel(modal
 .getContentId());
 modal.setContent(searchPanel);

 When the form is submitted, a message is displayed  (Reloading this 
 page will cause the modal window disappear.)  and the modal window is 
 closed.

 However, the CloseButtonCallback and WindowClosedCallback are not called.

 These callbacks are only called if the close button is clicked.

 What causes the submit button to close the window?
 How can verify that these callbacks are invoked whenever the window is 
 closed?

 Thanks,
 Nili



 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user