Hello all,

This must be a FAQ, but I didn't find the anwser anywhere.
How does one handle image maps with Tapestry?
I'm converting some JPS pages to Tapestry and I've got a snip of HTML that
looks like this:

       <map name="exampleMap">
        <area href="pageFoo.jsp?parameterBar=X" alt="Link1" coords="2,
180,72,250" />
        <area href="pageFoo.jsp?parameterBar=Y" alt="Link2"
coords="60,250,130,320" />
       </map>
       <img src="image.gif" usemap="#exampleMap" width="350" height="355"
border="0" />

I'm trying to bind a Direct service to the links in the image.. but the
resulting HTML is all messed up.

I tried to this

       <map name="exampleMap">
        <area href="#" jwcid="showX" alt="Link1" coords="2, 180,72,250" />
        <area href="#" jwcid="showY"  alt="Link2" coords="60,250,130,320" />
       </map>
       <img src="image.gif" usemap="#exampleMap" width="350" height="355"
border="0" />

and in the correspondent JWC file

 <component id="showX" type="Direct">
  <static-binding name="context">X</static-binding>
  <binding name="listener" property-path="listeners.showFoo" />
 </component>

 <component id="showY" type="Direct">
  <static-binding name="context">Y</static-binding>
  <binding name="listener" property-path="listeners.showFoo" />
 </component>

the output of this is:
<a href="/tapestry/work?service=direct&context=Home/showY&parameters=Y"
coords="60,250,130,320"></a>
<a href="/tapestry/work?service=direct&context=Home/showX&parameters=X"
coords="2, 180,72,250"></a>

As a workaround I made normal links and copied the URLs into the image map,
but doing this doesn't seem elegant

Any thoughts?

Luis Neves







_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to