Hello,

 

When t:Select component generates option labels for enums, the
toString() method is not honored at all. It currently generates both
labels and values based on Enum.name() method. In my understanding, the
labels shall be generated based on toString() method instead.

 

Here is a piece of HTML code T5 generated:

<select id="team" name="team">
<option value="OMS">Oms</option>
<option value="PAYMENT">Payment</option>
</select>
 
And I expect it shall look like
<select id="team" name="team">
<option value="OMS">OMS</option>
<option value="PAYMENT">Payment</option>
</select>

 

Here is the enum class:

public enum Team {

  OMS, PAYMENT;

  public String toString() {

     switch(this)  {

       OMS:

          return "OMS";

       PAYMENT:

          return "Payment";

     }

     return "":

  }

 

This issue is found in Tapestry 5.1.0.5.

 

Regards,

Balduran

 

Reply via email to