changePersonalInfoForm.set("availableWebSite", infoPerson.getAvailableWebSite().toString()); changePersonalInfoForm.set("availablePhoto", infoPerson.getAvailablePhoto().toString());
if (infoPerson.getAvailableWebSite() != null) { changePersonalInfoForm.set("availableWebSite", infoPerson.getAvailableWebSite().toString()); } if (infoPerson.getAvailablePhoto() != null) { changePersonalInfoForm.set("availablePhoto", infoPerson.getAvailablePhoto().toString()); }
    public ActionForward prepare(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws Exception {        HttpSession session = request.getSession(false);        DynaActionForm changePersonalInfoForm = (DynaActionForm) form;        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Object changeArgs[] = { userView.getUtilizador() };        Object result = null;        try {            result = ServiceManagerServiceFactory.executeService(userView, "ReadPersonByUsername",                    changeArgs);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        InfoPerson infoPerson = (InfoPerson) result;        changePersonalInfoForm.set("mobilePhone", infoPerson.getTelemovel());        changePersonalInfoForm.set("workPhone", infoPerson.getWorkPhone());        changePersonalInfoForm.set("email", infoPerson.getEmail());        changePersonalInfoForm.set("availableEmail", infoPerson.getAvailableEmail().toString());        changePersonalInfoForm.set("webSite", infoPerson.getEnderecoWeb());        changePersonalInfoForm.set("availableWebSite", infoPerson.getAvailableWebSite().toString());        changePersonalInfoForm.set("availablePhoto", infoPerson.getAvailablePhoto().toString());        session.setAttribute(SessionConstants.PERSONAL_INFO_KEY, infoPerson);        return mapping.findForward("prepareReady");    }