What is com.vaadin.terminal.gwt.client.Container equivalent in beta?

What is equivalent of com.vaadin.terminal.gwt.client.Container in Vaadin 7 beta? Some of the old add-ons are using this class and I am trying to convert them to Vaadin 7 beta API architecture.

thanks

Hello,

You can start with reading these
mini-tutorials for Vaadin 7
in order to get insight of how it works.
This one
describes how to implement your own
ComponentContainer
.
That’s anyway worth reading but if you’ll have any further questions - feel free to post those here.

HTH,
Aleksandr

There really isn’t any equivalent interface. If you create a component which contains other components your server side class should typically extend AbstractSingleComponentContainer (for setContent/getContent, i.e. one child) or AbstractComponentContainer (for addComponent/removeComponent, i.e. many children). Similarly your connector should extend ASCCConnector or ACCConnector.

The component hierarchy is automatically communicated by the framework - contrary to Vaadin 6. Use onConnectorHierarchyChange on the client side to update the hierarchy.

As for the actual methods in the Container interface:

  • RenderSpacegetAllocatedSpace(com.google.gwt.user.client.ui.Widget child), boolean requestLayout(Set children) - there is no longer any need for these methods. They were used for % → px conversions
  • hasChildComponent(com.google.gwt.user.client.ui.Widget component) - There is the widget hierarchy provided by GWT classes and the connector hierarchy provided by Vaadin classes
  • replaceChildComponent, hasChildComponent - component containers are no longer required to be able to replace child components or provide information this way about their children (GWT widget hierarchy or Vaadin connector hierarchy provides the same information)
  • void updateCaption(Paintable component, UIDL uidl) - this is replaced by updateCaption(ComponentConnector connector) in the connector