private String getHtmlForAction(WikiContext context, String action, String title)
        throws ChildContainerException, IOException {

        if (action.equals("view") ||       // editable
            action.equals("viewparent") || // view parent version read only
            action.equals("viewrebase")) { // view rebase version read only
            return handleView(context, title, action);
        } else if (action.equals("edit")) {
            return handleEdit(context, title);
        } else if (action.equals("delete")) {
            return handleDelete(context, title);
        } else if (action.equals("revert")) {
            return handleRevert(context, title);
        } else if (action.equals("rebased")) {
            return handleRebase(context, title);
        } else if (action.equals("save")) {
            // Doesn't return.
            return handleSave(context, context.getQuery());
        } else  {
            context.raiseAccessDenied("Couldn't work out query.");
        }
        return null; // unreachable.
    }