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

Can't use as Composite<IronList> #4198

Closed
Legioth opened this issue May 29, 2018 · 2 comments
Closed

Can't use as Composite<IronList> #4198

Legioth opened this issue May 29, 2018 · 2 comments

Comments

@Legioth
Copy link
Member

Legioth commented May 29, 2018

@heruan commented on Tue May 29 2018

Using the component as generic type of Composite results in this exception:

java.lang.IllegalStateException: Neither class 'MyList' nor its super classes declare
event handler method 'setRequestedRange'

Use case:

abstract ListLayout<T, L extends Component & HasDataProvider<T>> extends Composite<L> {}

class MyList extends ListLayout<Person, IronList<Person>> {}

@Legioth commented on Tue May 29 2018

I think this is a generic Flow issue related to finding $server methods from composite content classes.

@heruan
Copy link
Member

heruan commented May 31, 2018

It is generic, indeed. Workaround is to mimic @ClientCallable-annotated methods in the composite: easy for IronList, e.g.

public class MyComposite extends Composite<IronList> {

    @ClientCallable(DisabledUpdateMode.ALWAYS)
    private void setRequestedRange(int start, int length) {
        getContent().getDataCommunicator().setRequestedRange(start, length);
    }
}

while for others (like Grid) reflection is needed. I really hope to see this tackled down soon!

@heruan
Copy link
Member

heruan commented Jun 17, 2018

@Legioth Do you feel #4298 covers this? I'm not fully aware of all the endpoints of RPC method/events for $server calls.

@gilberto-torrezan gilberto-torrezan modified the milestones: 1.0 Maintenance, 1.0.1 Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants