Thanks guys,

You know when sometimes you take a hammer and try to get into this small
mosquito?
well, I looked into PageLink and IPageLink and tried to be over creative :)

eventually, I used a normal Link with onClick

The thing is that I was very confused with how to pass the PageParameters to
the page.
I keep in my Link a PageParameters instance and add to it the key-value as
needed.
Then I do: setResponsePage(pageClass, pageParameters);

Easy, no? :)




On Mon, Jun 16, 2008 at 9:48 AM, Johan Compagner <[EMAIL PROTECTED]>
wrote:

> So if you want to be stateless then onClick only works if you use a
> StatelessLink and then you should push yourself the params in the url.
>
> But what do you want to do in the onclick? That cant be done in the
> constructor or the target page?
>
> On 6/15/08, Eyal Golan <[EMAIL PROTECTED]> wrote:
> > One more thing.
> > I am working with Bookmarkable Pages that are stateless and have only
> > PageParameters.
> > This is another reason why using the BookmarkableLink.
> >
> > On Sun, Jun 15, 2008 at 2:58 PM, Eyal Golan <[EMAIL PROTECTED]> wrote:
> >
> >> i meant nicer code :)
> >> anyway, I am trying to change it to Link or PageLink.
> >> It looked a small task, which it is except that now I need to set all
> >> parameters to the page instead of the BookmarkableLink which it was
> >> before.
> >>
> >> BTW, why doesn't the Page link have a constructor that accepts
> >> PageParameters?
> >> (I use 1.3.3)
> >>
> >> Thank
> >>
> >>
> >> On Sun, Jun 15, 2008 at 1:34 PM, Frank Bille <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >>> When you say it's easier and nicer what do you mean? nicer URL?
> >>>
> >>> The problem is that if you use bookmarkable page link, then the request
> >>> goes
> >>> directly to that new page (of cause) and doesn't go through your
> calling
> >>> page first. This means that you have to do your work on the page
> instead,
> >>> perhaps based on the page parameters. And that doesn't sound nicer to
> me.
> >>>
> >>> Frank
> >>>
> >>>
> >>> On Sun, Jun 15, 2008 at 12:17 PM, Eyal Golan <[EMAIL PROTECTED]>
> wrote:
> >>>
> >>> > I thought about this option and it's possible, BUT, I still prefer
> >>> > using
> >>> a
> >>> > BookmarkablePageLink as it is easier and nicer (to me anyway). I have
> >>> > PageParameters that are set to the Link (yes I know, I can set them
> to
> >>> the
> >>> > page).
> >>> > The default linksTo is good for me.
> >>> >
> >>> > So,
> >>> > any idea or should I really use a simple Link ?
> >>> >
> >>> > On Sun, Jun 15, 2008 at 1:08 PM, Frank Bille <[EMAIL PROTECTED]>
> >>> > wrote:
> >>> >
> >>> > > If you want to do it in the calling code, use a normal Link and do
> a
> >>> > > redirect to the bookmarkable page afterwords.
> >>> > >
> >>> > > Frank
> >>> > >
> >>> > > On Sun, Jun 15, 2008 at 12:03 PM, Eyal Golan <[EMAIL PROTECTED]>
> >>> wrote:
> >>> > >
> >>> > > > Hi,
> >>> > > > I want to "override" the onClick of a BookmarkablePageLink.
> >>> > > > What I actually want is to subclass a BookmarkablePageLink so
> >>> whenever
> >>> > > the
> >>> > > > user clicks, I will do something an then will call the actual
> >>> obClick.
> >>> > > >
> >>> > > > after checking in the API I saw that:
> >>> > > >    /**
> >>> > > >     * THIS METHOD IS NOT USED! Bookmarkable links do not have a
> >>> click
> >>> > > > handler. It is here to
> >>> > > >     * satisfy the interface only, as bookmarkable links will be
> >>> > > dispatched
> >>> > > > by the handling servlet.
> >>> > > >     *
> >>> > > >     * @see org.apache.wicket.markup.html.link.Link#onClick()
> >>> > > >     */
> >>> > > >    public final void onClick()
> >>> > > >    {
> >>> > > >        // Bookmarkable links do not have a click handler.
> >>> > > >        // Instead they are dispatched by the request handling
> >>> servlet.
> >>> > > >    }
> >>> > > >
> >>> > > > So how do I do a specific task whenever it is clicked?
> >>> > > >
> >>> > > > thanks
> >>> > > >
> >>> > > > --
> >>> > > > Eyal Golan
> >>> > > > [EMAIL PROTECTED]
> >>> > > >
> >>> > > > Visit: http://jvdrums.sourceforge.net/
> >>> > > > LinkedIn: http://www.linkedin.com/in/egolan74
> >>> > > >
> >>> > >
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Eyal Golan
> >>> > [EMAIL PROTECTED]
> >>> >
> >>> > Visit: http://jvdrums.sourceforge.net/
> >>> > LinkedIn: http://www.linkedin.com/in/egolan74
> >>> >
> >>>
> >>
> >>
> >>
> >> --
> >> Eyal Golan
> >> [EMAIL PROTECTED]
> >>
> >> Visit: http://jvdrums.sourceforge.net/
> >> LinkedIn: http://www.linkedin.com/in/egolan74
> >>
> >
> >
> >
> > --
> > Eyal Golan
> > [EMAIL PROTECTED]
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

Reply via email to