Class DefaultSettings

  • All Implemented Interfaces:
    ControlSettings<DefaultSettings>, java.lang.Cloneable

    public class DefaultSettings
    extends SelectorSettings<DefaultSettings>
    Default Settings.

    This class can be used with generated type. It can be useful when we want to keep the field configuration but add or override a specific option without change the Settings type.

    Example:
    Suppose we have the following generated type:

     <?xml version="1.0" encoding="UTF-8"?>
     <type name="TestType" ... >
       <title ml="true" searchable="true" />
       <fields>
         <field name="textfield" editor="textfield" required="true" compactDisplay="false" type="String" searchable="true" size="80" ml="false" descriptionType="tooltip" abstract="true" truncate="400" html="false" checkHtml="true" />
       </fields>
     </type>
     
    We want to display the field "textfield" with a placeholder when we edit the type in BO. To do this, we update the JSP "/types/TestType/doEditTestType.jsp".
    We replace:
     <jalios:field name="textfield" formHandler="<%= formHandler %>">
       <jalios:control />
     </jalios:field>
     
    By
     <jalios:field name="textfield" formHandler="<%= formHandler %>">
       <jalios:control settings='<%= new DefaultSettings().placeholder("Please enter your text...") %>' />
     </jalios:field>
     
    The text field will be displayed in the same way but a placeholder will be added in addition.
    Author:
    ndossantos