[ 
https://issues.apache.org/jira/browse/TAP5-2609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Fowler updated TAP5-2609:
--------------------------------
    Description: 
In the "Configuring the Grid Component in the AppModule class" section of the 
[Grid component 
documentation|https://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html]
 this code is given:

{code}
public static void contributeApplicationDefaults(MappedConfiguration<String, 
String> configuration)
{
  configuration.add(GridConstants.ROWS_PER_PAGE, "show");

  configuration.add(GridConstants.PAGER_POSITION, "bottom");

  configuration.add(GridConstants.TABLE_CLASS, "t-data-grid");
}
{code}

This should be:

{code}
public static void contributeApplicationDefaults(MappedConfiguration<String, 
String> configuration)
{
  configuration.add(ComponentParameterConstants.GRID_ROWS_PER_PAGE, "25");

  configuration.add(ComponentParameterConstants.GRID_PAGER_POSITION, "top");

  configuration.add(ComponentParameterConstants.GRID_TABLE_CSS_CLASS, "table 
table-hover table-bordered table-striped");
}
{code}

The relevant documentation source is here in pre-5.5.0:
[Grid.xdoc:364|https://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc#L364]

  was:
In the "Configuring the Grid Component in the AppModule class" section of the 
[Grid component 
documentation|https://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html]
 this code is given:

{code}
public static void contributeApplicationDefaults(MappedConfiguration<String, 
String> configuration)
{
  configuration.add(GridConstants.ROWS_PER_PAGE, "show");

  configuration.add(GridConstants.PAGER_POSITION, "bottom");

  configuration.add(GridConstants.TABLE_CLASS, "t-data-grid");
}
{code}

The configuration lines should be:

{code}
  configuration.add(ComponentParameterConstants.GRID_ROWS_PER_PAGE, "25");
  configuration.add(ComponentParameterConstants.GRID_PAGER_POSITION, "top");
  configuration.add(ComponentParameterConstants.GRID_TABLE_CSS_CLASS, "table 
table-hover table-bordered table-striped");
{code}


> Grid component doc: configuration sample code is incorrect
> ----------------------------------------------------------
>
>                 Key: TAP5-2609
>                 URL: https://issues.apache.org/jira/browse/TAP5-2609
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 5.4.4
>            Reporter: Andrew Fowler
>            Priority: Minor
>
> In the "Configuring the Grid Component in the AppModule class" section of the 
> [Grid component 
> documentation|https://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html]
>  this code is given:
> {code}
> public static void contributeApplicationDefaults(MappedConfiguration<String, 
> String> configuration)
> {
>   configuration.add(GridConstants.ROWS_PER_PAGE, "show");
>   configuration.add(GridConstants.PAGER_POSITION, "bottom");
>   configuration.add(GridConstants.TABLE_CLASS, "t-data-grid");
> }
> {code}
> This should be:
> {code}
> public static void contributeApplicationDefaults(MappedConfiguration<String, 
> String> configuration)
> {
>   configuration.add(ComponentParameterConstants.GRID_ROWS_PER_PAGE, "25");
>   configuration.add(ComponentParameterConstants.GRID_PAGER_POSITION, "top");
>   configuration.add(ComponentParameterConstants.GRID_TABLE_CSS_CLASS, "table 
> table-hover table-bordered table-striped");
> }
> {code}
> The relevant documentation source is here in pre-5.5.0:
> [Grid.xdoc:364|https://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc#L364]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to