You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tore Halset <ha...@pvv.ntnu.no> on 2003/06/12 10:14:02 UTC

ismap

Hello!

I am trying to use Tapestry with server-side image maps.

<a jwcid="@PageLink" target="ainfo" page="ImageInfoPage"><img
jwcid="@Image" image="ognl:myImageAsset" ismap /></a>

The "ismap" are not in the rendered html. How should I use ismap with
Tapestry?

Info about server-side image maps.
http://www.w3.org/TR/html401/struct/objects.html#h-13.6.2

 - Tore.

Re: ismap

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Fri, 13 Jun 2003, Luis Neves wrote:

> As a possible workaround you can try to use the ImageSubmit component like
> this:

Works very nice! Thanks!

 - Tore.

Re: ismap

Posted by Luis Neves <ln...@netcabo.pt>.
On Friday 13 June 2003 07:03, Tore Halset wrote:

...
[snip]

> Does anyone have a suggestion to mye ismap-problem?

I think that you will have to build a new kind of service that can handle 
that.
As a possible workaround you can try to use the ImageSubmit component like 
this:

****************************************************************
<form jwcid="@Form">
  <img jwcid="@ImageSubmit" image="ognl:myImageAsset" 
listener="ognl:listeners.ismapListener"/>
</form>

....

public class ImageInfoPage extends BasePage {

    public void ismapListenerIRequesCycle cycle) {
        // parse the request for the ImageSubmit.x and ImageSubmit.y values
        ..    
    }
}

******************************************************************

it's a kludge but it might work.

Best regards,
Luis Neves



Re: ismap

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Does it have an attachment? If it does, was anyone able to get it?

-Harish

Howard M. Lewis Ship wrote:

>Here's a little preview of something from the upcoming book.
>
>It's a DirectArea component, that is much like a DirectLink component, except it renders an <area>
>tag.
>
>You can adapt the basic idea and create a PageArea if you want.
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>
>
>
>  
>
>>-----Original Message-----
>>From: Tore Halset [mailto:halset@pvv.ntnu.no] 
>>Sent: Friday, June 13, 2003 2:03 AM
>>To: Tapestry users
>>Subject: Re: ismap
>>
>>
>>On Thu, 12 Jun 2003, Tore Halset wrote:
>>
>>    
>>
>>>I am trying to use Tapestry with server-side image maps.
>>>
>>><a jwcid="@PageLink" target="ainfo" page="ImageInfoPage"><img 
>>>jwcid="@Image" image="ognl:myImageAsset" ismap /></a>
>>>      
>>>
>>If I try ismap="" (invalid html) the browser will handle it 
>>as a server-side image map.
>>
>>The problem is that the URL now contains two questionmarks. 
>>And Tapestry does not find a Page named "ImageInfoPage?377,129".
>>
>>.../myServlet?service=page/ImageInfoPage?377,129
>>
>>Is it possible to make Tapestry use PATH_INFO so that the 
>>URLs look like
>>
>>.../myServlet/service/page/ImageInfoPage?377,129
>>
>>Does anyone have a suggestion to mye ismap-problem?
>>
>>    
>>
>>>Info about server-side image maps. 
>>>http://www.w3.org/TR/html401/struct/objects.html#h-13.6.2
>>>      
>>>
>> - Tore.
>>
>>---------------------------------------------------------------------
>>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: ismap

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Here's a little preview of something from the upcoming book.

It's a DirectArea component, that is much like a DirectLink component, except it renders an <area>
tag.

You can adapt the basic idea and create a PageArea if you want.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Tore Halset [mailto:halset@pvv.ntnu.no] 
> Sent: Friday, June 13, 2003 2:03 AM
> To: Tapestry users
> Subject: Re: ismap
> 
> 
> On Thu, 12 Jun 2003, Tore Halset wrote:
> 
> > I am trying to use Tapestry with server-side image maps.
> >
> > <a jwcid="@PageLink" target="ainfo" page="ImageInfoPage"><img 
> > jwcid="@Image" image="ognl:myImageAsset" ismap /></a>
> 
> If I try ismap="" (invalid html) the browser will handle it 
> as a server-side image map.
> 
> The problem is that the URL now contains two questionmarks. 
> And Tapestry does not find a Page named "ImageInfoPage?377,129".
> 
> .../myServlet?service=page/ImageInfoPage?377,129
> 
> Is it possible to make Tapestry use PATH_INFO so that the 
> URLs look like
> 
> .../myServlet/service/page/ImageInfoPage?377,129
> 
> Does anyone have a suggestion to mye ismap-problem?
> 
> > Info about server-side image maps. 
> > http://www.w3.org/TR/html401/struct/objects.html#h-13.6.2
> 
>  - Tore.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

RE: ismap

Posted by David Solis <ds...@legosoft.com.mx>.
I'm using client-side image maps.

Recipe is:
Put your map in the template, e.g.

<map name="buttons">
  <area jwcid="clearDirect" shape="rect" coords="324,124,371,204"
alt="Clear"/>
  <area jwcid="plusDirect"  shape="rect" coords="262,124,308,203"
alt="Plus"/>
..........
..........
</map>

Now declare your "area" components in the page spec, in this case:

    <component id="clearDirect" type="DirectLink">
        <binding name="renderer"
expression="@spoc.link.AreaLinkRenderer@SHARED_INSTANCE"/>
        <binding name="stateful" expression="false"/>
        <binding name="listener" expression='listeners.processButton'/>
        <binding name="parameters"
expression="@spoc.pages.Calculator@CLEAR_BUTTON"/>
    </component>

    <component id="plusDirect" type="DirectLink">
        <binding name="renderer"
expression="@spoc.link.AreaLinkRenderer@SHARED_INSTANCE"/>
        <binding name="stateful" expression="false"/>
        <binding name="listener" expression='listeners.processButton'/>
        <binding name="parameters"
expression="@spoc.pages.Calculator@PLUS_BUTTON"/>
    </component>

As you can see, the "area" components are DirectLinks with a custom
renderer: AreaLinkRenderer.

AreaLinkRenderer source is:

package spoc.link; 

import org.apache.tapestry.link.DefaultLinkRenderer;
import org.apache.tapestry.link.ILinkRenderer; 

public class AreaLinkRenderer extends DefaultLinkRenderer {
    /**
     *  A singleton for the area link.
     **/

     public static final ILinkRenderer SHARED_INSTANCE = new
AreaLinkRenderer();

    public String getElement()
    {
        return "area";
    }

    public boolean getHasBody()
    {
        return false;
    }
}

You can use AreaLinkRenderer with any Link component.

Regards

D.
> -----Original Message-----
> From: Tore Halset [mailto:halset@pvv.ntnu.no]
> Sent: Friday, June 13, 2003 1:03 AM
> To: Tapestry users
> Subject: Re: ismap
> 
> On Thu, 12 Jun 2003, Tore Halset wrote:
> 
> > I am trying to use Tapestry with server-side image maps.
> >
> > <a jwcid="@PageLink" target="ainfo" page="ImageInfoPage"><img
> > jwcid="@Image" image="ognl:myImageAsset" ismap /></a>
> 
> If I try ismap="" (invalid html) the browser will handle it as a
> server-side image map.
> 
> The problem is that the URL now contains two questionmarks. And
Tapestry
> does not find a Page named "ImageInfoPage?377,129".
> 
> .../myServlet?service=page/ImageInfoPage?377,129
> 
> Is it possible to make Tapestry use PATH_INFO so that the URLs look
like
> 
> .../myServlet/service/page/ImageInfoPage?377,129
> 
> Does anyone have a suggestion to mye ismap-problem?
> 
> > Info about server-side image maps.
> > http://www.w3.org/TR/html401/struct/objects.html#h-13.6.2
> 
>  - Tore.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: ismap

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Thu, 12 Jun 2003, Tore Halset wrote:

> I am trying to use Tapestry with server-side image maps.
>
> <a jwcid="@PageLink" target="ainfo" page="ImageInfoPage"><img
> jwcid="@Image" image="ognl:myImageAsset" ismap /></a>

If I try ismap="" (invalid html) the browser will handle it as a
server-side image map.

The problem is that the URL now contains two questionmarks. And Tapestry
does not find a Page named "ImageInfoPage?377,129".

.../myServlet?service=page/ImageInfoPage?377,129

Is it possible to make Tapestry use PATH_INFO so that the URLs look like

.../myServlet/service/page/ImageInfoPage?377,129

Does anyone have a suggestion to mye ismap-problem?

> Info about server-side image maps.
> http://www.w3.org/TR/html401/struct/objects.html#h-13.6.2

 - Tore.