This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. Connect to DB. 2. Rightclick some table and choose "View Data...". 3. Disconnect from DB. 4. Press "Truncate Table" button. 5. Press "Cancel" button in appeared dialog and then "OK" button in next dialog. Buttons in data view tab become disabled. 6. Connect to DB. Result: Buttons are still disabled.
Workaround: click "Refresh" button.
I am not sure there is any event that dataview can listen and auto-refresh; either downgrade or close it?
Looks like an architectural limitation. Unless there is a way to notify dataview when user re-connect, it wont be possible to auto refresh.
Why it's not possible to refresh when user tries to connect? Look at step 6. ;)
I am not sure what are you talking about !! Step 6? This is design issue as well, if i have 20 data view open and user disconnect and reconnect you want to refresh all of them automatically. I think the workaround very reasonable.
I agree the workaround is reasonable, press Refresh, so let's keep it a P3 with a target milestone of Future. But I think it's also reasonable to expect buttons to be refreshed when reconnected. It's a helpful thing to do for our users. We are trying to delight our users, so we want to be helpful whenever possible, as long as it doesn't involve incorrect assumptions about what users want. Ahi is right, there is currently no way to be notified that a connection has disconnected. I created issue 149662 as an enhancement request to add this to the API, and have made this issue dependent upon it.
I think when we fail to connect or execute the the query after the Data View is created, we should notify the error and then attempt to the dirty data view.
Needs Verification
The behavior now is different and this issue can't be reproduce anymore. Verified with build 081204.