Re: Need to open the Link in another window

2008-09-25 Thread Piller Sébastien

Try:
Link lk = new ExternalLink(lk, http://...;) {
   @Override
   protected void onComponentTag(ComponentTag tag) {
   super.onComponentTag(tag);
   tag.put(target, _blank);
   }
   };

;)

newbie_to_wicket a écrit :

hi,
I am using ExternalLink , I'd like to open in another window, but it is
opening in the same window.

have you any idea.
thanks
J
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread Michael Sparer

or simply add it to the markup ;-)


Pills wrote:
 
 Try:
 Link lk = new ExternalLink(lk, http://...;) {
 @Override
 protected void onComponentTag(ComponentTag tag) {
 super.onComponentTag(tag);
 tag.put(target, _blank);
 }
 };
 
 ;)
 
 newbie_to_wicket a écrit :
 hi,
 I am using ExternalLink , I'd like to open in another window, but it is
 opening in the same window.

 have you any idea.
 thanks
 J
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Need-to-open-the-Link-in-another-window-tp19666989p19667118.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread Piller Sébastien

Michael Sparer a écrit :

or simply add it to the markup ;-)

  

Sure! much better ;)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: Need to open the Link in another window

2008-09-25 Thread Wilhelmsen Tor Iver
 Try:
 Link lk = new ExternalLink(lk, http://...;) {
 @Override
 protected void onComponentTag(ComponentTag tag) {
 super.onComponentTag(tag);
 tag.put(target, _blank);
 }
 };

A bit overkill: You might instead want to add an AttributeModifier to
the link element.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread James Carman
Have you tried calling setPopupSettings()?

On Thu, Sep 25, 2008 at 10:26 AM, Wilhelmsen Tor Iver
[EMAIL PROTECTED] wrote:
 Try:
 Link lk = new ExternalLink(lk, http://...;) {
 @Override
 protected void onComponentTag(ComponentTag tag) {
 super.onComponentTag(tag);
 tag.put(target, _blank);
 }
 };

 A bit overkill: You might instead want to add an AttributeModifier to
 the link element.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread Martijn Dashorst
On Thu, Sep 25, 2008 at 4:31 PM, James Carman
[EMAIL PROTECTED] wrote:
 Have you tried calling setPopupSettings()?

DOesn't work on external link

Just add the target to the markup—one of the things Wicket goes out to
do is to not touch attributes when not asked to. Adding the target to
the markup is the easiest way.

Martijn

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread James Carman
So, why is the method on ExternalLink?

On Thu, Sep 25, 2008 at 10:41 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 On Thu, Sep 25, 2008 at 4:31 PM, James Carman
 [EMAIL PROTECTED] wrote:
 Have you tried calling setPopupSettings()?

 DOesn't work on external link

 Just add the target to the markup—one of the things Wicket goes out to
 do is to not touch attributes when not asked to. Adding the target to
 the markup is the easiest way.

 Martijn

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread Martijn Dashorst
weird, in my memory the popupsettings were only available on Link. My
mistake. Nevertheless: I stand by my statement that target=foo in
markup is the most simple solution.

Martijn

On Thu, Sep 25, 2008 at 4:46 PM, James Carman
[EMAIL PROTECTED] wrote:
 So, why is the method on ExternalLink?

 On Thu, Sep 25, 2008 at 10:41 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 On Thu, Sep 25, 2008 at 4:31 PM, James Carman
 [EMAIL PROTECTED] wrote:
 Have you tried calling setPopupSettings()?

 DOesn't work on external link

 Just add the target to the markup—one of the things Wicket goes out to
 do is to not touch attributes when not asked to. Adding the target to
 the markup is the easiest way.

 Martijn

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread James Carman
Yes, you are correct (not about being incorrect, but about it being
simpler to do it in the markup).  That begs the question, when are
PopupSettings appropriate as opposed to just adding the popup crap to
the markup file?

On Thu, Sep 25, 2008 at 11:04 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 weird, in my memory the popupsettings were only available on Link. My
 mistake. Nevertheless: I stand by my statement that target=foo in
 markup is the most simple solution.

 Martijn

 On Thu, Sep 25, 2008 at 4:46 PM, James Carman
 [EMAIL PROTECTED] wrote:
 So, why is the method on ExternalLink?

 On Thu, Sep 25, 2008 at 10:41 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 On Thu, Sep 25, 2008 at 4:31 PM, James Carman
 [EMAIL PROTECTED] wrote:
 Have you tried calling setPopupSettings()?

 DOesn't work on external link

 Just add the target to the markup—one of the things Wicket goes out to
 do is to not touch attributes when not asked to. Adding the target to
 the markup is the easiest way.

 Martijn

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread Igor Vaynberg
i would say its the other way around. adding an attribute modifier is
overkill for something like this.

-igor

On Thu, Sep 25, 2008 at 7:26 AM, Wilhelmsen Tor Iver [EMAIL PROTECTED] wrote:
 Try:
 Link lk = new ExternalLink(lk, http://...;) {
 @Override
 protected void onComponentTag(ComponentTag tag) {
 super.onComponentTag(tag);
 tag.put(target, _blank);
 }
 };

 A bit overkill: You might instead want to add an AttributeModifier to
 the link element.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread Martijn Dashorst
when you want to control the size and such of the popup window.

Martijn

On Thu, Sep 25, 2008 at 5:07 PM, James Carman
[EMAIL PROTECTED] wrote:
 Yes, you are correct (not about being incorrect, but about it being
 simpler to do it in the markup).  That begs the question, when are
 PopupSettings appropriate as opposed to just adding the popup crap to
 the markup file?

 On Thu, Sep 25, 2008 at 11:04 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 weird, in my memory the popupsettings were only available on Link. My
 mistake. Nevertheless: I stand by my statement that target=foo in
 markup is the most simple solution.

 Martijn

 On Thu, Sep 25, 2008 at 4:46 PM, James Carman
 [EMAIL PROTECTED] wrote:
 So, why is the method on ExternalLink?

 On Thu, Sep 25, 2008 at 10:41 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 On Thu, Sep 25, 2008 at 4:31 PM, James Carman
 [EMAIL PROTECTED] wrote:
 Have you tried calling setPopupSettings()?

 DOesn't work on external link

 Just add the target to the markup—one of the things Wicket goes out to
 do is to not touch attributes when not asked to. Adding the target to
 the markup is the easiest way.

 Martijn

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to open the Link in another window

2008-09-25 Thread James Carman
Ok, cool.  Thanks.

On Thu, Sep 25, 2008 at 11:30 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 when you want to control the size and such of the popup window.

 Martijn

 On Thu, Sep 25, 2008 at 5:07 PM, James Carman
 [EMAIL PROTECTED] wrote:
 Yes, you are correct (not about being incorrect, but about it being
 simpler to do it in the markup).  That begs the question, when are
 PopupSettings appropriate as opposed to just adding the popup crap to
 the markup file?

 On Thu, Sep 25, 2008 at 11:04 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 weird, in my memory the popupsettings were only available on Link. My
 mistake. Nevertheless: I stand by my statement that target=foo in
 markup is the most simple solution.

 Martijn

 On Thu, Sep 25, 2008 at 4:46 PM, James Carman
 [EMAIL PROTECTED] wrote:
 So, why is the method on ExternalLink?

 On Thu, Sep 25, 2008 at 10:41 AM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
 On Thu, Sep 25, 2008 at 4:31 PM, James Carman
 [EMAIL PROTECTED] wrote:
 Have you tried calling setPopupSettings()?

 DOesn't work on external link

 Just add the target to the markup—one of the things Wicket goes out to
 do is to not touch attributes when not asked to. Adding the target to
 the markup is the easiest way.

 Martijn

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]