I want the colon for FormItems that do have a valid title.
But I want the FormItem suffix to be suppressed when the title is empty/null (see attachment).
I guess I could turn title suffixes off and then add the colon myself as part of the title, but that's quite a bit of work... any "simple" way to accomplish this? Ideally, I'd be able to set this globally or at least on a per FormItem basis...
Context menu
1.
SmartClient Version: v10.0p_2015-06-24/LGPL Development Only (built 2015-06-24)
GWT 2.5.0
2. browser(s) and version(s) involved
Firefox 19: fails
Chrome 43: passes
IE 9: passes
Sample code if applicable
But I want the FormItem suffix to be suppressed when the title is empty/null (see attachment).
I guess I could turn title suffixes off and then add the colon myself as part of the title, but that's quite a bit of work... any "simple" way to accomplish this? Ideally, I'd be able to set this globally or at least on a per FormItem basis...
Context menu
1.
SmartClient Version: v10.0p_2015-06-24/LGPL Development Only (built 2015-06-24)
GWT 2.5.0
2. browser(s) and version(s) involved
Firefox 19: fails
Chrome 43: passes
IE 9: passes
Sample code if applicable
Code:
public class TestSetTitleSuffix implements EntryPoint {
/**
* The EntryPoint interface
* Upgrading SmartGWT from 4.0-2013-11-30 to 5.0-2015-06-25
*/
public void onModuleLoad () {
final TextItem item1 = new TextItem ();
item1.setTitle ("Name");
item1.setValue ("Title is: Name");
final TextItem item2 = new TextItem ();
item2.setTitle ("");
item2.setValue ("Title is: <empty string>");
final TextItem item3 = new TextItem ();
item3.setTitle (null);
item3.setValue ("Title is: null");
final TextItem item4 = new TextItem ();
item4.setTitle (null);
item4.setValue ("Title is: <not set>");
final DynamicForm form = new DynamicForm ();
// form.setTitleSuffix ("");
// form.setRequiredTitleSuffix ("");
form.setFields (item1, item2, item3, item4);
form.draw ();
}
}
Comment