You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Lindner <li...@visionet.de> on 2010/07/29 21:58:05 UTC

DropDownChoice for opening a new Window

Is it possible to have a DropDownChoice that responds to a new window
when selected? What I mean is

	new DropDownChoice<T>(...) {
		protected void onSelectionChanged(Integer newSelection)
{
			// Send response to a new open window as if
clicket to a Link with PopupSettings
		}
	}

Stefan

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


RE: DropDownChoice for opening a new Window

Posted by Stefan Lindner <li...@visionet.de>.
Thank you once again. I ended up with

	wantOnChangeNotification true

and modify the onclick script from 

	onchange="window.location.href='?wicket.....

to

	onchange="window.open('?wicket.....

If anyone else ever needs this toos.

Stefan.

-----Ursprüngliche Nachricht-----
Von: Pedro Santos [mailto:pedrosans@gmail.com] 
Gesendet: Donnerstag, 29. Juli 2010 22:32
An: users@wicket.apache.org
Betreff: Re: DropDownChoice for opening a new Window

The first javascript api that comes to my mind is the onclick method, you
can add on your page an Link component, with all PopupSettings of your need.
Then you send to browser some javascript like:
Wicket.$('linkmarkupid').onclick

On Thu, Jul 29, 2010 at 5:23 PM, Stefan Lindner <li...@visionet.de> wrote:

> Dear Pedro,
>
> thank you! Do you have any code snipplet or just a function name for
> google?
>
> Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: Pedro Santos [mailto:pedrosans@gmail.com]
> Gesendet: Donnerstag, 29. Juli 2010 22:21
> An: users@wicket.apache.org
> Betreff: Re: DropDownChoice for opening a new Window
>
> Yes, use javascript to reach that functionality. For instance, you can add
> an AjaxFormComponentUpdatingBehavior for the onchange event of your
> DropDownChoice. At the onUpdate method implementation, you can append the
> needed javascript to open your new window.
>
> On Thu, Jul 29, 2010 at 4:58 PM, Stefan Lindner <li...@visionet.de>
> wrote:
>
> > Is it possible to have a DropDownChoice that responds to a new window
> > when selected? What I mean is
> >
> >        new DropDownChoice<T>(...) {
> >                protected void onSelectionChanged(Integer newSelection)
> > {
> >                        // Send response to a new open window as if
> > clicket to a Link with PopupSettings
> >                }
> >        }
> >
> > Stefan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

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


Re: DropDownChoice for opening a new Window

Posted by Pedro Santos <pe...@gmail.com>.
The first javascript api that comes to my mind is the onclick method, you
can add on your page an Link component, with all PopupSettings of your need.
Then you send to browser some javascript like:
Wicket.$('linkmarkupid').onclick

On Thu, Jul 29, 2010 at 5:23 PM, Stefan Lindner <li...@visionet.de> wrote:

> Dear Pedro,
>
> thank you! Do you have any code snipplet or just a function name for
> google?
>
> Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: Pedro Santos [mailto:pedrosans@gmail.com]
> Gesendet: Donnerstag, 29. Juli 2010 22:21
> An: users@wicket.apache.org
> Betreff: Re: DropDownChoice for opening a new Window
>
> Yes, use javascript to reach that functionality. For instance, you can add
> an AjaxFormComponentUpdatingBehavior for the onchange event of your
> DropDownChoice. At the onUpdate method implementation, you can append the
> needed javascript to open your new window.
>
> On Thu, Jul 29, 2010 at 4:58 PM, Stefan Lindner <li...@visionet.de>
> wrote:
>
> > Is it possible to have a DropDownChoice that responds to a new window
> > when selected? What I mean is
> >
> >        new DropDownChoice<T>(...) {
> >                protected void onSelectionChanged(Integer newSelection)
> > {
> >                        // Send response to a new open window as if
> > clicket to a Link with PopupSettings
> >                }
> >        }
> >
> > Stefan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

RE: DropDownChoice for opening a new Window

Posted by Stefan Lindner <li...@visionet.de>.
Dear Pedro,

thank you! Do you have any code snipplet or just a function name for google?

Stefan

-----Ursprüngliche Nachricht-----
Von: Pedro Santos [mailto:pedrosans@gmail.com] 
Gesendet: Donnerstag, 29. Juli 2010 22:21
An: users@wicket.apache.org
Betreff: Re: DropDownChoice for opening a new Window

Yes, use javascript to reach that functionality. For instance, you can add
an AjaxFormComponentUpdatingBehavior for the onchange event of your
DropDownChoice. At the onUpdate method implementation, you can append the
needed javascript to open your new window.

On Thu, Jul 29, 2010 at 4:58 PM, Stefan Lindner <li...@visionet.de> wrote:

> Is it possible to have a DropDownChoice that responds to a new window
> when selected? What I mean is
>
>        new DropDownChoice<T>(...) {
>                protected void onSelectionChanged(Integer newSelection)
> {
>                        // Send response to a new open window as if
> clicket to a Link with PopupSettings
>                }
>        }
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

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


Re: DropDownChoice for opening a new Window

Posted by Pedro Santos <pe...@gmail.com>.
Yes, use javascript to reach that functionality. For instance, you can add
an AjaxFormComponentUpdatingBehavior for the onchange event of your
DropDownChoice. At the onUpdate method implementation, you can append the
needed javascript to open your new window.

On Thu, Jul 29, 2010 at 4:58 PM, Stefan Lindner <li...@visionet.de> wrote:

> Is it possible to have a DropDownChoice that responds to a new window
> when selected? What I mean is
>
>        new DropDownChoice<T>(...) {
>                protected void onSelectionChanged(Integer newSelection)
> {
>                        // Send response to a new open window as if
> clicket to a Link with PopupSettings
>                }
>        }
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos