TAP5-2050: Grid sort icons should be added via CSS instead of rendering an embedded img element
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b04fb2fd Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b04fb2fd Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b04fb2fd Branch: refs/heads/master Commit: b04fb2fd6046a1dacdc3d266024d1ef6b977c1aa Parents: 6fb9a38 Author: Howard M. Lewis Ship <hls...@apache.org> Authored: Fri Jun 21 14:45:29 2013 -0700 Committer: Howard M. Lewis Ship <hls...@apache.org> Committed: Fri Jun 21 14:45:29 2013 -0700 ---------------------------------------------------------------------- .../corelib/components/GridColumns.java | 69 +++++--------------- .../apache/tapestry5/grid/GridConstants.java | 12 +++- .../META-INF/assets/tapestry5/tapestry.css | 15 +++++ .../org/apache/tapestry5/core.properties | 9 --- .../org/apache/tapestry5/core_bg.properties | 9 --- .../org/apache/tapestry5/core_da.properties | 9 --- .../org/apache/tapestry5/core_de.properties | 9 --- .../org/apache/tapestry5/core_el.properties | 9 --- .../org/apache/tapestry5/core_es.properties | 9 --- .../org/apache/tapestry5/core_fi_FI.properties | 11 +--- .../org/apache/tapestry5/core_fr.properties | 10 +-- .../org/apache/tapestry5/core_hr.properties | 9 --- .../org/apache/tapestry5/core_it.properties | 9 --- .../org/apache/tapestry5/core_ja.properties | 7 -- .../org/apache/tapestry5/core_mk_MK.properties | 9 --- .../org/apache/tapestry5/core_nl.properties | 9 --- .../org/apache/tapestry5/core_no_NB.properties | 7 -- .../org/apache/tapestry5/core_pl.properties | 11 +--- .../org/apache/tapestry5/core_pt_BR.properties | 9 --- .../org/apache/tapestry5/core_ru.properties | 9 --- .../org/apache/tapestry5/core_sr_RS.properties | 9 --- .../org/apache/tapestry5/core_sv_SE.properties | 9 --- .../org/apache/tapestry5/core_vi.properties | 11 +--- .../org/apache/tapestry5/core_zh_CN.properties | 9 --- .../corelib/components/GridColumns.tml | 8 +-- .../tapestry5/integration/app1/GridTests.java | 15 +---- .../TapestryHibernateIntegrationTests.java | 4 +- .../integration/app1/JpaIntegrationTest.java | 6 +- 28 files changed, 55 insertions(+), 266 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java index 739a5c2..f27b0ef 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java @@ -14,7 +14,10 @@ package org.apache.tapestry5.corelib.components; -import org.apache.tapestry5.*; +import org.apache.tapestry5.Block; +import org.apache.tapestry5.ComponentResources; +import org.apache.tapestry5.MarkupWriter; +import org.apache.tapestry5.PropertyOverrides; import org.apache.tapestry5.annotations.*; import org.apache.tapestry5.beaneditor.PropertyModel; import org.apache.tapestry5.grid.ColumnSort; @@ -63,26 +66,12 @@ public class GridColumns @Parameter private String zone; - // TODO: Two EventLinks just to suppress the space between the text and the icon is not very modern. - // Use the CSS, Luke! @SuppressWarnings("unused") @Component( parameters = {"event=sort", "disabled=sortDisabled", "context=columnModel.id", "zone=inherit:zone"}) private EventLink sort; @Inject - @Path("${" + ComponentParameterConstants.GRIDCOLUMNS_ASCENDING_ASSET + "}") - private Asset ascendingAsset; - - @Inject - @Path("${" + ComponentParameterConstants.GRIDCOLUMNS_DESCENDING_ASSET + "}") - private Asset descendingAsset; - - @Inject - @Path("${" + ComponentParameterConstants.GRIDCOLUMNS_SORTABLE_ASSET + "}") - private Asset sortableAsset; - - @Inject private Messages messages; @Inject @@ -133,16 +122,18 @@ public class GridColumns if (!lean) { writer.attributes("data-grid-property", columnModel.getId()); } - - switch (getSortForColumn()) - { - case ASCENDING: - writer.attributes("data-grid-column-sort", "ascending"); - break; - - case DESCENDING: - writer.attributes("data-grid-column-sort", "descending"); - default: + if(!isSortDisabled()){ + switch (getSortForColumn()) + { + case ASCENDING: + writer.attributes("data-grid-column-sort", "ascending"); + break; + + case DESCENDING: + writer.attributes("data-grid-column-sort", "descending"); + default: + writer.attributes("data-grid-column-sort", "sortable"); + } } if (index == 0) { @@ -176,34 +167,6 @@ public class GridColumns } - public Asset getIcon() - { - switch (getSortForColumn()) - { - case ASCENDING: - return ascendingAsset; - - case DESCENDING: - return descendingAsset; - - default: - return sortableAsset; - } - } - - public String getIconLabel() - { - switch (getSortForColumn()) - { - case ASCENDING: - return messages.get("core-ascending"); - case DESCENDING: - return messages.get("core-descending"); - default: - return messages.get("core-sortable"); - } - } - public List<String> getColumnNames() { return gridModel.getDataModel().getPropertyNames(); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/java/org/apache/tapestry5/grid/GridConstants.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/grid/GridConstants.java b/tapestry-core/src/main/java/org/apache/tapestry5/grid/GridConstants.java index b17c33d..f344a83 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/grid/GridConstants.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/grid/GridConstants.java @@ -1,4 +1,4 @@ -// Copyright 2008 The Apache Software Foundation +// Copyright 2008, 2013 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,12 +31,16 @@ public class GridConstants /** * Marks the column that is currently sorted for sort ascending. May be applied to a <th> (in the * <thead> or a <td> in the <tbody>). + * + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String SORT_ASCENDING_CLASS = "t-sort-column-ascending"; /** * Marks the column that is currently sorted for sort descending. May be applied to a <th> (in the * <thead> or a <td> in the <tbody>). + * + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String SORT_DESCENDING_CLASS = "t-sort-column-descending"; @@ -70,16 +74,22 @@ public class GridConstants /** * Default {@link org.apache.tapestry5.Asset} for ascending columns sort + * + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String COLUMNS_ASCENDING = "sort-asc.png"; /** * Default {@link org.apache.tapestry5.Asset} for ascending columns sort + * + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String COLUMNS_DESCENDING = "sort-desc.png"; /** * Default {@link org.apache.tapestry5.Asset} for sortable columns + * + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String COLUMNS_SORTABLE = "sortable.png"; } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry.css ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry.css b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry.css index accb0b9..e0486b5 100644 --- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry.css +++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry.css @@ -11,4 +11,19 @@ input.ajax-wait { background-image: url(ajax-loader.gif); background-repeat: no-repeat; background-position: center right; +} + +th[data-grid-column-sort] a { + padding-right: 20px; + background-position: right; + background-repeat: no-repeat; + background-image: url(../core/sortable.png); +} + +th[data-grid-column-sort=ascending] a { + background-image: url(../core/sort-asc.png); +} + +th[data-grid-column-sort=descending] a { + background-image: url(../core/sort-desc.png); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties index 250d9a4..941adf7 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Asc] - # PropertyEditor "Unable to locate block" error: core-block-error=Unable to locate a block to edit property '%s' (with data type '%s') of object %s: %s @@ -32,9 +29,6 @@ core-date-value-not-parseable=Date value '%s' is not parseable. # Validation error summary instructions: core-default-error-banner=You must correct the following errors before continuing. -# Grid column Descending sort icon alt text: -core-descending=[Desc] - # Alerts "Dismiss" label: core-dismiss-label=Dismiss all @@ -71,9 +65,6 @@ core-palette-up-label=Move Up # ProgressiveDisplay "loading" label: core-progressive-display-loading=Loading ... -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Sortable] - # BeanEditForm "Submit" button: core-submit-label=Create/Update http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_bg.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_bg.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_bg.properties index 84405a5..4739f17 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_bg.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_bg.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[ÐаÑаÑÑваÑ] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-ascending=[ÐаÑаÑÑваÑ] # Validation error summary instructions: core-default-error-banner=ТÑÑбва да попÑавиÑе ÑледниÑе гÑеÑки пÑеди да пÑодÑлжиÑе. -# Grid column Descending sort icon alt text: -core-descending=[ÐамалÑваÑ] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=ÐагоÑе # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[ÐодÑедим] - # BeanEditForm "Submit" button: core-submit-label=СÑздай/ÐÑомени http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_da.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_da.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_da.properties index be275b5..5c68351 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_da.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_da.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Stigende] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable='%s' er ikke en gyldig dato. # Validation error summary instructions: core-default-error-banner=Du skal rette følgende fejl før du kan fortsætte: -# Grid column Descending sort icon alt text: -core-descending=[Faldende] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Flyt Op # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Sortérbar] - # BeanEditForm "Submit" button: core-submit-label=Opret/Opdater http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties index 2a4e865..4739af6 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[aufw.] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=Datumswert '%s' kann nicht geparst werden. # Validation error summary instructions: core-default-error-banner=Sie müssen folgende Fehler beheben, bevor Sie fortfahren können. -# Grid column Descending sort icon alt text: -core-descending=[abw.] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Aufwärts # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[sortierbar] - # BeanEditForm "Submit" button: core-submit-label=Anlegen/Ãndern http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_el.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_el.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_el.properties index 184aea8..81009cb 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_el.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_el.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[ÎÏ Î¾] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=Î Ïιμή '%s' δεν είναι ημεÏομη # Validation error summary instructions: core-default-error-banner=Î ÏÎÏει να διοÏθÏÏεÏε Ïα ακÏÎ»Î¿Ï Î¸Î± ÏÏάλμαÏα. -# Grid column Descending sort icon alt text: -core-descending=[Φθην] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Î Î¬Î½Ï # Progressive display component "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[ΤαξινÏμηÏη] - # BeanEditForm "Submit" button: core-submit-label=ÎÎ·Î¼Î¹Î¿Ï Ïγία/ÎνημÎÏÏÏη http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties index f79ddb6..96b7159 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Asc] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-ascending=[Asc] # Validation error summary instructions: core-default-error-banner=Debe corregir los siguientes errores antes de que pueda continuar. -# Grid column Descending sort icon alt text: -core-descending=[Desc] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Mover arriba # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Ordenable] - # BeanEditForm "Submit" button: core-submit-label=Crear/Actualizar http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_fi_FI.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fi_FI.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fi_FI.properties index a20e8e1..fdabd3c 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fi_FI.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fi_FI.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Nouseva] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-ascending=[Nouseva] # Validation error summary instructions: core-default-error-banner=Korjaa seuraavat virheet ja yritä uudelleen. -# Grid column Descending sort icon alt text: -core-descending=[Laskeva] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Siirrä ylös # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Järjestettävä] - # BeanEditForm "Submit" button: core-submit-label=Tallenna @@ -114,4 +105,4 @@ core-input-not-integer=Arvo ei ole kokonaisluku. core-datefield-today=tänään # DateField "None" button: -core-datefield-none=Poista valinta \ No newline at end of file +core-datefield-none=Poista valinta http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties index 3ccbede..67b4a2c 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Asc] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,8 +29,6 @@ core-date-value-not-parseable=La date '%s' ne peut pas ÃÂtre analysÃÂe. # Validation error summary instructions: core-default-error-banner=Vous devez corriger ces erreurs avant de poursuivre. -# Grid column Descending sort icon alt text: -core-descending=[Desc] # Alerts "Dismiss" label: #core-dismiss-label= @@ -70,9 +65,6 @@ core-palette-up-label=Monter # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Triable] - # BeanEditForm "Submit" button: core-submit-label=Créer/Mettre à jour @@ -113,4 +105,4 @@ required=Vous devez fournir une valeur pour %s. core-datefield-today=Aujourd'hui # DateField "None" button: -core-datefield-none=Aucun \ No newline at end of file +core-datefield-none=Aucun http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_hr.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_hr.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_hr.properties index 6b0d559..0481269 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_hr.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_hr.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Uzlazno] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable='%s' er ikke en gyldig dato. # Validation error summary instructions: core-default-error-banner=Morate ispraviti slijdeæe greÅ¡ke prije nastavka. -# Grid column Descending sort icon alt text: -core-descending=[Silazno] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Pomjeri gore # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Rasporedivo] - # BeanEditForm "Submit" button: core-submit-label=Spremi http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties index 3358fd4..ba319eb 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Asc] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=Il valore '%s' non è una data accettabile. # Validation error summary instructions: core-default-error-banner=Per poter proseguire è necessario correggere gli errori seguenti. -# Grid column Descending sort icon alt text: -core-descending=[Disc] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Sposta in su # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Ordinabile] - # BeanEditForm "Submit" button: core-submit-label=Crea/Aggiorna http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_ja.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_ja.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_ja.properties index a82228f..3d330e4 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_ja.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_ja.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[æé ] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -31,8 +28,6 @@ core-date-value-not-parseable='%s' er ikke en gyldig dato. # Validation error summary instructions: core-default-error-banner=å ã¸é²ãããã«ã¯ä»¥ä¸ã®èª¤ããè¨æ£ããå¿ è¦ãããã¾ãã -# Grid column Descending sort icon alt text: -core-descending=[éé ] # Alerts "Dismiss" label: #core-dismiss-label= @@ -65,8 +60,6 @@ core-palette-up-label=ä¸ã¸ # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[並ã¹æ¿ã] # BeanEditForm "Submit" button: core-submit-label=ä½æ/æ´æ° # String-to-integer translation error: http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties index b206d6a..9568621 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[РаÑÑеÑки] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=ÐнеÑÐµÐ½Ð¸Ð¾Ñ Ð´Ð°ÑÑм '%s' не е вал # Validation error summary instructions: core-default-error-banner=ÐоÑÑебно е да ги попÑавиÑе ÑледниÑе гÑеÑки пÑед да пÑодолжиÑе. -# Grid column Descending sort icon alt text: -core-descending=[ÐпаÑаÑки] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=ÐомеÑÑи нагоÑе # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[ÐодÑедливо] - # BeanEditForm "Submit" button: core-submit-label=ÐÑеиÑаÑ/ÐжÑÑиÑÐ°Ñ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_nl.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_nl.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_nl.properties index 0cb4fa3..5b63404 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_nl.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_nl.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Oplopend] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=De datum '%s' is niet herkend. # Validation error summary instructions: core-default-error-banner=Verhelp de volgende foutmeldingen om door te kunnen gaan. -# Grid column Descending sort icon alt text: -core-descending=[Aflopend] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Omhoog # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Sorteerbaar] - # BeanEditForm "Submit" button: core-submit-label=Opslaan http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_no_NB.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_no_NB.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_no_NB.properties index eaf6453..349ae17 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_no_NB.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_no_NB.properties @@ -17,8 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[ÃÂkende] # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,8 +30,6 @@ core-date-value-not-parseable=Klarte ikke Ã¥ konvertere '%s' til en gyldig dato. # Validation error summary instructions: core-default-error-banner=Du mÃ¥ rette de følgende feilene før du kan fortsette -# Grid column Descending sort icon alt text: -core-descending=[Synkende] # Alerts "Dismiss" label: core-dismiss-label=Steng alle @@ -71,9 +67,6 @@ core-palette-up-label=Flytt opp # ProgressiveDisplay "loading" label: core-progressive-display-loading=Laster ... -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Sorterbar] - # BeanEditForm "Submit" button: core-submit-label=Opprett/Oppdater http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_pl.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_pl.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_pl.properties index 3b1b659..5e07506 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_pl.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_pl.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Ros.] - # PropertyEditor "Unable to locate block" error: core-block-error=Nie można odnaleÅºÄ bloku do edycji wÅaÅciwoÅci '%s', która jest typu '%s' dla obiektu %s: %s @@ -32,9 +29,6 @@ core-date-value-not-parseable='%s' nie jest poprawnym zapisem daty. # Validation error summary instructions: core-default-error-banner=Musisz poprawiÄ nastÄpujÄ ce bÅÄdy, aby kontynuowaÄ. -# Grid column Descending sort icon alt text: -core-descending=[Mal.] - # Alerts "Dismiss" label: core-dismiss-label=OdrzuÄ wszystkie @@ -71,9 +65,6 @@ core-palette-up-label=PrzesuÅ w górÄ # ProgressiveDisplay "loading" label: core-progressive-display-loading=Wczytywanie... -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Sortowalne] - # BeanEditForm "Submit" button: core-submit-label=Utwórz/Aktualizuj @@ -114,4 +105,4 @@ core-input-not-integer=WartoÅÄ nie jest liczbÄ caÅkowitÄ . core-datefield-today=DziÅ # DateField "None" button: -core-datefield-none=Brak \ No newline at end of file +core-datefield-none=Brak http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties index 29e07c8..0667061 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Ascendente] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-ascending=[Ascendente] # Validation error summary instructions: core-default-error-banner=Você deve corrigir os seguintes erros antes de continuar. -# Grid column Descending sort icon alt text: -core-descending=[Descendente] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Para cima # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Ordenável] - # BeanEditForm "Submit" button: core-submit-label=Criar/Atualizar http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_ru.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_ru.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_ru.properties index 9acb16e..8ff11e3 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_ru.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_ru.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[Ðо возÑаÑÑаниÑ] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable='%s' недейÑÑвиÑелÑÐ½Ð°Ñ Ð´Ð°Ñа. # Validation error summary instructions: core-default-error-banner=ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð¸ÑпÑавиÑÑ ÑледÑÑÑие оÑибки пÑежде, Ñем пÑодолжиÑÑ. -# Grid column Descending sort icon alt text: -core-descending=[Ðо ÑбÑваниÑ] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=ÐвеÑÑ # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[УпоÑÑдоÑиÑÑ] - # BeanEditForm "Submit" button: core-submit-label=СоздаÑÑ/ÐзмениÑÑ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_sr_RS.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_sr_RS.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_sr_RS.properties index 0bd9cdf..43c1b17 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_sr_RS.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_sr_RS.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[RastuÄe] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=Datum '%s' se ne može parsirati. # Validation error summary instructions: core-default-error-banner=Morate ispraviti sledeÄe greÅ¡ke pre nego Å¡to nastavite. -# Grid column Descending sort icon alt text: -core-descending=[OpadajuÄe] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Pomeri gore # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Sortabilno] - # BeanEditForm "Submit" button: core-submit-label=Kreiraj/Ažuriraj http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_sv_SE.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_sv_SE.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_sv_SE.properties index bc7ea4e..30c372b 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_sv_SE.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_sv_SE.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=Stigande ordning - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-ascending=Stigande ordning # Validation error summary instructions: core-default-error-banner=Du mÃ¥ste rätta följande fel innan du kan fortsätta. -# Grid column Descending sort icon alt text: -core-descending=Fallande ordning - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=Flytta upp # ProgressiveDisplay "loading" label: #core-progressive-display-loading= -# Grid column (direction unknown) sort icon alt text: -core-sortable=Sorterbar - # BeanEditForm "Submit" button: core-submit-label=Skapa/Uppdatera http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_vi.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_vi.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_vi.properties index 69d97b2..aec5d84 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_vi.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_vi.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[TÄng] - # PropertyEditor "Unable to locate block" error: #core-block-error= @@ -32,9 +29,6 @@ core-date-value-not-parseable=Ngà y giá trá» '%s' không phải là hợp lá» # Validation error summary instructions: core-default-banner=Bạn phải sá»a lại các lá»i sau trÆ°á»c khi tiếp tục. -# Grid column Descending sort icon alt text: -core-descending=[Giảm] - # Alerts "Dismiss" label: core-dismiss-label=Loại bá» tất cả @@ -71,9 +65,6 @@ core-palette-up-label=chuyá»n lên # ProgressiveDisplay "loading" label: core-progressive-display-loading=Äang tải ... -# Grid column (direction unknown) sort icon alt text: -core-sortable=[Có thá» sắp xếp] - # BeanEditForm "Submit" button: core-submit-label=Tạo/Cáºp nháºt @@ -114,4 +105,4 @@ core-input-not-integer=giá trá» trá» không phải là má»t sá» nguyên. core-datefield-today=hôm nay # DateField "None" button: -core-datefield-none=huÌy boÌ \ No newline at end of file +core-datefield-none=huÌy boÌ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/core_zh_CN.properties ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core_zh_CN.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core_zh_CN.properties index c11e157..be726ff 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_zh_CN.properties +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_zh_CN.properties @@ -17,9 +17,6 @@ # second parameter. Occasionally we must use specific indexing when that's # not the best order. -# Grid column Ascending sort icon alt text: -core-ascending=[ååº] - # PropertyEditor "Unable to locate block" error: core-block-error=æ¾ä¸å°ç¼è¾å±æ§ '%s'(æ°æ®ç±»å为'%s') ç Blockï¼è¯¥ å±æ§å±äºå¯¹è±¡ %s: %s . @@ -32,9 +29,6 @@ core-date-value-not-parseable=æ¥æ '%s' ä¸å¯è§£æ. # Validation error summary instructions: core-default-error-banner=å¨ä½ 继ç»ä¹åï¼å¿ é¡»çº æ£å¦ä¸é误. -# Grid column Descending sort icon alt text: -core-descending=[éåº] - # Alerts "Dismiss" label: #core-dismiss-label= @@ -71,9 +65,6 @@ core-palette-up-label=ä¸ç§» # ProgressiveDisplay "loading" label: core-progressive-display-loading=å è½½ ... -# Grid column (direction unknown) sort icon alt text: -core-sortable=[å¯æåº] - # BeanEditForm "Submit" button: core-submit-label=å建/æ´æ° http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridColumns.tml ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridColumns.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridColumns.tml index 5f79a26..cf474a4 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridColumns.tml +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridColumns.tml @@ -4,12 +4,8 @@ index="index" t:mixins="rendernotification"> <t:delegate to="blockForColumn"/> <t:block id="standardHeader"> - <a t:id="sort" rel="nofollow">${columnModel.label} - <t:if test="! sortDisabled"> - <img src="${icon}" class="pull-right" title="${iconLabel}"/> - </t:if> - </a> + <a t:id="sort" rel="nofollow">${columnModel.label}</a> </t:block> </th> </tr> -</thead> \ No newline at end of file +</thead> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java index d5c70d5..e12b6d7 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java @@ -80,9 +80,7 @@ public class GridTests extends TapestryCoreTestCase clickAndWait("link=Title"); - assertAttributeValueEndsWith("//th/a/img/@src", "/sort-asc.png"); - - assertAttribute("//th/a/img/@title", "[Asc]"); + assertAttribute("//th/@data-grid-column-sort", "ascending"); clickAndWait("link=1"); @@ -90,8 +88,7 @@ public class GridTests extends TapestryCoreTestCase clickAndWait("link=Title"); - assertAttributeValueEndsWith("//th/a/img/@src", "/sort-desc.png"); - assertAttribute("//th/a/img/@title", "[Desc]"); + assertAttribute("//th/@data-grid-column-sort", "descending"); clickAndWait("link=" + RESET); @@ -100,14 +97,6 @@ public class GridTests extends TapestryCoreTestCase assertTextSeries("//tr[1]/td[%d]", 1, "Bug Juice", "Late Lounge (2 of 2)", "45 Dip", "Electronica", "4", "-"); } - private void assertAttributeValueEndsWith(String attributeLocator, String suffix) - { - String value = getAttribute(attributeLocator); - - assertTrue(value.endsWith(suffix), String.format("Value for attribute %s (%s) should end with '%s'.", - attributeLocator, value, suffix)); - } - @Test public void grid_remove_reorder() { http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java ---------------------------------------------------------------------- diff --git a/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java b/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java index ada61bf..d5f9540 100644 --- a/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java +++ b/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java @@ -138,11 +138,11 @@ public class TapestryHibernateIntegrationTests extends SeleniumTestCase clickAndWait("link=First Name"); - assertText("//td[@class='firstName t-sort-column-ascending']", "Joe_1"); + assertText("//td[@data-grid-column-sort='ascending']", "Joe_1"); clickAndWait("link=First Name"); - assertText("//td[@class='firstName t-sort-column-descending']", "Joe_9"); + assertText("//td[@data-grid-column-sort='descending']", "Joe_9"); } public void hibernate_statistics() http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b04fb2fd/tapestry-jpa/src/test/java/org/apache/tapestry5/jpa/integration/app1/JpaIntegrationTest.java ---------------------------------------------------------------------- diff --git a/tapestry-jpa/src/test/java/org/apache/tapestry5/jpa/integration/app1/JpaIntegrationTest.java b/tapestry-jpa/src/test/java/org/apache/tapestry5/jpa/integration/app1/JpaIntegrationTest.java index d0d341f..83f9162 100644 --- a/tapestry-jpa/src/test/java/org/apache/tapestry5/jpa/integration/app1/JpaIntegrationTest.java +++ b/tapestry-jpa/src/test/java/org/apache/tapestry5/jpa/integration/app1/JpaIntegrationTest.java @@ -1,4 +1,4 @@ -// Copyright 2011 The Apache Software Foundation +// Copyright 2011, 2013 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -140,11 +140,11 @@ public class JpaIntegrationTest extends SeleniumTestCase clickAndWait("link=First Name"); - assertText("//td[@class='firstName t-sort-column-ascending']", "Joe_1"); + assertText("//td[@data-grid-column-sort='ascending']", "Joe_1"); clickAndWait("link=First Name"); - assertText("//td[@class='firstName t-sort-column-descending']", "Joe_9"); + assertText("//td[@data-grid-column-sort='descending']", "Joe_9"); } public void commit_after_on_component_methods()