Ok, so how do I get the same thing that getURL() returns for a
BookmarkablePageLink?  I need a line of code that gives me the proper
URL to set on my area.

I've tried RequestCycle.get().urlFor(link, ILinkListener.INTERFACE)


On Fri, Oct 24, 2008 at 2:46 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> really?
>
> Link
> protected CharSequence getURL()
>        {
>                return urlFor(ILinkListener.INTERFACE);
>        }
>
> BookmarkablePageLink
> @Override
>        protected CharSequence getURL()
>        {
>                PageParameters parameters = getPageParameters();
>
>                if (getPopupSettings() != null)
>                {
>                        return urlFor(getPopupSettings().getPageMap(this), 
> getPageClass(),
> parameters);
>                }
>                else
>                {
>                        return urlFor(getPageMap(), getPageClass(), 
> parameters);
>                }
>        }
>
>
>
> i dont see any special logic
>
> -igor
>
> On Fri, Oct 24, 2008 at 11:43 AM, James Carman
> <[EMAIL PROTECTED]> wrote:
>> But, there is logic in the getURL() methods on Link and
>> BookmarkablePageLink that does some special logic.  So, it's not as
>> simple as calling urlFor() to get the appropriate url.
>>
>> On Fri, Oct 24, 2008 at 2:42 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>> 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