Package org.opencustomer.framework.webapp.panel

Examples of org.opencustomer.framework.webapp.panel.Panel


    }
   
    @Override
    public void createEntity(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        UserVO activeUser = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);
        Panel lastPanel = null;
        if(!Panel.getPanelStack(request).isEmpty())
            lastPanel = Panel.getPanelStack(request).peek();
       
        PersonVO person = new PersonVO();
       
View Full Code Here


        try {
            new ListConfigurationDAO().delete(listConfiguration);
           
            PanelStack stack = Panel.getPanelStack(request);
            if(stack.getSize() > 2) {
                Panel lastPanel = stack.peek(3);
                lastPanel.removeAttribute("listConfigurations");
                lastPanel.removeAttribute("choosenList");
                lastPanel.removeAttribute(ListAction.TABLE_KEY);
            }
           
        } catch (HibernateException e) {
            log.error("could not save list configuration", e);
           
View Full Code Here

           
            HibernateContext.commitTransaction();
           
            PanelStack stack = Panel.getPanelStack(request);
            if(stack.getSize() > 1) {
                Panel lastPanel = stack.peek(2);
                lastPanel.removeAttribute("listConfigurations");
                lastPanel.removeAttribute(ListAction.TABLE_KEY);
            }
        } catch (HibernateException e) {
            log.error("problems saving list configuration", e);
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("default.error.rollback"));
           
View Full Code Here

public final class ListAction extends DynamicListAction<DynamicListForm> {
    private static Logger log = Logger.getLogger(ListAction.class);

    @Override
    protected final Panel createPanel(DynamicListForm form, HttpServletRequest request, HttpServletResponse response) {
        Panel panel = new Panel(Panel.Type.LIST);
        panel.setTitle(MessageUtil.message(request, "module.crm.person.showPersons.headLine"));
        panel.setPath("/crm/person");
       
        return panel;
    }
View Full Code Here

   
    @Override
    public void preOperation(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        PanelStack stack = Panel.getPanelStack(request);
        if(!stack.isEmpty()) {
            Panel lastPanel = Panel.getPanelStack(request).peek();
            if(lastPanel.getAttribute(ListAction.TABLE_KEY) != null) {
                Table table = (Table)lastPanel.getAttribute(ListAction.TABLE_KEY);
                ListConfigurationVO.Type type = null;
                for(ListConfigurationVO.Type existingType : ListConfigurationVO.Type.values()) {
                    if(existingType.getName().equals(table.getName())) {
                        type = existingType;
                        break;
View Full Code Here

    public ActionForward execute(ActionMapping mapping, E form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        if (log.isDebugEnabled())
            log.debug("list action");

        ActionMessages errors = new ActionMessages();
        Panel panel           = Panel.getPanelStack(request).peek();
        boolean formCached    = false;
       
        if(panel == null || !getPanelName().equals(panel.getName())) {
            panel = createPanel(form, request, response);
            panel.setName(getPanelName());
           
            Panel.getPanelStack(request).push(panel);
        }

        if(!form.getDoSearch().isSelected()
                && !form.getDoResetSearch().isSelected()
                && !isAdditionalButtonUsed(form)
                && form.getSort() == null
                && form.getOrder() == null
                && form.getPage() == 0
                && panel.getAttribute(FORM_KEY) != null) {
            if(log.isDebugEnabled())
                log.debug("load form from panel");
           
            form       = (E)panel.getAttribute(FORM_KEY);
            formCached = true;
           
            request.setAttribute(mapping.getAttribute(), form);
        } else if (panel.getAttribute(FORM_KEY) != null) {
            if(log.isDebugEnabled())
                log.debug("merge form with cached form");
           
            E cacheForm = (E)panel.getAttribute(FORM_KEY);
           
            if(form.getSort() == null)
                form.setSort(cacheForm.getSort());

            if(form.getPage() == 0)
                form.setPage(cacheForm.getPage());
        }

        search(panel, form, formCached, errors, request, response);
       
        form.setDoSearch(new ImageButtonBean());
        form.setDoResetSearch(new ImageButtonBean());
        panel.setAttribute(FORM_KEY, form);
       
        if(!errors.isEmpty())
            this.saveErrors(request, errors);
       
        return findForward(mapping, form, request, response);
View Full Code Here

    private static Logger log = Logger.getLogger(ListAction.class);

    @Override
    protected Panel createPanel(ListForm form, HttpServletRequest request, HttpServletResponse response)
    {
        Panel panel = new Panel(Panel.Type.LIST);
        panel.setTitle(MessageUtil.message(request, "module.system.role.showRoles.headLine"));
        panel.setPath("/system/management/role");
       
        return panel;
    }
View Full Code Here

    public ActionForward execute(ActionMapping mapping, E form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        if (log.isDebugEnabled())
            log.debug("common action");

        ActionMessages errors = new ActionMessages();
        Panel panel = Panel.getPanelStack(request).peek();
       
        if(panel == null || !getPanelName().equals(panel.getName())) {
            panel = createPanel(form, request, response);
            panel.setName(getPanelName());
           
            Panel.getPanelStack(request).push(panel);
        }
       
        execute(panel, form, mapping, request, response);
View Full Code Here

    private static Logger log = Logger.getLogger(ListAction.class);

    @Override
    protected Panel createPanel(ListForm form, HttpServletRequest request, HttpServletResponse response)
    {
        Panel panel = new Panel(Panel.Type.LIST);
        panel.setTitle(MessageUtil.message(request, "module.home.job.list.title"));
        panel.setPath("/home/jobs");
       
        return panel;
    }
View Full Code Here

    private static Logger log = Logger.getLogger(ListAction.class);

    @Override
    protected Panel createPanel(ListForm form, HttpServletRequest request, HttpServletResponse response)
    {
        Panel panel = new Panel(Panel.Type.LIST);
        panel.setTitle(MessageUtil.message(request, "module.system.usergroup.showUsergroups.headLine"));
        panel.setPath("/system/management/usergroup");
       
        return panel;
    }
View Full Code Here

TOP

Related Classes of org.opencustomer.framework.webapp.panel.Panel

Copyright © 2018 www.massapicom. 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.