package de.abas.examples.inputbox;

import de.abas.erp.api.gui.InputBox;
import de.abas.erp.db.DbContext;
import de.abas.examples.common.AbstractAjoAccess;

public class InputBoxExample extends AbstractAjoAccess {
	
	DbContext ctx;

	@Override
	public int run(String[] args) {
		ctx = getDbContext();
		
		InputBox inputBox = new InputBox(ctx, "Normal Text goes here:");
		String input = inputBox.read();
		ctx.out().println("You entered: " + input);
		
		InputBox viewProtectedInputBox = new InputBox(ctx, "View Protected Text goes here:");
		String viewProtectedInput = viewProtectedInputBox.read(true);
		ctx.out().println("It was view protected, but I can still read it. You entered: " + viewProtectedInput);
		
		return 0;
	}
	
}

@@ -220,25 +220,8 @@
 %0D%0A%09%0D
-%0A%09DbContext ctx;%0D
 %0A%0D%0A%09
@@ -267,16 +267,26 @@
 s) %7B%0D%0A%09%09
+DbContext 
 ctx = ge

Refactor InputBox example: make DbContext local to method