Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [NOOB QUESTION] Change Page Title at Runtime
[NOOB QUESTION] Change Page Title at Runtime [message #1713308] Tue, 03 November 2015 09:43 Go to next message
Jannik Malken is currently offline Jannik MalkenFriend
Messages: 44
Registered: October 2015
Member
Hi,

I'm again hoping for an easy answer and that I have overseen something like so many times before Very Happy
Is it possible to change the page title of an already existing page at runtime? My only workaround so far was to remove the page and add a new one with the updated settings. I find that a bit too complicated for such an easy task...

Best regards,
Jannik
Re: [NOOB QUESTION] Change Page Title at Runtime [message #1713328 is a reply to message #1713308] Tue, 03 November 2015 11:31 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Ok the API is bad in this area... There is no setTitle(String) method. On the page you should call: getCellForUpdate().setText(String)

For example if you need to display the number of rows in the table page when the table content is loaded:
  @Override
  protected void execLoadData(SearchFilter filter) throws ProcessingException {

    SomeTablePageData tablePageData;
    //fetch or compute the tablePageData somewhere
    importPageData(tablePageData);
    getCellForUpdate().setText(TEXTS.get("Messages") + " (" + getTable().getRowCount() + ")");
  }


Here is how I did to check it:
I have looked where "getConfiguredTitle()" is used.
This is in the initPage() of the AbstractPage class.
The value is set to the cell text.
Re: [NOOB QUESTION] Change Page Title at Runtime [message #1713332 is a reply to message #1713328] Tue, 03 November 2015 12:40 Go to previous message
Jannik Malken is currently offline Jannik MalkenFriend
Messages: 44
Registered: October 2015
Member
Thank you so much. It's a real shame that I've been playing around with Scout for more than two months now and still miss such easy things. I'm really glad you spend so much time in this forum Smile
Previous Topic:Is it possible to directly edit a cell in a table Page?
Next Topic:Replacing getConfiguredValidateOnAnyKey() in Mars
Goto Forum:
  


Current Time: Fri Apr 26 03:40:51 GMT 2024

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

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

Back to the top