|
Re: IllegalStateException recovery [message #127289 is a reply to message #127275] |
Fri, 30 June 2006 20:09 |
Eclipse User |
|
|
|
Originally posted by: jefmyers.us.ibm.com
Ernest,
If you're using a model that requires real work to be done, like
establishing a jdbc connection, the best practice is to detect the
difference between design time and run time behavior and provide mock
data in design time. VE supports doing this by adding the following
check to your code:
if (java.beans.Beans.isDesignTime()) {
// provide mock data
} else {
// provide real data
}
Hope this helps,
- Jeff
|
|
|
Re: IllegalStateException recovery [message #127584 is a reply to message #127289] |
Wed, 05 July 2006 12:11 |
Ernest Pasour Messages: 65 Registered: July 2009 |
Member |
|
|
Jeff,
Yes, using the design-time flag seemed to be working for me, so I'm glad
to get your confirmation that this is the supported way of doing things.
However, my concern about badly-behaved models still stands.
Thanks,
Ernest
Jeff Myers wrote:
> Ernest,
>
> If you're using a model that requires real work to be done, like
> establishing a jdbc connection, the best practice is to detect the
> difference between design time and run time behavior and provide mock
> data in design time. VE supports doing this by adding the following
> check to your code:
>
> if (java.beans.Beans.isDesignTime()) {
> // provide mock data
> } else {
> // provide real data
> }
>
> Hope this helps,
> - Jeff
|
|
|
|
Re: IllegalStateException recovery [message #613449 is a reply to message #127289] |
Wed, 05 July 2006 12:11 |
Ernest Pasour Messages: 65 Registered: July 2009 |
Member |
|
|
Jeff,
Yes, using the design-time flag seemed to be working for me, so I'm glad
to get your confirmation that this is the supported way of doing things.
However, my concern about badly-behaved models still stands.
Thanks,
Ernest
Jeff Myers wrote:
> Ernest,
>
> If you're using a model that requires real work to be done, like
> establishing a jdbc connection, the best practice is to detect the
> difference between design time and run time behavior and provide mock
> data in design time. VE supports doing this by adding the following
> check to your code:
>
> if (java.beans.Beans.isDesignTime()) {
> // provide mock data
> } else {
> // provide real data
> }
>
> Hope this helps,
> - Jeff
|
|
|
Powered by
FUDForum. Page generated in 0.02897 seconds