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

Provide more variants of getColumn #9920

Closed
amahdy opened this issue Sep 1, 2017 · 8 comments
Closed

Provide more variants of getColumn #9920

amahdy opened this issue Sep 1, 2017 · 8 comments
Milestone

Comments

@amahdy
Copy link
Contributor

amahdy commented Sep 1, 2017

  • Vaadin version: 8.1.x

  • Description of the bug: (Feature Request)
    Provide better API to retrieve already generated columns.

  • If possible, minimal reproducible example:
    Sometimes I use the Grid initializer API that generates all the columns:
    Grid<Bean> grid = new Grid<>(Bean.class);
    But at this point, I'm unable to retrieve and modify those columns. The only available getColumn API takes columnId as a parameter.
    Alternatively, I have to manually create all the columns manually. I want a combination of both features.

Thanks!

@tsuoanttila
Copy link
Contributor

When you use the Grid constructor with bean class, the columns are initialised with id being the property name. So Person with a String fullName and related getter and setter will produce a Grid containing a column with id fullName. grid.getColumn("fullName") will return the generated column.

What variants would you need in addition to that for your feature request to be considered done?

@amahdy
Copy link
Contributor Author

amahdy commented Sep 6, 2017

I don't know if that was documented somewhere, buy still I feel that it's not intuitive enough.
So I'd request:

  • Update the API documentation.
  • Add one more API that accepts let say Bean::getFirstName.

@tsuoanttila
Copy link
Contributor

The Bean::getFirstName in this particular case is shortened from:

new ValueProvider<Bean, String>() { 
    public String apply(Bean bean) { 
        return bean.getFirstName(); 
    } 
}

Which is a new instance that can't be reliably matched to another instance of ValueProvider. It's a nice idea and if it worked, it would be there already.

For the documentation on the topic, please take a look at Grid - Automatically Adding Columns

@amahdy
Copy link
Contributor Author

amahdy commented Sep 10, 2017

I still believe it's a nice to have feature. One of the major updates in the new Grid was not to rely on any String constants. Guessing and using the member variable of the Bean as a String is not nice.

For documentation, I meant JavaDoc for the method, especially the getColumn(). Right now it gives no clue how to find the identifier called columnId.

@stale
Copy link

stale bot commented Mar 19, 2018

Hello there!

It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

  • Check if the issue is still valid for the latest version. There are dozens of duplicates in our issue tracker, so it is possible that the issue is already tackled. If it appears to be fixed, close the issue, otherwise report to the issue that it is still valid.
  • Provide more details how to reproduce the issue.
  • Explain why it is important to get this issue fixed and politely draw others attention to it e.g. via the forum or social media.
  • Add a reduced test case about the issue, so it is easier for somebody to start working on a solution.
  • Try fixing the issue yourself and create a pull request that contains the test case and/or a fix for it. Handling the pull requests is the top priority for the core team.
  • If the issue is clearly a bug, use the Warranty in your Vaadin subscription to raise its priority.

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

@stale stale bot added the Stale Stale bot label label Mar 19, 2018
@amahdy
Copy link
Contributor Author

amahdy commented Apr 9, 2018

Still a valid issue.

@stale stale bot removed the Stale Stale bot label label Apr 9, 2018
@stale
Copy link

stale bot commented Sep 6, 2018

Hello there!

We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

  • Check if the issue is still valid for the latest version. There are dozens of duplicates in our issue tracker, so it is possible that the issue is already tackled. If it appears to be fixed, close the issue, otherwise report to the issue that it is still valid.
  • Provide more details how to reproduce the issue.
  • Explain why it is important to get this issue fixed and politely draw others attention to it e.g. via the forum or social media.
  • Add a reduced test case about the issue, so it is easier for somebody to start working on a solution.
  • Try fixing the issue yourself and create a pull request that contains the test case and/or a fix for it. Handling the pull requests is the top priority for the core team.
  • If the issue is clearly a bug, use the Warranty in your Vaadin subscription to raise its priority.

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

@stale stale bot added the Stale Stale bot label label Sep 6, 2018
@amahdy
Copy link
Contributor Author

amahdy commented Sep 10, 2018

Still an issue.

@stale stale bot removed the Stale Stale bot label label Sep 10, 2018
TatuLund added a commit that referenced this issue Sep 11, 2018
mehdi-vaadin pushed a commit that referenced this issue Sep 18, 2018
ZheSun88 pushed a commit that referenced this issue Oct 1, 2018
* Updated JavaDoc of getColumn(..) method

Fixes #9920
@ZheSun88 ZheSun88 modified the milestones: 8.7.0, 8.6.0 Oct 1, 2018
ZheSun88 pushed a commit that referenced this issue Oct 1, 2018
* Updated JavaDoc of getColumn(..) method

Fixes #9920
ZheSun88 pushed a commit that referenced this issue Oct 2, 2018
* Updated JavaDoc of getColumn(..) method

Fixes #9920
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

3 participants