Change default visibility of a column [message #526271] |
Fri, 09 April 2010 12:32 |
|
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.
|
|
|
|
Re: Change default visibility of a column [message #526304 is a reply to message #526274] |
Fri, 09 April 2010 15:08 |
|
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.
[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 |
|
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. :)
|
|
|
Powered by
FUDForum. Page generated in 0.03435 seconds