Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

LegacySlot handling in gwtp-mvp-client

37 views
Skip to first unread message

Vojtech Szocs

unread,
Mar 28, 2017, 12:41:22 PM3/28/17
to GWTP
Hi GWTP devs,

recently, we upgraded from 1.3 to 1.6 and we're hitting an issue related to the presenter slot API - LegacySlot handling, in particular.

See this tab container class: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=blob;f=frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/DynamicTabContainerPresenter.java;hb=HEAD

We're overriding TabContainerPresenter#setInSlot(Object, PresenterWidget) because we need to get hold of the associated history token - there is no Tab#getTargetHistoryToken() so we need to ask TabContentProxy for this info. (Adding Tab#getTargetHistoryToken() would help us, but that's not the main point here.)

The problem is that TabContainerPresenter#setInSlot(Object, PresenterWidget) modifies the "slot" parameter as LegacySlotConvertor.convert(slot) and this means the following condition:

  if (slot == tabContentSlot)

will always be false when using legacy slots. For legacy slots (only), the condition should instead be:

  if (slot.getRawSlot() == tabContentSlot)

How can I fix this, other than not calling super in my setInSlot override and fixing it on my own?

Thanks,
Vojtech

Reply all
Reply to author
Forward
0 new messages