Announcement

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

    In SelectItem ChangeHandler doesn't work

    Hi All,

    I have a license for SmartGWT 5.1p Power.

    In my *.ds.xml I have a definition for a selectitem:

    <field name="contacttype" type="text" >
    <valueMap>
    <value>Firma</value>
    <value>Mensch</value>
    <value>Interner Mitarbeiter</value>
    </valueMap>
    </field>

    My Java code looks like:

    final SelectItem contacttyp = new SelectItem("contacttype","Kontakt Typ");
    contacttyp.addChangeHandler(new ChangeHandler() {

    public void onChange(ChangeEvent changedEvent) {
    System.out.println("CHANGEHANDLER");
    }
    });

    The GUI shows the list and I can select new values however the ChangeHandler never got called. Any Idea why? I followed the samples but cant see any differences.

    Thx

    #2
    We're not seeing a general problem with SelectItem's ChangeHandler, and if there were such a problem, we should have many, many users reporting it.

    You might double-check your imports - perhaps you are importing ChangeEvent from some non-SmartGWT package - but it seems like this should result in a compilation error if the code your posted is your actual code.

    If you can't find the problem, we would suggest trying to work toward a ready-to-run, minimal test case demonstrating the issue. In the process you will most likely find a problem in your code or your project setup.

    Comment

    Working...
    X