the first one is internal to wicket - because the behavior is unique it gets
an internal unique path in wicket, so you dont need to worry about it. so
basically your onclick handler for the menuitem has a 1-1 link to the
onclick handler of the behavior.

if you want one behavior then you have many menuitems onclicks linking to a
single behavior onclick. so you need to map somehow - and that is through
javascript on clientside.

-igor


On 8/13/07, Kirk Israel <[EMAIL PROTECTED]> wrote:
>
> I kind of see what you're getting at, but could you give an example of
> the syntax for the first one? I already have a unique behavior
> instance for each row... do I need to add another one?  Or is there
> some way in the onClick code to read what the path of the behavior is?
> (Actually I might not be thinking of the right use of "path")
> I guess I'm trying to avoid hacking javascript strings if I can, since
> the link syntax is pretty arcane...
>
> On 8/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > the event is triggered on clientside, so you need to pass back what item
> was
> > clicked there.
> >
> > you can either do it by adding a unique behavior - which then has a
> unique
> > path - which is that "id" you are passing back. or you need to append
> some
> > unique id on client side using javascript so it can tell which row was
> > clicked.
> >
> > -igor
> >
> >
> > On 8/13/07, Kirk Israel <[EMAIL PROTECTED]> wrote:
> > >
> > > I have a Context Menu Object and Behavior... right now I construct one
> > > Context Menu for the whole Data Table (extends
> > > AjaxFallbackDefaultDataTable) component that links to it... then on
> > > newRowItem() I add a unique ContextMenuBehavior (extends
> > > AbstractBehavior) to that item before returning.
> > >
> > > My ContextMenuComponent currently constructs AjaxFallbackLink
> > > derivatives to connect to the functions that will actually do the
> > > work.
> > >
> > > My question is, what's the best way of getting information on which
> > > Table item was actually clicked to the context menu? Obviously I'd
> > > rather not give each table item its own context menu... is there
> > > anything in AbstractBehavior that would get triggered when the user
> > > right clicks, and thus let me set a global-ish variable in the parent
> > > component that the contextmenu could then read? Or have we gone about
> > > that wrong, and it needs to be some other kind of behavior to activate
> > > server-side code when the behavior gets activated?
> > >
> > > I might be still having trouble setting my mind to the appropriate
> > > Wicket way of thinking about this kind of issue.
> > >
> > > Thanks...
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to