GXT 3 ContentPanel Changes

We have been busy working on Ext GWT 3. I wanted take some time to discuss some of the changes we have made to ContentPanel which reflect design changes in Ext GWT 3.

UIBinder

Rather than manually creating the DOM within Java code, as GXT 2 does, we have moved the HTML representing the panel into a UIBinder XML file. This has many advantages.

  • HTML is separated from Java code
  • DOM elements are automatically “bound” to the widget
  • Better performance over manually creating DOM elements

We are also working on changes that will allow you to wire up Ext GWT widgets, containers, and layouts, within UIBinder. I will post some code samples in a future post.

CssResource

We are using CssResource to define constants that our widgets use. For example, ContentPanel has a primary style of ‘x-panel’. In addition there are several dependent style names used within ContentPanel. With the current design, the base class and dependent class names all are defined using constants in CssResource. See the panel.css source code below. You will find that there are just @def entries and no actual CSS. The libraries actual CSS is still contained in external css files.

Customizations

One of the goals of the current design was to allow for customizations. The design allows developers to replace existing GXT styles and UIBinder implementations both globally and per widget instance. Take a look at the code, and let us know if you have any comments.

ContentPanel.ui.xml


FramedContentPanel.ui.xml

XResources.java

ContentPanelStyle.java

panel.css

ContentPanel.java

You can follow any responses to this entry through the RSS feed. You can leave a response, or trackback from your own site.

Tagged , , , ,

11 Comments

  1. Mar 29, 2011

    Jorg Janke

    Hi Darrell,
    looks great. Have my stuff working using “plain” MVP, Request Factory and UIBinder. Can’t wait for GXT 3.0 to make it look nice too.
    Cheers,
    Jorg

  2. Apr 2, 2011

    Isak Büyük

    Hi Darrel,

    When do you publish GXT 3.0?

    Bye
    Isak

  3. Apr 2, 2011

    Travis Camechis

    Can you tell me what the plans are for Cell widgets within GXT 3.0? It looks like this release of GXT is going to move inline with what GWT is doing which is great.

  4. Apr 4, 2011

    Darrell Meyer

    Iask – We plan to have 3 put into SVN in a few weeks and then have the first development preview towards the end of the month.

    Travis – Could you be a little more specific in what you are asking in regards to cell widgets in GXT?

  5. Apr 4, 2011

    Travis Camechis

    Basically will GXT 3 incorporate the use of Cell Widgets at all? I believe GWT is moving all of there stuff to Cell widgets eventually.

  6. Apr 22, 2011

    Daily del.icio.us for March 26th through March 29th — Vinny Carpenter's blog

    [...] according to Forrester. However, only 2 percent will support employees who bring their own PC.GXT 3 ContentPanel Changes | Darrell Meyer’s Blog – We have been busy working on Ext GWT 3. I wanted take some time to discuss some of the [...]

  7. Apr 23, 2011

    Tony BenBrahim

    Is ContentPanel really going away? Please keep in mind some of us have very large applications and we will not make the effort to port 50K+ lines.
    In addition, many of your customers have large frameworks and supporting libraries around Gxt, that if they break, will keep them from starting new applications with 3.0.
    What it means in the end is customers stuck on 2.x and lost support revenue when 2.x stops being supported.

    • Apr 23, 2011

      Darrell Meyer

      Travis, 3.0 is using GWT Cells where appropriate.

      Tony, ContentPanel is not going anywhere in 3. This post was just about the new design.

  8. May 17, 2011

    Anna Ratcliffe

    Hi, the changes look great, but how easy will an upgrade be? I suppose 3.0 will not be compatible to 2.x …

    • May 17, 2011

      Darrell Meyer

      The upgrade should be straightforward but will require some refactoring of your application. We will provide a migration guide to help the upgrade process. 3.0 will not be backwards compatible with 2.X.

      • May 18, 2011

        Anna Ratcliffe

        Straightforward sounds good ;) Any idea when the migration guide might be available? (And GXT 3.0, come to that.?…)

Leave a Reply

Twitter

Photos

About Me

Before joining Sencha, Darrell Meyer was the creator of the popular open source MyGWT Widget Library for Google Web Toolkit (GWT). Darrell brings his expert Java and GWT knowledge to Sencha, where he leads the Ext GWT product team. With 10+ year’s experience building enterprise web applications, Darrell is equally well versed as both a software architect and user interface expert.