Hi Joel,

Thanks for the response I created the issue, here is the link
http://code.google.com/p/google-web-toolkit-incubator/issues/detail?id=297

Cheers
Gabriel

On Jul 31, 2:09 pm, Joel Webber <[email protected]> wrote:
> Gabriel,
> If you could enter an issue for this and cc' me on it, that would be great.
> It's not immediately obvious to me whether it would make more sense to add a
> click event, to change the selection event semantics (probalby not the best
> idea), or to make the method
> overridable, but we can discuss that on the issue.
>
> Cheers,
> joel.
>
> On Sun, Jul 26, 2009 at 8:42 PM, Gabriel Guerrero <
>
> [email protected]> wrote:
>
> > Hi All,
>
> > Currently the FasTree when a addSelectionHandler is added is  only
> > executed when a FastTreeItem is selected, if the user clicks again in
> > a already selected item it will not be triggered again.
>
> >      In my app i use the tree to open tabs or dialogs , so sometimes
> > the user closes the tab or window and click again in the already
> > selected item so i need the action to be reexecuted.
>
> >    The logic that causes this behavior is the following method in the
> > FastTree
>
> >  private void onSelection(FastTreeItem item, boolean fireEvents,
> >      boolean moveFocus, Element targetElem) {
> >    // 'root' isn't a real item, so don't let it be selected
> >    // (some cases in the keyboard handler will try to do this)
> >    if (item == getTreeRoot()) {
> >      return;
> >    }
>
> >    // Don't fire events if the selection hasn't changed, but do move
> > the
> >    // focusable element to the new target.
> >    if (curSelection == item) {
> >      moveFocusable(curSelection, targetElem);
> >      return;
> >    }
>
> > What I use to do to overcome this was to override the method  to make
> > it execute the action even if the item was already selected, but in
> > the lastest version of the incubator this method is now private so I
> > can't override it my only option is to build my own jar of the
> > incubator with the method changed to protected.
>
> > So my request is, could you guys make the addSelectionHandler be
> > executed even if the item is already selected? I personaly think it
> > should be that way but I guess you guys had your reasons to make it
> > the way it is, in that case maybe add another method like a
> > addItemClickHandler that will behave this way?
>
> > Cheers
> > Gabriel
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to