You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephen Robinson <ro...@yellowpen.com> on 2005/03/10 18:13:38 UTC

Problems using the PopupLinkRenderer

Hi Everyone,

Having problems getting PopupLinkRenderer to work. I saw a previous post 
with the following brief comment...
 >Use a normal DirectLink, but specify 
org.apache.tapestry.contrib.link.PopupLinkRenderer as the renderer.
However I can't seem to get it to work for me as I'm not sure how to 
specify the renderer.

.html
-----
<a href="#" jwcid="viewPopupPage" 
renderer="ognl:@org.apache.tapestry.contrib.link.PopupLinkRenderer"><font 
color="blue">Go Popup</font></a>

.page
-----
    <component id="viewPopupPage" type="DirectLink">
        <binding name="listener" expression="listeners.viewPopupPage"/>
    </component>

The 'viewPopupPage' works fine if I leave out the renderer (hence 
everything else works fine), but with the renderer link above it doesn't 
work.

Any examples/help/pointers to get me to help myself would be very welcome.

Thanks again,

Steve Robinson
   

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


Re: Problems using the PopupLinkRenderer

Posted by Marcus Brito <mb...@gmail.com>.
On Thu, 10 Mar 2005 12:30:24 -0500, Stephen Robinson <ro...@yellowpen.com> 

> Now if I wanted a modal dialog I'm guessing I could make my own
> derivative of the PopupLinkRenderer class that would modify the
> contained javascript "javascript: w = window.open(...)" to "javascript:w
> = window.showModalDialog(...)" possibly with some checking for the
> browser type. If I get it working I'd be happy to post it back to the
> mailing list.

Just remember window.showModalDialog() works only on Internet
Explorer. You don't want to alienate all your lovely standard browser
users out there, do you? ^^

-- Marcus Brito <mb...@gmail.com>

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


Re: Problems using the PopupLinkRenderer

Posted by Stephen Robinson <ro...@yellowpen.com>.
Hi Danny,

Thanks for your reply - your solution works a treat. I've got a big 'I 
like the tapestry users mailing list' smile on my face :)

Now if I wanted a modal dialog I'm guessing I could make my own 
derivative of the PopupLinkRenderer class that would modify the 
contained javascript "javascript: w = window.open(...)" to "javascript:w 
= window.showModalDialog(...)" possibly with some checking for the 
browser type. If I get it working I'd be happy to post it back to the 
mailing list.

- Steve

Danny Mandel wrote:

> Hi Steve.  The way I do this is to specify the renderer as a bean in 
> my page class:
>
> In my .html:
>
> <a jwcid="@PageLink" page="ImagesManager" 
> renderer="ognl:beans.imagesManagerRenderer">ToL image contribution 
> tools</a>
>
> In my .page:
>
>    <bean class="org.apache.tapestry.contrib.link.PopupLinkRenderer" 
> name="imagesManagerRenderer">
>        <set-property name="windowName" 
> expression="'imagesManagerWindow'"/>
>        <set-property name="features" expression="'width=800, 
> height=500, scrollbars=yes, resizable=yes'"/>
>    </bean>  
> And you've got a working javascript link!
>
> Hope that helps,
> Danny
>
> Stephen Robinson wrote:
>
>> Hi Everyone,
>>
>> Having problems getting PopupLinkRenderer to work. I saw a previous 
>> post with the following brief comment...
>> >Use a normal DirectLink, but specify 
>> org.apache.tapestry.contrib.link.PopupLinkRenderer as the renderer.
>> However I can't seem to get it to work for me as I'm not sure how to 
>> specify the renderer.
>>
>> .html
>> -----
>> <a href="#" jwcid="viewPopupPage" 
>> renderer="ognl:@org.apache.tapestry.contrib.link.PopupLinkRenderer"><font 
>> color="blue">Go Popup</font></a>
>>
>> .page
>> -----
>>    <component id="viewPopupPage" type="DirectLink">
>>        <binding name="listener" expression="listeners.viewPopupPage"/>
>>    </component>
>>
>> The 'viewPopupPage' works fine if I leave out the renderer (hence 
>> everything else works fine), but with the renderer link above it 
>> doesn't work.
>>
>> Any examples/help/pointers to get me to help myself would be very 
>> welcome.
>>
>> Thanks again,
>>
>> Steve Robinson
>>  
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> .
>


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


Re: Problems using the PopupLinkRenderer

Posted by Danny Mandel <dm...@tolweb.org>.
Hi Steve.  The way I do this is to specify the renderer as a bean in my 
page class:

In my .html:

<a jwcid="@PageLink" page="ImagesManager" 
renderer="ognl:beans.imagesManagerRenderer">ToL image contribution tools</a>

In my .page:

    <bean class="org.apache.tapestry.contrib.link.PopupLinkRenderer" 
name="imagesManagerRenderer">
        <set-property name="windowName" expression="'imagesManagerWindow'"/>
        <set-property name="features" expression="'width=800, 
height=500, scrollbars=yes, resizable=yes'"/>
    </bean>   

And you've got a working javascript link!

Hope that helps,
Danny

Stephen Robinson wrote:

> Hi Everyone,
>
> Having problems getting PopupLinkRenderer to work. I saw a previous 
> post with the following brief comment...
> >Use a normal DirectLink, but specify 
> org.apache.tapestry.contrib.link.PopupLinkRenderer as the renderer.
> However I can't seem to get it to work for me as I'm not sure how to 
> specify the renderer.
>
> .html
> -----
> <a href="#" jwcid="viewPopupPage" 
> renderer="ognl:@org.apache.tapestry.contrib.link.PopupLinkRenderer"><font 
> color="blue">Go Popup</font></a>
>
> .page
> -----
>    <component id="viewPopupPage" type="DirectLink">
>        <binding name="listener" expression="listeners.viewPopupPage"/>
>    </component>
>
> The 'viewPopupPage' works fine if I leave out the renderer (hence 
> everything else works fine), but with the renderer link above it 
> doesn't work.
>
> Any examples/help/pointers to get me to help myself would be very 
> welcome.
>
> Thanks again,
>
> Steve Robinson
>  
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



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