You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having problems adding widgets into the grouping section of the Timeline widget
When i add a button to the timeline, It shows up but the click event does not register. Is there a work around for this? Below is the code I used and attached is how it displays.
final FlexTable table = new FlexTable();
table.setWidth("100%");
final HTML labelPanel = new HTML("Group: " + group);
labelPanel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
table.setWidget(0, 0, labelPanel);
final Button button = new Button("Button");
button.addClickHandler(new ClickHandler() {
public void onClick(final ClickEvent p_event) {
Window.alert("Button");
}
});
table.setWidget(0, 1, button);
final HTMLPanel htmlPanel = new HTMLPanel("");
htmlPanel.add(table);
item.put("group", new JSONString(htmlPanel.toString()));
The text was updated successfully, but these errors were encountered:
Stringfying your HTML strips all eventhandlers that you created. The current grouping functionality is very limited, and not suited for this type of use as it only accepts a string.
What you can try as a workaround is something like this:
Create a string with your group html where the button has an id, like
Good suggestion. But I think we should really improve the grouping feature. Providing long strings (with complex HTML code) is not optimal in my opinion. What we really need is a "group" object:
Groups should be referenced by keys and not by content. At the moment we compare long strings to find events of the same group. Do you know what I mean?
Hi,
I am having problems adding widgets into the grouping section of the Timeline widget
When i add a button to the timeline, It shows up but the click event does not register. Is there a work around for this? Below is the code I used and attached is how it displays.
item.put("group", new JSONString(htmlPanel.toString()));
![timelineEx](https://camo.githubusercontent.com/e43edd8d189a268412e81715803143dda52d043842799f3c447f1abfc3baa5b5/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f343133393237352f3338363030312f36663762303735382d613639392d313165322d396135622d3131313933643764633165312e504e47)
The text was updated successfully, but these errors were encountered: