Hi, hope everyone are well!

Trying to localize some columns I've found some name inconsistency:
<quote>
/** The property name of the row object to render. */
    protected String name;

  /**
     * The property name used to populate the &lt;td&gt; "title" attribute.
     * The default value is null.
     */
    protected String titleProperty;

 /** The title of the column header. */
    protected String headerTitle;

</quote>

And in the constructor, we have:

<quote>
 /**
     * Create a table column with the given property name. The table header
     * title will be set as the capitalized property name.
     *
     * @param name the name of the property to render
     */
    public Column(String name)
</quote>

But, following the pattern used in the others controls: set the
control's name to get it localized, you see that Column don't work
like that. It is used as name of the row object to render and not as
control's name.
For example[]:
<quote>
        Column columnColor = new Column("color");
        table.addColumn(columnColor);
        Column columnCustomerName = new Column("customer.person.name");
        table.addColumn(columnCustomerName);
        Column columnPrice = new Column("priceTable.price");
</quote>
Here, nothing will be localized[2][3]. The Column name(again: the name
of the row object to render and not the control's name) will be
converted into a header title using the method:
ClickUtils.toLabel(String).

I would like the build the Column control like so:
<quote>
Column columnCustomerName = new Column("columnCustomerName",
"customer.person.name");
or
Column columnCustomerName = new Column("customer.person.name");
But the control's name should be columnCustomerName and not
"customer.person.name".
</quote>

Where is the control's name?
Maybe I'm not understanding the Column usage and if so would you mind
to explain it little more?

Regards,

Gilberto Caetano de Andrade
Analista de Sistemas/DBA
www.secad.to.gov.br
blog.gilbertoca.com


[1]http://code.google.com/p/construtor/source/browse/trunk/cip/park/src/main/java/park/web/page/ViewVehicle.java
[2]http://dl.dropbox.com/u/9093640/column_not_localized.png
[3]http://code.google.com/p/construtor/source/browse/trunk/cip/park/src/main/resources/park/web/page/ViewVehicle_pt_BR.properties

Reply via email to