You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by david joffrin <da...@hotmail.com> on 2005/07/14 00:42:50 UTC

contrib:PopupLink question

Hi,

I'd like to pop up a web page which uses a Tapestry type of URL.

********* My HTML is looking like that:
<a jwcid="@contrib:PopupLink" href="ognl: url" 
features='ognl:"resizable,scrollbars,top=100,left=100,height=400,width=300"' 
windowName="TickerServer"><a jwcid="@Insert" 
value="ognl:orderMarketOverview.lastTradedTime" 
format="ognl:@com.etil.sudetp.presentation.utils.Display@DATEFORMAT()"/></a>

********* My Java code is looking like that:
public String getUrl() {
  IEngineService service = getEngine().getService(
				Tapestry.EXTERNAL_SERVICE);
  ILink link = service.getLink(getRequestCycle(), getPage(), new Object[] {
					"TickerServer", new String(getOrderProduct().getProductId()) });
  return link.getURL();
}

However, the rendering is like that:
aWindow = 
window.open('%2Fsudetp%2Fapp%3Fservice%3Dexternal%2FTickerServer%26sp%3DSEBC4C313BDD27F54', 
'TickerServer', 
'resizable,scrollbars,top=100,left=100,height=400,width=300', false);

Any idea?

Thanks.
David.



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: contrib:PopupLink question

Posted by DarĂ­o Vasconcelos <da...@gmail.com>.
I found there's an easier, but a little hacky, solution for that:
using the onClick event in javascript.

<a jwcid="@ActionLink" listener="ognl:listener.myListener"
onClick="window.open(this.href,'new','width=100,height=100');return
false">Link</a>

The "return false" is important because it avoids the main window from
following the link.

Hope it helps.

Dario

On 7/13/05, david joffrin <da...@hotmail.com> wrote:
> Hi,
> 
> I'd like to pop up a web page which uses a Tapestry type of URL.
> 
> ********* My HTML is looking like that:
> <a jwcid="@contrib:PopupLink" href="ognl: url"
> features='ognl:"resizable,scrollbars,top=100,left=100,height=400,width=300"'
> windowName="TickerServer"><a jwcid="@Insert"
> value="ognl:orderMarketOverview.lastTradedTime"
> format="ognl:@com.etil.sudetp.presentation.utils.Display@DATEFORMAT()"/></a>
> 
> ********* My Java code is looking like that:
> public String getUrl() {
>   IEngineService service = getEngine().getService(
>                                 Tapestry.EXTERNAL_SERVICE);
>   ILink link = service.getLink(getRequestCycle(), getPage(), new Object[] {
>                                         "TickerServer", new String(getOrderProduct().getProductId()) });
>   return link.getURL();
> }
> 
> However, the rendering is like that:
> aWindow =
> window.open('%2Fsudetp%2Fapp%3Fservice%3Dexternal%2FTickerServer%26sp%3DSEBC4C313BDD27F54',
> 'TickerServer',
> 'resizable,scrollbars,top=100,left=100,height=400,width=300', false);
> 
> Any idea?
> 
> Thanks.
> David.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Communism is man's exploitation of man. Capitalism is just the opposite.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org