PDA

View Full Version : [FIXED] [2.0] TwinTriggerField error



maku
19 Jul 2009, 8:48 AM
Hi,

when I use a TwinTriggerField with GXT 2.0 ( as with GXT 1.2.x) the behaviour is wrong.
(used with GWT 1.6.4 hosted mode)

Events.TwinTriggerClick:
First click on the TwinTrigger button (= first of the two buttons) leads to a NullPointerException in TrifferField:228.
After the first click I get the event as expected.


Events.TriggerClick:
I get NEVER the TriggerClick Event when I press the second button. I get only the event when I click on the textfield part of the TwingTriggerField.

Here my sample code:

public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.setLayout(new BorderLayout());
LayoutContainer c = new LayoutContainer();

TwinTriggerField<String> twinTriggerField=new TwinTriggerField<String>();
twinTriggerField.setFieldLabel("Twin Trigger");
twinTriggerField.setValue("Testvalue");

twinTriggerField.setEditable(false);

twinTriggerField.addListener(Events.TwinTriggerClick, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
System.out.println("TwinTriggerClick");
}
});

twinTriggerField.addListener(Events.TriggerClick, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
System.out.println("TriggerClick");
}
});

FormPanel formPanel=new FormPanel();
formPanel.setHeaderVisible(false);
formPanel.add(twinTriggerField);

c.add(formPanel);
viewport.add(c, new BorderLayoutData(LayoutRegion.CENTER));


RootPanel.get().add(viewport);
}

Regards,
Martin

sven
19 Jul 2009, 9:22 AM
Fixed in SVN