Column#setWidth() is simpler, but we need a discoverable way to allow the
user to set the table to use fixed width layout and set a reasonable table
width.  Otherwise, they'll either get weird behavior because layout:auto
doesn't truncate, or columns won't show up because columns are 0 width by
default in fixed width layout.  We could JavaDoc it, but I wish it was more
discoverable in the API.

Thanks,
John LaBanca
[email protected]


On Wed, Jan 5, 2011 at 5:54 PM, Stephen Haberman
<[email protected]>wrote:

>
> Sounds really cool.
>
> That being said, you said "RFC"...so... :-)
>
> > This approach ties the column width to the view, not to the Column
> > itself, so users can use different widths for mobile and desktop
> > views.
>
> Personally, I'd rather just do:
>
>    column.setWidth(20, Unit.PX);
>
> Than the ColumnsWidths abstraction.
>
> ...besides, in canonical GWT MVP, wouldn't you do something like:
>
>    interface XxxView { HasData<T> table(); }
>
>    class MobileView {
>      void foo() {
>        columnA.setWidth(20, Unit.PX);
>      }
>    }
>
>    class DesktopView {
>      void foo() {
>        columnA.setWidth(200, Unit.PX);
>      }
>    }
>
> ...are you really going to want to share widths across desktop/web? Or,
> even if you do, should that be something your presenter worries about?
> I suppose if the widths relative--but even if the widths are relative,
> it still seems like that is a code reuse concern between the views, and
> not something the presenter should be concerned about.
>
> (Look at that, Column is even an abstract class, so you can add setWidth
> without a breaking change. ;-) )
>
> - Stephen
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to