next release ideas

5 views
Skip to first unread message

David Durham

unread,
Dec 9, 2009, 2:03:54 PM12/9/09
to gxtf...@googlegroups.com
Hi all,

IMO, the critical feature for the next release will be making the
fields extensible -- basically make creating new types of fields, or
replacing the rendering for the existing fields an easy and painless
extension point for users. Right now, the field types are basically
canned ones. It is probably difficult for the average user to
incorporate custom field types or change the way the current ones
function. I haven't thought too much about the implementation (have
some ideas kicking around) and I'd like to get feedback about what
others think is the best way to go.

Crappy overall architecture diagram here:
http://code.google.com/p/gxtforms/wiki/FormService

This new extension point can be broken into 2 parts. The first is
code on the server-side to facilitate custom annotations and
FieldConfiguration resolution. That is, the method for taking an
annotation with whatever attributes and providing a FieldConfiguration
object that can be passed to the client.

The second is the client-side components required to plugin a custom
FieldRenderer for a custom FieldConfiguration. And I think the
existing code that performs this work should be migrated to this new
extension style, so that we can replace the default implementations of
existing fields.

Thoughts?

Thanks,
Dave

Jean Madson

unread,
Jun 9, 2010, 2:12:08 AM6/9/10
to David Durham, gxtf...@googlegroups.com, Jean Madson
I think this is the path to customization, but did you think about
collections?
e.g., a form for Employee, which has a set of telephone numbers, and
all other traditional fields like name, surname, address, and so on...
Perhaps, for this case, it could
be a good choice to create an annotation @Grid to tell the FormService
to create configuration to
a grid into the form Employee relative to the telephone numbers'
collection. Thus, when the form is rendered, it
would have a grid to in-place edit of the telephone numbers.

@SuppressWarnings("serial")
@Form(heading = "Employee Form", labelWidth = 100, fieldWidth = 150,
width = 500)
public class EmployeeForm implements BeanModelTag, Serializable {

@CharField(index = 1, fieldLabel = "First Name", fieldSet =
"Personal Info")
String firstName;

@CharField(index = 2, fieldLabel = "Last Name")
String lastName;
...

@Grid( fieldLabel="Telephones" )
Set<Telephone> telephones = new LinkedHashSet<Telephone>();

...


}

@SuppressWarnings("serial")
public class Telephone implements BeanModelTag, Serializable {

@CharField(index = 1, fieldLabel = "Number")
String number;

@ChooseOneField(index = 1, fieldLabel = "Telephone Type")
TelephoneType type;

}


public enum TelephoneType {

Commercial, Personal, Mobile;

}


I hope I have been clear,
Thanx for GXTForms,

Jean Madson

Reply all
Reply to author
Forward
0 new messages