0 Replies Latest reply on Jun 5, 2007 12:26 AM by Anthony Whitford

    Localizable CRUD from seam-gen

    Anthony Whitford Newbie

      For a long time, I never paid much attention to localization because my users all spoke English. Alas, I now need the convenience of localization.

      I remember that the earlier generation of seam-gen (the one built into the Hibernate reverse engineering tool part of the JBoss IDE) embedded message bundle lookups for all of its generated labels. But it would seem that this feature no longer exists, and I am seeing a lot of hard-coded English.

      For example, in seam-gen\view\edit.xhtml.ftl:

      <h:commandButton id="save"

      and in seam-gen\view\editproperty.xhtml.ftl:
      <ui:define name="label">${componentProperty.name}</ui:define>

      For the first case, I could see seam-gen automatically declare some constants for common labels like "Save", "Delete", "Cancel", etc. Let's say they were called, "Seam.Edit.Save", then the template could embed a messages lookup:

      For the second case, it is a little more complicated because the template needs to have a messages lookup and we need to augment the messages.properties file... The first part is easy enough, but the messages.properties file looks like a constant artifact in seam-gen.

      Adding a message bundle lookup for field labels would help in renaming the fields -- I only need to tweak the message bundle instead of editing 3 xhtml files for each business domain object.

      But before I dig any further, it looks like someone has beat me to this issue and logged an issue already:

      Any plans for getting this in the 1.3 beta?