Drillup Button Click Listener - Vaadin Charts - vaadin

I know that drillup button works on the client side, but is there any way to know when that button is clicked?

In the ColumnWithLazyMultiLevelDrilldown class you can see example of using ChartDrillupListener.
Chart chart = new Chart(ChartType.COLUMN);
chart.addChartDrillupListener(new ChartDrillupListener() {
#Override
public void onDrillup(ChartDrillupEvent event) {
log("ChartDrillupEvent");
}
});

Related

How to add Header Click Listner in Java Vaadin Table?

I am trying to add a very simple listener to my table header as specified in the book of Vaadin. I am using vaadin 6.4.5 in a liferay portlet. But the listener is never called...
table.addListener(new Table.HeaderClickListener() {
public void headerClick(HeaderClickEvent event) {
System.out.println("Column header clicked");
}
// Disable the default sorting behavior
});
table.setSortDisabled(true);
I am also unable to add footer to my table like this..
table.setFooterVisible(true);
table.setColumnFooter("Name", "Average");
table.setColumnFooter("Died At Age", String.valueOf(avgAge));
Both these code snippets were taken from the book of vaadin but they just don't work in my portlet application. please help
I have working Listener Yeah !
table.addHeaderClickListener(new HeaderClickListener() {
#Override
public void headerClick(HeaderClickEvent event) {
System.out.println("click Header");
Object object= event.getPropertyId();
}
});

Click listener on image broken in Vaadin 7

I run this code to make a button then add it to a GridLayout.
private Image makeButton(String text) {
final Image imageButton = new Image(text);
imageButton.setIcon(new ExternalResource("https://cdn2.iconfinder.com/data/icons/ios7-inspired-mac-icon-set/128/_app_store_128.png"));
imageButton.addClickListener(new MouseEvents.ClickListener() {
#Override
public void click(MouseEvents.ClickEvent event) {
Notification.show("Hello World");
}
});
return imageButton;
}
However the click event is never called. Any idea how/why this could happen?
Use setSource() instead of setIcon().

Setting visibility of button in wicket to false on submit

so I have a wicket ajax submit link and I want to be able to set it to be not visible or disable it once it has been clicked. What can I do to achieve this behaviour.
Thanks in advance
AjaxLink link = new AjaxLink("link") {
#Override
public void onClick(AjaxRequestTarget target) {
setVisible(false);
target.add(this);
}
};
link.setOutputMarkupId(true);
add(link);

Connect Blackberry menuitem to onscreen buttons

I have requirement for having onscreen navigation buttons along with menu items on blackberry. I need to generate menu item commands as onscreen buttons. Is there a way to generate onscreen menu item buttons in Blackberry? i.e On each screen of my application the menu items should be populated as onscreen buttons both having same functionality?
Thank you
The easiest way to accomplish what you're trying to do is write one function then have both the button and the menu item use the same function.
For example:
function doSomething() {
// Your Code Here
}
// In the function building your screen
MenuItem somethingMi = new MenuItem() {
private MenuItem() { super("Do Something",100001, 5); }
public void run() { doSomething() };
}
Button somethingBtn = new ButtonField("Do Something");
somethingBtn.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context){
doSomething();
}
}
addMenuItem(somethingMI);
add(somethingBtn);

Blackberry screen navigation

I want to know how to go from one screen to another by clicking a button that I have added to a MainScreen. I mean just like we do in the Android onClick event for a button - start another startActivity.
In the event handler for the button click, just "push" the screen that you want to appear next, and it will be pushed to the top of the screen stack. For example:
UiApplication.getUiApplication().pushScreen(nextScreen);
This will be better, using FieldChangeListener
button.setChangeListener(new FieldChangeListener()
{
public void fieldChanged(Field field, int context)
{
UiApplication.getUiApplication().pushScreen(new NextScreen());
}
});
This is the alternative way than using,
UiApplication.getUiApplication.involeLater()
{};

Resources