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

NestedSlots for presenters.. #813

Open
nfbarata opened this issue Nov 4, 2016 · 5 comments
Open

NestedSlots for presenters.. #813

nfbarata opened this issue Nov 4, 2016 · 5 comments

Comments

@nfbarata
Copy link

nfbarata commented Nov 4, 2016

Shouldn't the following classes exist? Or in other words SingleSlot, PermanentSlot, Slot and OrderedSlot for Presenters that extends from GwtEvent.Type<RevealContentHandler<?>> like NestedSlots.

public class TypedNestedSlot<T extends Presenter>
extends GwtEvent.Type<RevealContentHandler<?>>
implements IsSingleSlot, RemovableSlot {

@Override
public boolean isPopup() {
	return false;
}

@Override
public boolean isRemovable() {
	return true;
}

@Override
public Object getRawSlot() {
	return this;
}

}

public class TypedNestedMultiSlot<T extends Presenter>
extends GwtEvent.Type<RevealContentHandler<?>>
implements RemovableSlot {

@Override
public boolean isPopup() {
	return false;
}

@Override
public boolean isRemovable() {
	return true;
}

@Override
public Object getRawSlot() {
	return this;
}

}

@nfbarata
Copy link
Author

nfbarata commented Nov 4, 2016

As the framework is implemented it doesn't work, one example is the class RevealContentHandler that has explicit code for NestedSlot... it should be IsSlot?

@nfbarata
Copy link
Author

nfbarata commented Nov 4, 2016

Tried this but didnt work either, don't know why..
public class TypedNestedSlot<T extends Presenter<?,?>> extends NestedSlot { }

@nfbarata
Copy link
Author

nfbarata commented Nov 7, 2016

this registry only works for NestedSlots..
PresenterInspector.init
classInspector.collectStaticFields(classCollection.nestedSlotClass, contentSlots);

@nfbarata
Copy link
Author

nfbarata commented Nov 7, 2016

In the past we could register new Slots with the tag @ContentSlot, now it's closed..

@nfbarata
Copy link
Author

nfbarata commented Nov 7, 2016

Here we can see again the use of classes instead of interfaces
class PresenterWidget
public getChildren(Slot slot)
public getChildren(OrderedSlot slot)
private getSlotChildren(IsSlot slot)

why is the method that uses interfaces hidden??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant