AttributeModifiers allow you to generate ID's yourself. These could
then be used in the javascript.

Another way, I recently started using is the behaviour.js Javascript
library, which allows you to attach markup to specific CSS selectors,
or at least classes. Together with prototype.js this really is
dynamite.

Martijn

On 2/4/06, Mark Derricutt <[EMAIL PROTECTED]> wrote:
> Heya,
>
> A quick question which I can't seem to spot any answer for.  Say I have the
> following markup:
>
>   <table>
>     <tr wicket:id="foo">
>       <td><span wicket:id="bar">something</span></td>
>     </tr>
>   </table>
>
> Where foo is a ListView that provides repeated bar's. How do I go about
> adding in some javascript that refers to each bar?
>
> i.e.
>
>   <script>
>     function doFoo(barInstance) { ..... }
>   </script>
>
>   <table>
>      <tr wicket:id="foo">
>        <td>
>         <span wicket:id="bar">something</span>
>          <span onclick="doFoo(***some pointer to bar
> here***);">Click!</span>
>        </td>
>      </tr>
>    </table>
>
>
> I assume the idea would be to extract everything to my own container/widget?
>  Basically I'm wanting to add arbitrary javascript to a page and start
> modifying the DOM/CSS for various elements.
>
>
> --
> i like my video games - mamma said they are gonna melt my brains
> i like my video games - i don't care what daddy said; they're my reality
>   - henning pauly


--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to