pkt1583 / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

FormPanel.getFields() throw an exception (Unrecognized xtype datefieldx) if contains DateFields #447

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I have a really big UI so i can't reproduce it with a small example, but 
the problem is in DateField.java:

   "
       public String getXType() {
           return "datefieldex";
       }
   "

the correct version is 
   "
    return "datefield";
   "
so the ComponentFactory don't throw an exeption (because it's not know 
"datedfieldx" xType)

What is the expected output? What do you see instead?
There is no expected output, only the getField() method is working. Instead 
i catch an "Unrecognized xtype datefieldx" exception.

What version of the product are you using? On what operating system?
gwt-ext 2.0.5 (on XP)

Original issue reported on code.google.com by xyber....@gmail.com on 23 Oct 2008 at 9:46

GoogleCodeExporter commented 8 years ago
xyber.abt,
     I would really need a small sample app for this...  The datefieldex is
registered internally within the DateField class...  This was done statically 
so,
this xtype should be recognized.  However, the error in this issue refers to
"datefieldx" with is not the right xtype... 

Original comment by mlim1...@gmail.com on 9 Nov 2008 at 8:26

GoogleCodeExporter commented 8 years ago
A simple sample app would be a formPanel, with a dateField inside, and then ask 
for
the xtype of the datefield : (check for typos and imports)

public class DatexCheck extends FormPanel implements EntryPoint {
 DateField fld = new DateField("ItsMe", "itsme");
 public void onModuleLoad() {
  add(fld);
  addButton(new Button("checkItOut"), new ButtonListenerAdapter(){
   public void onClick(Button button, EventObject e) {
     MessageBox.alert(fld.getXType());
   }
  })
 }
}

Problem appeared on linux, gwt-ext 1.5.2.

Original comment by fabal...@gmail.com on 24 Nov 2008 at 8:03

GoogleCodeExporter commented 8 years ago
When calling formPanel.getFields() I get this error:

##########################################
[ERROR] Unrecognized xtype datefieldex
java.lang.IllegalArgumentException:
Unrecognized xtype datefieldex
##########################################

But not always is throwing the error. The first time is called it always work. 
The 
posterior calls (usually the second call) fail.

Original comment by pepgrif...@gmail.com on 13 Feb 2009 at 12:06