Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Change default visibility of a column
Change default visibility of a column [message #526271] Fri, 09 April 2010 12:32 Go to next message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

I have a table page that is shown below a project and on its own. When shown below a project, I want the country column to be invisible:

  @Override
  public void execInitPage() throws ProcessingException {
        getTable().getCountryColumn().setVisible(getProjectNr()==null);
  }


My problem was that hitting the reset menu from the column headers will revert the column to its default configured state (ie. the visible property of the column) ignoring the code in execInitPage.

What is the recommended practice in this situation?

Right now I use the following on the column level in addition to the above:

      @Override
      public boolean getConfiguredVisible() {
        return getProjectNr()==null;
      }


The SDK shows this as "Unaccepted value!" but it works. Smile
Re: Change default visibility of a column [message #526274 is a reply to message #526271] Fri, 09 April 2010 12:39 Go to previous messageGo to next message
Stephan Leicht Vogt is currently offline Stephan Leicht VogtFriend
Messages: 104
Registered: July 2015
Senior Member
Hi Alex

For your problem the recommendet practice would be following:
  @Override
  public void execInitPage() throws ProcessingException {
    getTable().getCountryColumn().setDisplayable(getProjectNr()==null);
  }


Your second code-fragment would be obsolete with the recommended way.

Greetings
Stephan
Re: Change default visibility of a column [message #526304 is a reply to message #526274] Fri, 09 April 2010 15:08 Go to previous messageGo to next message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

Stephan Leicht wrote on Fri, 09 April 2010 14:39
getTable().getCountryColumn().setDisplayable(getProjectNr()= =null);


Hm, I see. If I read the specification correctly, the customer wants the column there, but "invisible by default" under certain conditions. My solution allows the client to make the column visible if so desired. That wouldn't be possible if I used the displayable property, right?

Thanks for the reminder regarding visible vs. displayable, though. Smile

[Updated on: Fri, 09 April 2010 15:08]

Report message to a moderator

Re: Change default visibility of a column [message #580362 is a reply to message #526274] Fri, 09 April 2010 15:08 Go to previous message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

Stephan Leicht wrote on Fri, 09 April 2010 14:39
> getTable().getCountryColumn().setDisplayable(getProjectNr()= =null);
> [/code]


Hm, I see. If I read the specification correctly, the customer wants the column there, but "invisible by default" under certain conditions. My solution allows the client to make the column visible if so desired. That wouldn't be possible if I used the displayable property, right?

Thanks for the reminder regarding visible vs. displayable, though. :)
Previous Topic:Re: Change default visibility of a column
Next Topic:Behaviour of disabled form fields
Goto Forum:
  


Current Time: Fri Apr 26 09:01:29 GMT 2024

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

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

Back to the top