Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Change default visibility of a column
Change default visibility of a column [message #526271] Fri, 09 April 2010 08:32 Go to next message
Alex Schroeder is currently offline Alex Schroeder
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 08:39 Go to previous messageGo to next message
Stephan Leicht Vogt is currently offline Stephan Leicht Vogt
Messages: 102
Registered: February 2010
Location: Baden Switzerland
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 11:08 Go to previous messageGo to next message
Alex Schroeder is currently offline Alex Schroeder
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 11: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 11:08 Go to previous message
Alex Schroeder is currently offline Alex Schroeder
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: Sat Jul 26 13:17:55 EDT 2014

Powered by FUDForum. Page generated in 0.02260 seconds