Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TextItem adding colon when name is set as "name"or "description"

    Hi
    I am using SmartGWT version 12.1-p20200520.
    I have dynamic form which is bound to a sql datasource. There are fields in DB table having column names as "name" and "description". When i bind these to TextItem within the form the UI gets distorted.

    Code:
    setTextItemProperties(projectName, DSConst.ProjectSQL.NAME, MESSAGES.projectName(), false);
    setTextItemProperties(description, DSConst.ProjectSQL.DESCRIPTION, MESSAGES.projectDescription(), false);

    private TextItem setTextItemProperties(final TextItem textItem, final String name, final String title, final boolean hidden) {
    textItem.setName(name);
    textItem.setTitle(title);
    textItem.setHeight(28);
    textItem.setWidth("100%");
    textItem.setCanEdit(true);
    textItem.setHidden(hidden);
    return textItem;
    }

    The UI snippet is attached. You can see extra colons which get displayed below the field.

    I even have set setTitleSuffix("") for the form. So for other fields its displaying fine. Only for these fields issue appears.
    Attached Files

    #2
    Those are probably the only two required fields on the form. Try setRequiredTitlePrefix("") and setRequiredTitleSuffix("") along with setTitleSuffix("") to remove the trailing colon from all fields.

    Comment


      #3
      Thanks. This worked.

      Comment

      Working...
      X