Field
  • 03 Nov 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Field

  • Dark
    Light

Article summary

net.comactivity.core.renderer.model.composite.Field

setAttribute

Method only supported a subset of attributes. There's no need for a general approach when individual setters are available.

Previously supported attributes were displayLength, maxLength, columnLabel, customLabelStyle, and customFieldStyle.

Removed

setAttribute(String attribute, String value)

Replace With

setDisplayLength(int displayLength)
setMaxLength(int maxLength)
setLabelText(String labelText)
setCustomLabelStyle(String customLabelStyle)
setCustomFieldStyle(String customFieldStyle)

setComponentCustomCssClass

Methods didn't work as expected.

Removed

setComponentCustomCssClass(String customCssClass, String css)
setComponentCustomCssClass(ComponentCustomCss customCssClass, String css)

Replace With

setComponentCustomCssClass(String customCssClass, int rowNo)
setComponentCustomCssClass(String customCssClass)

setCustomFieldStyle

Method didn't set a custom style on the field.

Removed

setCustomFieldStyle(String customFieldStyle)

Replace With

getWidget().setCustomFieldStyle(customFieldStyle)

setCustomFieldStyleProperty

Methods set a custom field style property. Setting specific style properties in your Java code is not the preferred way of styling.

Removed

setCustomFieldStyleProperty(String propertyName, String propertyValue)
setCustomFieldStyleProperty(String propertyName, String propertyValue, int row)

Replace With

setComponentCustomCssClass(String customCssClass)
setComponentCustomCssClass(String customCssClass, int rowNo)

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.