Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWTP 1.5.x Tabs don't get selected #744

Closed
avsgi09 opened this issue Nov 1, 2015 · 6 comments · Fixed by #759
Closed

GWTP 1.5.x Tabs don't get selected #744

avsgi09 opened this issue Nov 1, 2015 · 6 comments · Fixed by #759
Labels

Comments

@avsgi09
Copy link

avsgi09 commented Nov 1, 2015

Upgrading a 1.4 app to 1.5.x we have found this problem with the GWTP Tabs infrastructure. This happens only if you use the new slots (NestedSlot, PermanentSlot, etc.).

If you select a tab the "active" styles aren't added - seems like the addStyleName & removeStyleName calls in the BaseTab class simply do nothing. The inactive style isn't removed and the active style isn't added: only the inactive style remain in the tab.

This can be seen in the GWTP Tabs Sample with the browser inspector tools: if you click on any tab (be RoundTab, be SimpleTab) and inspect it's styles you'll see that all the tabs have the same style and background color. They only have the inactive CSS style (according to the tabs.gss file the selected tab should have #eaeaea as background color, but has #ccc)

@olafleur
Copy link
Member

olafleur commented Nov 2, 2015

Thanks for noticing ! @jasonlemay or @LarryMatte could you take a look?

@filiphr
Copy link
Contributor

filiphr commented Dec 9, 2015

Hi, we have the same problem with the new slots.

I have also pinpointed the problem.

See TabContainer#setInSlot(Object, PresenterWidget).

The TabContainer does not implement the new method PresenterWidget#setInSlot(IsSlot<T>, T).

And the main problem comes from the RevealContentHandler. When handling the method it is explicitly checked if slot is NestedSlot or not. If it is then the new method from the PresenterWidget is called. if it isn't then the old method is called.

I would say that a current workaround would be to not migrate to the new slots for the tabs. And then once there is a new release migrate that to the new slots.

Do you will fix this and release the next patch?

@olafleur
Copy link
Member

olafleur commented Dec 9, 2015

@rdwallis Could you take a look? Thanks!

@olafleur olafleur added the Bug label Jan 4, 2016
@olafleur
Copy link
Member

olafleur commented Jan 4, 2016

@rdwallis ping

timeu added a commit to timeu/GWTP that referenced this issue Feb 15, 2016
Add an override for the new typed setInSlot (> GWTP 1.5.x) method and
make sure to call setActivTab on the corresponding tab.
The old untyped setInSlot will delegate to the new method.
This should fix ArcBees#744
@timeu
Copy link
Contributor

timeu commented Feb 15, 2016

@olafleur: I created a pull request.
BTW: The TabContainerPresenter still used the untyped SLOT mechanism. This should probably also be migrated to IsSlot. But I guess this can be done in a separate pull request

@olafleur
Copy link
Member

Thanks a lot ! We will review it.

Chris-V pushed a commit that referenced this issue Mar 4, 2016
Add an override for the new typed setInSlot (> GWTP 1.5.x) method and
make sure to call setActivTab on the corresponding tab.
The old untyped setInSlot will delegate to the new method.
This should fix #744
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants