Examples of UserConfiguration


Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @Override
    protected final void search(EntityPanel panel, AddRoleForm form, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO activeUser = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<RoleVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, UsergroupDAO.SORT_NAME);

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramName = form.getName();

        RoleDAO.AdminSelect adminSelect = RoleDAO.AdminSelect.NOT_ADMIN;
        if(activeUser.getProfile().getRole().isAdmin())
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user   = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(JobListDAO.SORT_DUEDATE, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        boolean paramAssignedUser = form.isAssignedUser();
        JobVO.Status[] paramStatus = new JobVO.Status[] {JobVO.Status.IN_PROGRESS, JobVO.Status.PLANNED};
        if(form.getStatus() != null) {
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<UsergroupVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(UsergroupDAO.SORT_NAME, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramName = form.getName();
        UsergroupDAO.AdminSelect paramAdmin = EnumUtility.valueOf(UsergroupDAO.AdminSelect.class, form.getAdmin(), UsergroupDAO.AdminSelect.ALL);
               
        UsergroupDAO dao = new UsergroupDAO();
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<UserVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(UserDAO.SORT_USERNAME, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramUserName = form.getUserName();
        Boolean paramLocked = null;
        if (form.getLocked() != null)
            paramLocked = Boolean.parseBoolean(form.getLocked());
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

    private boolean disabled;
   
    @Override
    public int doStartTag() throws JspException
    {
        UserConfiguration conf = (UserConfiguration)pageContext.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        boolean isDisabled = disabled;
        if(pageContext.getAttribute("i_panel_editable") != null) {
            if(pageContext.getAttribute("i_panel_editable").equals(Boolean.FALSE))
                isDisabled = true;
        }
       
        if(!isDisabled) {
            StringBuilder builder = new StringBuilder();
           
            builder.append("<script type=\"text/javascript\">");
           
            if(pageContext.getAttribute("jsCalendar_isLocaleInitialized") == null) {
                initLocale(builder);
               
                pageContext.setAttribute("jsCalendar_isLocaleInitialized", Boolean.TRUE);
            }
           
            builder.append("Calendar.setup(");
            builder.append("{");
           
            builder.append("inputField : \""+input+"\",");
            builder.append("button : \""+button+"\",");
            if(formatKey != null) {
                String jsFormat = getJsFormat(formatKey);
                builder.append("ifFormat : \""+jsFormat+"\",");
   
                if(jsFormat.contains("%M")
                        ||jsFormat.contains("%H")
                        || jsFormat.contains("%k")
                        || jsFormat.contains("%I")
                        || jsFormat.contains("%l")) {
                    builder.append("showsTime : true,");
                    builder.append("singleClick : false,");
                }
   
                if(jsFormat.contains("%I")
                        || jsFormat.contains("%l")) {
                    builder.append("timeFormat : \"12\",");
                } else {
                    builder.append("timeFormat : \"24\",");
                }
            }
            builder.append("step : 5,");
            builder.append("firstDay : "+getJsFirstDayOfWeek(conf.getIntValue(UserConfiguration.Key.CALENDAR_FIRST_DAY_OF_WEEK)));
            builder.append("}");
            builder.append(");");
            builder.append("</script>");
           
            TagUtils.getInstance().write(pageContext, builder.toString());
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);
       
        List<CalendarListVO> list = null;
        long count = 0;

        Sort sort = null;
        if (form.getSort() == null)
            sort = new Sort(UserDAO.SORT_USERNAME, true);
        else
            sort = Sort.parseParam(form.getSort());

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramUserName = form.getUserName();
        String paramFirstName = form.getFirstName();
        String paramLastName = form.getLastName();
        String paramName = form.getName();
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @Override
    protected void search(EntityPanel panel, ChooseForm form, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        // reload list
        List<CalendarListVO> list = null;
        long count = 0;

        Sort sort = null;
        if (form.getSort() == null)
            sort = new Sort(UserDAO.SORT_USERNAME, true);
        else
            sort = Sort.parseParam(form.getSort());

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramUserName = form.getUserName();
        String paramName = form.getName();

        List<CalendarVO> excludedCalendars = new ArrayList<CalendarVO>();
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

    @Override
    protected void search(PageContactForm form, ActionMessages errors, HttpServletRequest request)
    {
        UserVO user       = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        CompanyVO company = (CompanyVO) getPanel().getEntity();
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;

        Sort sort = null;
        if (form.getSort() == null)
            sort = new Sort(ContactDAO.SORT_CONTACTTIMESTAMP, false);
        else
            sort = Sort.parseParam(form.getSort());

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        String paramBoundType = form.getBoundType();
        String paramContactType = form.getContactType();
        String paramName = form.getName();
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

    @Override
    protected final void search(Panel panel, E form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response) {
        final ListConfigurationVO.Type type = getType();
       
        UserVO user            = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);
       
        ListConfigurationVO choosenList = (ListConfigurationVO)panel.getAttribute("choosenList");
       
        if(panel.getAttribute("listConfigurations") == null) {
            List<ListConfigurationVO> listConfigurations = new ListConfigurationDAO().getByTypeAndUser(type, user);
            if(!listConfigurations.isEmpty()) {
                ListBean bean = new ListBean();
                for(ListConfigurationVO vo : listConfigurations) {
                    List<ListConfigurationVO> group = bean.getGroups().get(vo.getUser() == null);
                    group.add(vo);
                }
               
                if(!listConfigurations.contains(choosenList)) {
                    if(log.isDebugEnabled())
                        log.debug("list is not yet available: "+choosenList);
                    panel.removeAttribute("choosenList");
                }
               
                panel.setAttribute("listConfigurations", bean);
            }
        }
       
        if(form.getDoChooseList() != null) {
            if(log.isDebugEnabled())
                log.debug("load new list configuration: "+form.getListId());
           
            panel.removeAttribute(TABLE_KEY);
           
            choosenList = new ListConfigurationDAO().getById(form.getListId());

            form.setDoChooseList(null);
        } else if(panel.getAttribute(TABLE_KEY) == null) {
            if(log.isDebugEnabled())
                log.debug("load default configuration: ");
           
            if(choosenList == null)
                choosenList = new ListConfigurationDAO().getDefaultListConfiguration(type, user);
            else
                choosenList = new ListConfigurationDAO().getById(choosenList.getId());
           
            if(choosenList != null)
                form.setListId(choosenList.getId());
        }
       
        if(choosenList != null)
            panel.setAttribute("choosenList", choosenList);
       
        // query database
        Table table = (Table)panel.getAttribute(TABLE_KEY);
        if(table == null) {
            Integer[] columns = null;
            if(choosenList != null)
                columns = choosenList.getColumns();
            table = TableFactory.getInstance().createTable(type.getName(), user, columns);
            table.getPage().setStep(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS));
            panel.setAttribute(TABLE_KEY, table);
        }
       
        if(!formCached && !form.getDoResetSearch().isSelected()) {
            table.loadSearch(errors, request);
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

    @Override
    protected void search(PageJobForm form, ActionMessages errors, HttpServletRequest request)
    {
        UserVO user       = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        CompanyVO company = (CompanyVO) getPanel().getEntity();
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;

        Sort sort = ListAction.extractSort(getPanel(), "job_sort", form.getSort(), new Sort(JobListDAO.SORT_DUEDATE, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        JobVO.Status[] paramStatus = null;
        if(form.getStatus() != null)
            paramStatus = new JobVO.Status[]{EnumUtility.valueOf(JobVO.Status.class, form.getStatus())};
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.