Hi
I am facing problem in integrating ICE PUsh in my application. I would like to go for it due to issues in Table which not reflecting the underlying the data(Domain object updating it and UI not reflectin the changes.
Please find below the steps what i did for the integration and correct me if i am wrong.
- Put the jar in WEB-INF/lib folder
- Created Instance in class which extended Application.
public class ComplexityEstimationApplication extends Application {
/**
*
*/
private static final long serialVersionUID = 1L;
private User user=null;
private ICEPush pusher;
public void init() {
Window mainWindow = new ComplexityEstimationMainWindow(this);
setMainWindow(mainWindow);
mainWindow.setApplication(this);
pusher=new ICEPush();
setTheme("turbopettheme");
getUser();
}
public ICEPush getICEPush()
{
return pusher;
}
- I need to call the push from TAB. Data needs to be refreshed for the table. From here, i dont know, how to call application object inside my tab. Right now, i did below thing.
public class EstimateTabSheet extends VerticalLayout implements
a) Button.ClickListener, Save {
Project project;
ComplexityEstimationApplication application;
b) Passing to constructor of Tabbed Component
public EstimateTabSheet(ComplexityEstimationApplication application,Project project, ModelConfig modelConfig, int flag) {
}
c) Inside i have one button and inwhich i am passing the application object.
public void buttonClick(ClickEvent event) {
if (event.getButton().equals(test)) {
test(this.application);
}
d) inside test method i am calling the push
public void test(ComplexityEstimationApplication application) {
ProjectDelegate projectDelegate = (ProjectDelegate) BeanFactory
.getInstance().getBean("projectDelegate");
try {
projectDelegate.calculate(project);
application.getICEPush().push();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
and i am getting the below exceptions
java.lang.RuntimeException: Must be attached to an application to push
at org.vaadin.artur.icepush.ICEPush.push(ICEPush.java:55)
at com.honeywell.htt.turbopet.ui.estimate.EstimateTabSheet.test(EstimateTabSheet.java:260)
at com.honeywell.htt.turbopet.ui.estimate.EstimateTabSheet.buttonClick(EstimateTabSheet.java:185)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
Please correct me where i am wrong and share correct steps for doing this. Thanks in adv for your help on this.