Search code examples
gwtgxt

Remove border for Portlet component- Sencha GXT in java


I am trying to remove borders of the portlet as well as the panel.

Below is my code snippet,

public class TestViewImpl extends ViewImpl implements TestViewPresenter.MyView{

    private PortalLayoutContainer portal;   

    @Inject
    public TestViewImpl (){
          portal = new PortalLayoutContainer(1);

          vp = new VerticalLayoutContainer();

          portal.getElement().getStyle().setBackgroundColor("white");
          portal.setColumnWidth(0, 1);      
          portal.setBorders(false);

          ContentPanel portlet = new Portlet(); 
          portlet.getHeader().setVisible(false);
          portlet.setBorders(false);
          portlet.setBodyBorder(false);
          portlet.add(vp);
          portlet.setResize(true);
          portlet.setBodyStyle("backgroundColor:white;");   
          portal.add(portlet, 0);

But somehow the border is always visible.How do I remove the border ? Please help.

Thanks in advance


Solution

  • With that code I can get the borders to disappear (with small alterations to container instantiation). Where are those containers coming from? Are you using UI Binder, if so could you post that code as well.

    The blue section that is left is the background from the header. (Hide header hides the text)

    Snapshot