Adding to FlexTable is incorrect when RowSpan is set

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Adding to FlexTable is incorrect when RowSpan is set

Postby ashouric » Fri Oct 20, 2006 4:41 am

Dear All,

For the following, try to add a label in the cell under label "three", it will create another column instead.

Code: Select all
   public MyTest() {
      final FlexTable flexTable = new FlexTable();
      initWidget(flexTable);

      final Label oneLabel = new Label("One");
      flexTable.setWidget(0, 0, oneLabel);

      final Label twoLabel = new Label("Two");
      flexTable.setWidget(0, 1, twoLabel);
      flexTable.getFlexCellFormatter().setRowSpan(0, 1, 2);

      final Label threeLabel = new Label("Three");
      flexTable.setWidget(0, 2, threeLabel);

      final Label fourLabel = new Label("Four");
      flexTable.setWidget(1, 0, fourLabel);
   }


Code created is:
Code: Select all
flexTable.setWidget(1, 2, label);


instead of
Code: Select all
flexTable.setWidget(1, 1, label);
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Postby Konstantin.Scheglov » Fri Oct 20, 2006 8:58 am

No, GWT Designer generates correct code. Problem is inside of FlexTable. It fills every empty cell with "nbsp", however if there is widget spanned on several rows, some cells can be already "used" by this widget, so placing "nbsp" to it shifts columns.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Postby ashouric » Fri Oct 20, 2006 2:46 pm

Konstantin.Scheglov wrote:Problem is inside of FlexTable.


I am afraid I can't decide from HTMLTable documentation.

If you are confident, then make sure GWT team is notified.
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Postby Eric Clayberg » Fri Oct 20, 2006 4:02 pm

ashouric wrote:I am afraid I can't decide from HTMLTable documentation.
If you are confident, then make sure GWT team is notified.

Yes. The GWT team is well aware of the problem and it has been discussed on the GWT forum.

Our problem is whether we generate "correct" code for a buggy widget which will then be correct when Google fixes the behavior, or do we generate "incorrect" code that happens to work now, but will fail as soon as the problem is fixed.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby ashouric » Sat Oct 21, 2006 12:35 am

I don't find it in GWT issues.

I would suggest leaving the current bahviour, while adding a description in "known issues" referencing GWT forum/issues.

Documents should also specify what is 'fixed' by GWT designer.
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Postby Konstantin.Scheglov » Sun Oct 22, 2006 7:26 pm

ashouric wrote:
Konstantin.Scheglov wrote:Problem is inside of FlexTable.


I am afraid I can't decide from HTMLTable documentation.


Use the Source, Luke! :-)
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests