You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tejash Tarun <tt...@educator.eu> on 2011/07/27 10:34:16 UTC

Dialog Box is not replaced

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

Re: Dialog Box is not replaced

Posted by Tejash Tarun <tt...@educator.eu>.
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 <ad...@ciseonweb.it>wrote:

> 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.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Dialog Box is not replaced

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
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.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dialog Box is not replaced

Posted by Martin Grigorov <mg...@apache.org>.
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 <tt...@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 <mg...@apache.org>wrote:
>
>> See org.apache.wicket.Component.replaceWith(Component) javadoc.
>> It says:  Usage: <code>component =
>> component.replaceWith(replacement);</code>
>>
>> On Wed, Jul 27, 2011 at 1:34 PM, Tejash Tarun <tt...@educator.eu> wrote:
>> > Hi Martin,
>> >
>> > It is a panel.
>> >
>> > On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov <mgrigorov@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 <tt...@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-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>



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

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


RE: Dialog Box is not replaced

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> @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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dialog Box is not replaced

Posted by Tejash Tarun <tt...@educator.eu>.
@Martin:  after calling D1.replaceWith(D2), D1=D2 is done as well.


On Wed, Jul 27, 2011 at 4:29 PM, Martin Grigorov <mg...@apache.org>wrote:

> See org.apache.wicket.Component.replaceWith(Component) javadoc.
> It says:  Usage: <code>component =
> component.replaceWith(replacement);</code>
>
> On Wed, Jul 27, 2011 at 1:34 PM, Tejash Tarun <tt...@educator.eu> wrote:
> > Hi Martin,
> >
> > It is a panel.
> >
> > On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov <mgrigorov@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 <tt...@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-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Dialog Box is not replaced

Posted by Martin Grigorov <mg...@apache.org>.
See org.apache.wicket.Component.replaceWith(Component) javadoc.
It says:  Usage: <code>component = component.replaceWith(replacement);</code>

On Wed, Jul 27, 2011 at 1:34 PM, Tejash Tarun <tt...@educator.eu> wrote:
> Hi Martin,
>
> It is a panel.
>
> On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov <mg...@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 <tt...@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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>



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

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


Re: Dialog Box is not replaced

Posted by Tejash Tarun <tt...@educator.eu>.
Hi Martin,

It is a panel.

On Wed, Jul 27, 2011 at 3:45 PM, Martin Grigorov <mg...@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 <tt...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Dialog Box is not replaced

Posted by Martin Grigorov <mg...@apache.org>.
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 <tt...@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org