Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP rowTemplates changing dynamically(Can rowTemplates be changes dynamically)
RAP rowTemplates changing dynamically [message #1208998] Mon, 25 November 2013 09:31 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Currently it appears that once a Table/Tree's rowTemplate is defined it cannot be changed without disposing the entire Table/Tree and recreating it.

Is this something that has been considered for future enhancement, or have I missed something?

I can imagine a very common requirement to change the layout dynamically based on the Table's width e.g. when device is rotated, or when browser is resized - you may wish to attach a column to the right side, or to grow the size of a column if the width of the Table increases. Some columns may be good to track to left or right edge, and others may work better using percentages etc.

I'm trying to design how to support this, but wanted to understand what your plans were so that I've got a good idea of what to expect.

Thanks, John


---
Just because you can doesn't mean you should
Re: RAP rowTemplates changing dynamically [message #1211665 is a reply to message #1208998] Tue, 26 November 2013 15:01 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.
Am 25.11.2013 10:31, schrieb John Gymer:
> Currently it appears that once a Table/Tree's rowTemplate is defined it
> cannot be changed without disposing the entire Table/Tree and recreating
> it.

That is correct.

> Is this something that has been considered for future enhancement, or
> have I missed something?

Not very likely. This limitation was initially put into place due to
some restrictions on iOS (Tabris), and much of the implementation for
the WebClient was also done with this in mind. I also think that
changing the template during the widgets lifetime could easily lead to
some bad code and that it should not be necessary. If there is some
effect that can't be achieved without changing the template, then it
would be better for us to improve the template feature so it can be done
without that.

> I can imagine a very common requirement to change the layout dynamically
> based on the Table's width e.g. when device is rotated, or when browser
> is resized - you may wish to attach a column to the right side, or to
> grow the size of a column if the width of the Table increases. Some
> columns may be good to track to left or right edge, and others may work
> better using percentages etc.

You can already layout cells relative to tables the right side, either
setting width and right, or left and right. We also have some ideas (no
definite plans) to make layouting more flexible by attaching cells to
other cells or possibly using percentages. We will also very likely
introduce column templates as an alternative to row templates. Those
would work the same way, but not use the entire width of a row, but only
that of a column (which can be changed in width). Another idea we have
is to allow creating custom cell types. It's already possible to use row
templates together with the markup feature, though you loose some
single-sourcing capability if you do that.

I hope this gives you an idea in what direction we are heading.

Greetings,
Tim

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP rowTemplates changing dynamically [message #1211681 is a reply to message #1211665] Tue, 26 November 2013 15:11 Go to previous message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Thanks Tim.
I'll think over your comments and get back to you if we have specific requirements that this won't meet.


---
Just because you can doesn't mean you should
Previous Topic:About dialog
Next Topic:rowTemplates and horizontal cells
Goto Forum:
  


Current Time: Thu Apr 18 08:56:05 GMT 2024

Powered by FUDForum. Page generated in 0.02052 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top