IDEMPIERE-782 iDempiere log button on About window not working

This commit is contained in:
Carlos Ruiz 2013-03-20 13:42:31 -05:00
parent d4fe22d6b8
commit 2bc43e3b6d
1 changed files with 18 additions and 12 deletions

View File

@ -35,6 +35,7 @@ import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.FeedbackManager;
import org.compiere.Adempiere;
@ -70,7 +71,7 @@ public class AboutWindow extends Window implements EventListener<Event> {
/**
*
*/
private static final long serialVersionUID = -2600883713422452076L;
private static final long serialVersionUID = 6573804051552633150L;
private Checkbox bErrorsOnly;
private Listbox logTable;
@ -479,7 +480,10 @@ public class AboutWindow extends Window implements EventListener<Event> {
private void downloadAdempiereLogFile() {
String path = Ini.getAdempiereHome() + File.separator + "log";
FolderBrowser fileBrowser = new FolderBrowser(path, false);
final FolderBrowser fileBrowser = new FolderBrowser(path, false);
fileBrowser.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
String selected = fileBrowser.getPath();
if (selected != null && selected.trim().length() > 0) {
File file = new File(selected);
@ -492,6 +496,8 @@ public class AboutWindow extends Window implements EventListener<Event> {
}
}
}
});
}
private void downloadLog() {
String log = CLogErrorBuffer.get(true).getErrorInfo(Env.getCtx(), bErrorsOnly.isChecked());