showError = (itemToEdit == null);
if (dso != null && dso.getType() == Constants.ITEM) { itemToEdit = (Item) dso; showError = false; } else { showError = true; }
    protected void doDSGet(Context context,        HttpServletRequest request,        HttpServletResponse response)        throws ServletException, IOException, SQLException, AuthorizeException    {        /*         * GET with no parameters displays "find by handle/id" form         * parameter item_id -> find and edit item with internal ID item_id         * parameter handle -> find and edit corresponding item         * if internal ID or Handle are invalid, "find by handle/id" form         * is displayed again with error message         */        int internalID = UIUtil.getIntParameter(request, "item_id");        String handle = request.getParameter("handle");        boolean showError = false;        // See if an item ID or Handle was passed in        Item itemToEdit = null;        if (internalID > 0)        {            itemToEdit = Item.find(context, internalID);            showError = (itemToEdit == null);        }        else if (handle != null && !handle.equals(""))        {            // FIXME: Handles might resolve to other things            itemToEdit = (Item) HandleManager.resolveToObject(context, handle);            showError = (itemToEdit == null);        }        // Show edit form if appropriate        if (itemToEdit != null)        {            showEditForm(context, request, response, itemToEdit);        }        else        {            if (showError)            {                request.setAttribute("invalid.id", new Boolean(true));            }            JSPManager.showJSP(request, response, "/admin/get-item-id.jsp");        }    }