Re: Dialog Box is not replaced

2011-07-27 Thread Andrea Del Bene

Hi,

try adding to ajaxRequestTarget the parent component instead of D1 and D2.


Hi,

In my page I have two dialog box say D1 and D2.

When clicking some link D1 should come, and it is happening. It is a
confirmation dialog box.

Now when I click ok button in D1 then D2 should be shown by replacing D1.

code is

D1.replaceWith(D2);
ajaxRequestTarget.add(D1);
ajaxRequestTarget.add(D2);

But nothing is happening on the screen.

Looking forward for some suggestions and answer.
Thanks in advance.

Regards,
Tejash




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



Re: Dialog Box is not replaced

2011-07-27 Thread Tejash Tarun
Hi Andrea,

Thanks for replying. But if I add only parent to the target then D1 goes but
D2 is not appearing.

On Wed, Jul 27, 2011 at 2:28 PM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 Hi,

 try adding to ajaxRequestTarget the parent component instead of D1 and D2.


  Hi,

 In my page I have two dialog box say D1 and D2.

 When clicking some link D1 should come, and it is happening. It is a
 confirmation dialog box.

 Now when I click ok button in D1 then D2 should be shown by replacing D1.

 code is

 D1.replaceWith(D2);
 ajaxRequestTarget.add(D1);
 ajaxRequestTarget.add(D2);

 But nothing is happening on the screen.

 Looking forward for some suggestions and answer.
 Thanks in advance.

 Regards,
 Tejash



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




Re: Dialog Box is not replaced

2011-07-27 Thread Martin Grigorov
What is the type of this DialogBox ? Is it a Panel or a ModalWindow?

On Wed, Jul 27, 2011 at 11:34 AM, Tejash Tarun ttej...@educator.eu wrote:
 Hi,

 In my page I have two dialog box say D1 and D2.

 When clicking some link D1 should come, and it is happening. It is a
 confirmation dialog box.

 Now when I click ok button in D1 then D2 should be shown by replacing D1.

 code is

 D1.replaceWith(D2);
 ajaxRequestTarget.add(D1);
 ajaxRequestTarget.add(D2);

 But nothing is happening on the screen.

 Looking forward for some suggestions and answer.
 Thanks in advance.

 Regards,
 Tejash




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Dialog Box is not replaced

2011-07-27 Thread Tejash Tarun
Hi Martin,

It is a panel.

On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 What is the type of this DialogBox ? Is it a Panel or a ModalWindow?

 On Wed, Jul 27, 2011 at 11:34 AM, Tejash Tarun ttej...@educator.eu
 wrote:
  Hi,
 
  In my page I have two dialog box say D1 and D2.
 
  When clicking some link D1 should come, and it is happening. It is a
  confirmation dialog box.
 
  Now when I click ok button in D1 then D2 should be shown by replacing D1.
 
  code is
 
  D1.replaceWith(D2);
  ajaxRequestTarget.add(D1);
  ajaxRequestTarget.add(D2);
 
  But nothing is happening on the screen.
 
  Looking forward for some suggestions and answer.
  Thanks in advance.
 
  Regards,
  Tejash
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Dialog Box is not replaced

2011-07-27 Thread Martin Grigorov
See org.apache.wicket.Component.replaceWith(Component) javadoc.
It says:  Usage: codecomponent = component.replaceWith(replacement);/code

On Wed, Jul 27, 2011 at 1:34 PM, Tejash Tarun ttej...@educator.eu wrote:
 Hi Martin,

 It is a panel.

 On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 What is the type of this DialogBox ? Is it a Panel or a ModalWindow?

 On Wed, Jul 27, 2011 at 11:34 AM, Tejash Tarun ttej...@educator.eu
 wrote:
  Hi,
 
  In my page I have two dialog box say D1 and D2.
 
  When clicking some link D1 should come, and it is happening. It is a
  confirmation dialog box.
 
  Now when I click ok button in D1 then D2 should be shown by replacing D1.
 
  code is
 
  D1.replaceWith(D2);
  ajaxRequestTarget.add(D1);
  ajaxRequestTarget.add(D2);
 
  But nothing is happening on the screen.
 
  Looking forward for some suggestions and answer.
  Thanks in advance.
 
  Regards,
  Tejash
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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






-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Dialog Box is not replaced

2011-07-27 Thread Tejash Tarun
@Martin:  after calling D1.replaceWith(D2), D1=D2 is done as well.


On Wed, Jul 27, 2011 at 4:29 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 See org.apache.wicket.Component.replaceWith(Component) javadoc.
 It says:  Usage: codecomponent =
 component.replaceWith(replacement);/code

 On Wed, Jul 27, 2011 at 1:34 PM, Tejash Tarun ttej...@educator.eu wrote:
  Hi Martin,
 
  It is a panel.
 
  On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  What is the type of this DialogBox ? Is it a Panel or a ModalWindow?
 
  On Wed, Jul 27, 2011 at 11:34 AM, Tejash Tarun ttej...@educator.eu
  wrote:
   Hi,
  
   In my page I have two dialog box say D1 and D2.
  
   When clicking some link D1 should come, and it is happening. It is a
   confirmation dialog box.
  
   Now when I click ok button in D1 then D2 should be shown by replacing
 D1.
  
   code is
  
   D1.replaceWith(D2);
   ajaxRequestTarget.add(D1);
   ajaxRequestTarget.add(D2);
  
   But nothing is happening on the screen.
  
   Looking forward for some suggestions and answer.
   Thanks in advance.
  
   Regards,
   Tejash
  
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Dialog Box is not replaced

2011-07-27 Thread Martin Grigorov
D2 replaces D1, but D1 is reassigned to D2, so there is no need to
target.add(D2)

It is hard to help you with the information you give us.

On Wed, Jul 27, 2011 at 3:17 PM, Tejash Tarun ttej...@educator.eu wrote:
 @Martin:  after calling D1.replaceWith(D2), D1=D2 is done as well.


 On Wed, Jul 27, 2011 at 4:29 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 See org.apache.wicket.Component.replaceWith(Component) javadoc.
 It says:  Usage: codecomponent =
 component.replaceWith(replacement);/code

 On Wed, Jul 27, 2011 at 1:34 PM, Tejash Tarun ttej...@educator.eu wrote:
  Hi Martin,
 
  It is a panel.
 
  On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  What is the type of this DialogBox ? Is it a Panel or a ModalWindow?
 
  On Wed, Jul 27, 2011 at 11:34 AM, Tejash Tarun ttej...@educator.eu
  wrote:
   Hi,
  
   In my page I have two dialog box say D1 and D2.
  
   When clicking some link D1 should come, and it is happening. It is a
   confirmation dialog box.
  
   Now when I click ok button in D1 then D2 should be shown by replacing
 D1.
  
   code is
  
   D1.replaceWith(D2);
   ajaxRequestTarget.add(D1);
   ajaxRequestTarget.add(D2);
  
   But nothing is happening on the screen.
  
   Looking forward for some suggestions and answer.
   Thanks in advance.
  
   Regards,
   Tejash
  
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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






-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: Dialog Box is not replaced

2011-07-27 Thread Wilhelmsen Tor Iver
 @Martin:  after calling D1.replaceWith(D2), D1=D2 is done as well.

Are you sure you call D2.setOutputMarkupId(true)? Otherwise the Wicket Ajax 
handler will not find the correct DOM element to replace.

- Tor Iver


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