Important Corner Use Case for ICEPush and Custom Widget together

Hellow Vaadin Experts!

I need your attention and help to address and understand the following use case.

I am using ICEPush and the custom widget together to push the data as well as to change the CSS property of my component. And in this case the data does not get push to that component which is affected by CSS change. The CSS change is getting added to that component. However the data is pushed to the other component which is not affected by CSS injection change.

Following is the code
class MyApp …
{
ICEPush pusher = new ICEPush();

  public MyApp() 
  {
       addComponent(pusher); //Add pusher to the root layout pannel
   }

}

The root layout is AbsoluteLayout.

I added one ComboBox and one TextBox into this layout.

There is a thread that adds the data into these ComboBox and TextBox every 5 seconds and I can see the data is being pushed into the browser as expected.

Now, I added a custom Widget using AbstractLayout that changes the color of the TextBox but injecting the CSS into the element and associate the id value to the TextBox. Every 5 send I call the serverComponent.requestRepaint() so that the CSS is being applied. And now the CSS is getting applied to the TextBox correctly but there is no data change in TextBox.

However the data is being still changed for ComboBox as before.

Questions:

a) So why does the data is not getting updated on TextBox when the CSS is being changed at runtime using custom widget?

b) Does the ICEPush object need to be added 1 instance per Application or it should be added on each view where I need to push the data?

c) The custom widget that injects the CSS at runtime, should it be added as 1 instance per application OR it should be added 1 instance per view layout?

Thanks for your help!
Wg

Hard so say without knowing exactly what your component does… Are you saying that it worked before you add the custom CSS injecting widget? What do you mean by "
added a custom Widget using AbstractLayout
" - is the CSS injection thingamajing a layout? Does it contain the TextField?

You don’t need several ICEPush object at once, but one needs to be in the layout at all times - it’s a regular component event though it does not show. So if your application has a main layout that is maintained trough the whole application, you might want to add it there.

Disclaimer: I have not tried the ICEPush add-on.

This depends on how you’ve made your component. I’m guessing the same applies as in b). Am I right?

One more friendly remainder: remember to synchronize on the application instance when updating the UI from a separate thread, otherwise strange things will occur.

Best Regards,
Marc

thanks
wG