Hi,
Thanks in advance for the help as I wrap my mind around Wicket.
I'm trying to create a Border component that, using the openRico js library
(www.openrico.org), will output JS that will be called on load to round its
own borders.
Basically Rico works like this:
<div id="divWithRoundedCorners">... stuff goes here ...</div>
<script>Rico.Corner.round("divWithRoundedCorners");</script>
When that is rendered, Rico will round the corners of the named DIV.
So, I'm trying to figure out how to create a Border component that has the
ability to create dynamic JavaScript containing the element ID of
a div defined within the Border. Something like this:
RoundedCornerBorder.html (pseudocode):
<wicket:border>
<div id="thisIsDynamic"> <!-- How do I generate and obtain this at
runtime without getting exception (see below)? -->
<wicket:body/>
</div>
<scipt>Rico.Corner.round("divWithRoundedCorners");</script> <!-- Again, I
need the ID of the dynamic DIV to make this work -->
</wicket:border>
I am open to any suggestions as to an efficient solution.
My goal is to be able to use this border multiple times on the same page.
I've had trouble with my attempts because
when trying to call Component.getMarkupId(), I get an exception with the
following message:
WicketMessage: This component is not (yet) coupled to a page. It has
to be able to find the page it is supposed to operate in before you
can call this method (Component#getMarkupId)
Thanks,
Erik
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user