Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.
-
Ext GWT Premium Member
FieldLabel: fieldSeparator is shown even you set the separator to "" for a field
I would expect, that it is possible to set a for one field in a form.
-
Sencha User
This works for me:
label.setLabelSeparator("");
label.setText(""); // set any text
-
Ext GWT Premium Member
It works! Thanks
@Sencha:
Is it possible to add the label separator to the signature of the constructor?
Something like that:
public FieldLabel(Widget widget, String label, String labelSeparator) {
this(widget);
this.labelSeparator = labelSeparator;
setText(label);
}
public FieldLabel(Widget widget, String label, String labelSeparator, FieldLabelAppearance appearance) {
this(widget, appearance);
this.labelSeparator = labelSeparator;
setText(label);
}
This will save some code.
-
Normally you do not change the separator so often. This means having extra a contructor for this does not make so much sense. If you require this, you can easily subclass FieldLabel and add this to your own contructor.
-
Ext GWT Premium Member
Creating large forms with a lot of fields might be annoying, because you need four statements to do the same thing you can do with one having these constructor.
FieldLabel fl = new FieldLabel(widget, "", "");
fl.setLabelSeparator("");
fl.setText("");
fc.add(fl, new VerticalLayoutData(1, -1));
compare to
fc.add(new FieldLabel(widget, "", ""), new VerticalLayoutData(1, -1));
Of course, I can subclass FieldLabel, but this looks a little bit nicer to me... ;-)
-
This is only the case when you really want to change the separater, which, as i said, is not used that often. If you do not want to change it than there is already a contructor which only takes the label.
-
Sencha User

Originally Posted by
sven
This is only the case when you really want to change the separater, which, as i said, is not used that often. If you do not want to change it than there is already a contructor which only takes the label.
I think it is misleading behaviour: you can specify separator character using UiBinder but it does not take any effect! It is impossible to initialize widget that way. Why then have a setter for it at all, if we can subclass the FieldLabel and do it the right way? Same is for setting field label length (there is a post in the thread): you cannot change it after the label has been constructed, though there is a public setter for it
-
Sencha User
+1
Please, guys, think about UiBinder users too.
UiBinder is one of the major benefits of GXT 3.0, right?
-
UiBinder users should not be effected by this request at all.
-
Sencha User
Actually as Konstantin told, UiBinder is affected.
FieldLabel.setText() uses "labelSeparator".
But when "labelSeparator" is set, it does not change text!
Look into BeanParser.
Code:
for (Map.Entry<String, String> entry : setterValues.entrySet()) {
String propertyName = entry.getKey();
"setterValues" is {text="myText", labelSeparator="sss"} here, because it is HashMap, so order of items is almost random. So, problem is that FieldLabel is not actually bean, because its behavior depends on order of setters calling.
We had same problem during developing GXT 2.x support in GWT Designer.
But that was Java and we can solve this by using "correct" (i.e. expected by Ext GWT) order of setters calling. I'm not sure what to do in case of UiBinder...