|
|
Re: Show/hide view declararively [message #333150 is a reply to message #333129] |
Wed, 26 November 2008 22:31 |
Kai Schlamp Messages: 344 Registered: July 2009 |
Senior Member |
|
|
Hello Daniel.
Thanks for the help.
I think I will go with your first alternative, even if it is not so nice
as there are minimum three views per perspective, and every view will
then have an error-case composite.
I also thought about implementing your second alternative with views.
Like a "view visible when" extension point. But this is also a bit
cumbersome.
I really hope there will be one day something like a glasspane for SWT.
Greetings from Mainz to Bremen :-)
Kai
Daniel Krügler wrote:
> Kai Schlamp wrote:
>> Is there a way to declare the visibility of a view declaratively?
>> Background: My RCP app uses a database for storing the whole data. If
>> the app is not connected to the database, then instead of the normal
>> views a hint should be presented to the user, that he should connect
>> to the database first.
>> As there is no glasspane in SWT (which would be the best option for
>> this task), I added another view with a "Please connect to database"
>> message on it and shift between this view and the normal views
>> dependent on the database connection. (Any better ideas for such a case?)
>
> What about the *same* view, but with different top composite, depending
> on the situation? The "error-case" composite could have a totally
> different look-and-feel (including a message or some such).
>
> Alternatively, you could do the same thing via your own extension point.
> This extension point could also reuse the core-expression's (There
> exists a programmer API for that), so you could define (run-time)
> conditions under which the corresponding composite is instantiated.
>
> HTH & Greetings from Bremen,
>
> Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.03599 seconds