as far as i can see bookmarkablepagelink extends link, so you can use
it with the existing imagemap....


links do not do anything special in wicket as far as url generation
goes, that is all neatly packaged in various requestcycle.urlfor
methods with some convinience urlfor methods on the component itself.

-igor

On Fri, Oct 24, 2008 at 11:37 AM, James Carman
<[EMAIL PROTECTED]> wrote:
> I'm not talking about a callback URL, necessarily.  What about a
> bookmarkable page link?  How would you rewrite ImageMap?
>
> On Fri, Oct 24, 2008 at 12:23 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> gah, sent too early...
>>
>> class dynimagemap extends webcomponent implements ILinkListener {
>>  protected String urlfor(areaid) {
>>        return urlfor(ILinkListener.INTERFACE)+"&areaid="+areaid;
>>  }
>>
>>  protected abstract void onClick(int areaid);
>>
>>  public final onClick() { onClick(getrequest().getparameter("areaid")); }
>> }
>>
>>
>> see, in wicket url generation is completely open so you dont need to
>> create a Link just to get to a callback url.
>>
>> -igor
>>
>> On Fri, Oct 24, 2008 at 9:21 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>> using links for that stuff is a waste. you should generate the url
>>> yourself. something like this:
>>>
>>> class dynimagemap extends webcomponent implements ILinkListener {
>>>
>>>  protected String urlfor(areaid) {
>>>         return urlfor(ILinkListener.INTERFACE)+"&areaid="+areaid;
>>>  }
>>>
>>>
>>>
>>>  public final onClick() {
>>>
>>>
>>>
>>> On Fri, Oct 24, 2008 at 8:38 AM, James Carman
>>> <[EMAIL PROTECTED]> wrote:
>>>> I'm trying to write my own DynamicImageMap component.  However, the
>>>> way the current ImageMap component works is that it uses Link.getURL()
>>>> to generate the <area> elements.  That method is protected (ImageMap
>>>> is in the same package as Link, so it can see it).  Is there any way
>>>> we can open this up a bit?
>>>>
>>>
>>
>

Reply via email to