You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Fernando Wermus <fe...@gmail.com> on 2010/02/08 02:22:10 UTC

Re: How to change content in ModalWindow

Chris,
     I have the same problem when switching content into a modal window. It
appears a modal window blank content too. Do you have solved it?

thanks in advance.

On Mon, Jan 25, 2010 at 3:03 PM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:

> My use case might explain the situation better:
>
> User visits a page that needs authentication. A ModalWindow appears with
> a username/password field pair and a 'sign in' button. In case they are
> a new user it also contains a 'create account' button. If they click
> this then the contents of the ModalWindow changes to hold more fields,
> name, email, password, confirm password etc., sufficient to creating a
> new account. I wanted to do a nice smooth switch from the 'sign in'
> presentation to the 'create account' presentation without the flicker of
> closing the form and bringing up a new form.
>
>
> > -----Original Message-----
> > From: Chris Colman [mailto:chrisc@stepaheadsoftware.com]
> > Sent: Tuesday, 26 January 2010 3:58 AM
> > To: users@wicket.apache.org
> > Subject: RE: How to change content in ModalWindow
> >
> > I tried that initially but calling modalContentWindow.show when there
> > already is a ModalWindow being displayed creates a new ModalWindow
> that
> > sits over the top of the original one meaning I now have 2 windows
> that
> > the user has to close.
> >
> > My aim is to have only one ModalWindow but just switch its contents.
> >
> > > Aren't you missing a :
> > >
> > > modalContentWindow.show(target)
> > >
> > > in the onClick callback ?
> > >
> > > 2010/1/25 Chris Colman <ch...@stepaheadsoftware.com>
> > >
> > > > Searching Nable shows this question has been asked before but
> there
> > none
> > > > of the solutions proposed there work for me.
> > > >
> > > > I have a link in PanelA that, when clicked, should cause PanelB to
> > > > display in the same ModalWindow (PanelB replaced PanelA).
> > > >
> > > > The onClick event handler does something like the following:
> > > >
> > > >    add
> > > >    (
> > > >        new AjaxLink("selectionLink")
> > > >        {
> > > >            public void onClick(AjaxRequestTarget target)
> > > >            {
> > > >                PanelB panelB = new
> > > >                    PanelB(modalContentWindow.getContentId());
> > > >
> > > >                    modalContentWindow.setContent(panelB);
> > > >                    modalContentWindow.setTitle("Hi, I'm PanelB");
> > > >                    target.addComponent(panelB);
> > > >            }
> > > >        }
> > > >    );
> > > >
> > > > When the link is pressed the panel A content disappears (popup
> > content
> > > > goes blank) but the panel B content does not appear.
> > > >
> > > > Should this work or have I missed something?
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

Re: How to change content in ModalWindow

Posted by Fernando Wermus <fe...@gmail.com>.
In my case, I do activate the modalWindow doing,

modalWindow.show

but It seems to have the same problem.

On Sun, Feb 7, 2010 at 11:22 PM, Fernando Wermus
<fe...@gmail.com>wrote:

> Chris,
>      I have the same problem when switching content into a modal window. It
> appears a modal window blank content too. Do you have solved it?
>
> thanks in advance.
>
> On Mon, Jan 25, 2010 at 3:03 PM, Chris Colman <
> chrisc@stepaheadsoftware.com> wrote:
>
>> My use case might explain the situation better:
>>
>> User visits a page that needs authentication. A ModalWindow appears with
>> a username/password field pair and a 'sign in' button. In case they are
>> a new user it also contains a 'create account' button. If they click
>> this then the contents of the ModalWindow changes to hold more fields,
>> name, email, password, confirm password etc., sufficient to creating a
>> new account. I wanted to do a nice smooth switch from the 'sign in'
>> presentation to the 'create account' presentation without the flicker of
>> closing the form and bringing up a new form.
>>
>>
>> > -----Original Message-----
>> > From: Chris Colman [mailto:chrisc@stepaheadsoftware.com]
>> > Sent: Tuesday, 26 January 2010 3:58 AM
>> > To: users@wicket.apache.org
>> > Subject: RE: How to change content in ModalWindow
>> >
>> > I tried that initially but calling modalContentWindow.show when there
>> > already is a ModalWindow being displayed creates a new ModalWindow
>> that
>> > sits over the top of the original one meaning I now have 2 windows
>> that
>> > the user has to close.
>> >
>> > My aim is to have only one ModalWindow but just switch its contents.
>> >
>> > > Aren't you missing a :
>> > >
>> > > modalContentWindow.show(target)
>> > >
>> > > in the onClick callback ?
>> > >
>> > > 2010/1/25 Chris Colman <ch...@stepaheadsoftware.com>
>> > >
>> > > > Searching Nable shows this question has been asked before but
>> there
>> > none
>> > > > of the solutions proposed there work for me.
>> > > >
>> > > > I have a link in PanelA that, when clicked, should cause PanelB to
>> > > > display in the same ModalWindow (PanelB replaced PanelA).
>> > > >
>> > > > The onClick event handler does something like the following:
>> > > >
>> > > >    add
>> > > >    (
>> > > >        new AjaxLink("selectionLink")
>> > > >        {
>> > > >            public void onClick(AjaxRequestTarget target)
>> > > >            {
>> > > >                PanelB panelB = new
>> > > >                    PanelB(modalContentWindow.getContentId());
>> > > >
>> > > >                    modalContentWindow.setContent(panelB);
>> > > >                    modalContentWindow.setTitle("Hi, I'm PanelB");
>> > > >                    target.addComponent(panelB);
>> > > >            }
>> > > >        }
>> > > >    );
>> > > >
>> > > > When the link is pressed the panel A content disappears (popup
>> > content
>> > > > goes blank) but the panel B content does not appear.
>> > > >
>> > > > Should this work or have I missed something?
>> > > >
>> > > >
>> > ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > > > For additional commands, e-mail: users-help@wicket.apache.org
>> > > >
>> > > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

RE: How to change content in ModalWindow

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
No I couldn't manage to get it working so I tried a completely different
approach. I ended up putting both the 'log in' and the 'create account'
panels in the same modal window using a TabbedPanel... at least it works
that way ;)

Chris

> Chris,
>      I have the same problem when switching content into a modal
window.
> It
> appears a modal window blank content too. Do you have solved it?
> 
> thanks in advance.
> 
> On Mon, Jan 25, 2010 at 3:03 PM, Chris Colman
> <ch...@stepaheadsoftware.com>wrote:
> 
> > My use case might explain the situation better:
> >
> > User visits a page that needs authentication. A ModalWindow appears
with
> > a username/password field pair and a 'sign in' button. In case they
are
> > a new user it also contains a 'create account' button. If they click
> > this then the contents of the ModalWindow changes to hold more
fields,
> > name, email, password, confirm password etc., sufficient to creating
a
> > new account. I wanted to do a nice smooth switch from the 'sign in'
> > presentation to the 'create account' presentation without the
flicker of
> > closing the form and bringing up a new form.
> >
> >
> > > -----Original Message-----
> > > From: Chris Colman [mailto:chrisc@stepaheadsoftware.com]
> > > Sent: Tuesday, 26 January 2010 3:58 AM
> > > To: users@wicket.apache.org
> > > Subject: RE: How to change content in ModalWindow
> > >
> > > I tried that initially but calling modalContentWindow.show when
there
> > > already is a ModalWindow being displayed creates a new ModalWindow
> > that
> > > sits over the top of the original one meaning I now have 2 windows
> > that
> > > the user has to close.
> > >
> > > My aim is to have only one ModalWindow but just switch its
contents.
> > >
> > > > Aren't you missing a :
> > > >
> > > > modalContentWindow.show(target)
> > > >
> > > > in the onClick callback ?
> > > >
> > > > 2010/1/25 Chris Colman <ch...@stepaheadsoftware.com>
> > > >
> > > > > Searching Nable shows this question has been asked before but
> > there
> > > none
> > > > > of the solutions proposed there work for me.
> > > > >
> > > > > I have a link in PanelA that, when clicked, should cause
PanelB to
> > > > > display in the same ModalWindow (PanelB replaced PanelA).
> > > > >
> > > > > The onClick event handler does something like the following:
> > > > >
> > > > >    add
> > > > >    (
> > > > >        new AjaxLink("selectionLink")
> > > > >        {
> > > > >            public void onClick(AjaxRequestTarget target)
> > > > >            {
> > > > >                PanelB panelB = new
> > > > >                    PanelB(modalContentWindow.getContentId());
> > > > >
> > > > >                    modalContentWindow.setContent(panelB);
> > > > >                    modalContentWindow.setTitle("Hi, I'm
PanelB");
> > > > >                    target.addComponent(panelB);
> > > > >            }
> > > > >        }
> > > > >    );
> > > > >
> > > > > When the link is pressed the panel A content disappears (popup
> > > content
> > > > > goes blank) but the panel B content does not appear.
> > > > >
> > > > > Should this work or have I missed something?
> > > > >
> > > > >
> > >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > >
> > > > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 
> 
> --
> Fernando Wermus.
> 
> www.linkedin.com/in/fernandowermus

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