diff options
author | Samuel DALICHAMPT <sdalichampt@users.noreply.github.com> | 2017-03-30 15:47:24 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-03-30 16:47:24 +0300 |
commit | b56732af18f75d210248e08d6899ef47ed55437f (patch) | |
tree | 06165353f6b57e6240ccbb2290761c6c40a72958 /documentation/components/components-grid.asciidoc | |
parent | 7ff30d7c081a6da03fff57b5d1f44826fa3c06a9 (diff) | |
download | vaadin-framework-b56732af18f75d210248e08d6899ef47ed55437f.tar.gz vaadin-framework-b56732af18f75d210248e08d6899ef47ed55437f.zip |
Fix method reference syntax in Grid documentation (#8978)
Diffstat (limited to 'documentation/components/components-grid.asciidoc')
-rw-r--r-- | documentation/components/components-grid.asciidoc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/documentation/components/components-grid.asciidoc b/documentation/components/components-grid.asciidoc index 109c5c3a22..c43a7ef04f 100644 --- a/documentation/components/components-grid.asciidoc +++ b/documentation/components/components-grid.asciidoc @@ -263,7 +263,7 @@ The setter methods in [classname]#Column# have _fluent API_, so you can easily c [source, java] ---- -grid.addColumn(Person:getBirthDate, new DateRenderer()) +grid.addColumn(Person::getBirthDate, new DateRenderer()) .setCaption("Birth Date") .setWidth("100px") .setResizable(false); @@ -325,7 +325,7 @@ explicitly through the column object with [methodname]#setCaption()#. [source, java] ---- -Column<Date> bornColumn = grid.addColumn(Person:getBirthDate); +Column<Date> bornColumn = grid.addColumn(Person::getBirthDate); bornColumn.setCaption("Born date"); ---- @@ -403,7 +403,7 @@ You set the column renderer in the [classname]#Grid.Column# object as follows: [source, java] ---- // the type of birthYear is a number -Column<Person, Integer> bornColumn = grid.addColumn(Person:getBirthYear, +Column<Person, Integer> bornColumn = grid.addColumn(Person::getBirthYear, new NumberRenderer("born in %d AD")); ---- @@ -475,7 +475,7 @@ format specifier, such as "[literal]#++%tF++#". + [source, java] ---- -Column<Person, Date> bornColumn = grid.addColumn(Person:getBirthDate, +Column<Person, Date> bornColumn = grid.addColumn(Person::getBirthDate, new DateRenderer("%1$tB %1$te, %1$tY", Locale.ENGLISH)); ---- |