Announcement

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

  • Isomorphic
    replied
    You'll find that Fluent setters are now present for Canvas, BaseClass, DataClass, and subclasses, where the previous signature declared a void return type. In some cases Fluent setters couldn't be applied because our APIs extend existing GWT APIs.

    Leave a comment:


  • Blama
    replied
    Hi all,

    I just noticed this is now the case in some parts of 12.1p, e.g. DSRequest (search for "DSRequest instance, for chaining setter calls").

    Best regards
    Blama

    Leave a comment:


  • Isomorphic
    replied
    We're looking into this, but it's not a simple change as some of our APIs inherit from existing GWT APIs.

    Leave a comment:


  • pavlo
    started a topic Fluent Setters

    Fluent Setters

    Hi,

    According to the FAQ smartgwt API is generated. So, didn't you consider to use fluent setters (when setter returns this) to support chaining of methods?
    In such case code will look more like in DSL-style

    PHP Code:
    final DynamicForm form = new DynamicForm()
        .
    setWidth(250)
        .
    setFields(new FormItem[] {
            new 
    TextItem()
                .
    setTitle("Username")
                .
    setRequired(true)
                .
    setDefaultValue("bob"); 
        }); 
Working...
X