Package org.hoteia.qalingo.core.web.mvc.viewbean

Examples of org.hoteia.qalingo.core.web.mvc.viewbean.TaxViewBean


     * @throws Exception
     *
     */
    @Override
    public TaxViewBean buildViewBeanTax(final RequestData requestData, final Tax tax) throws Exception {
        final TaxViewBean taxViewBean = super.buildViewBeanTax(requestData, tax);

        taxViewBean.setDetailsUrl(backofficeUrlService.generateUrl(BoUrls.TAX_DETAILS, requestData, tax));
        taxViewBean.setEditUrl(backofficeUrlService.generateUrl(BoUrls.TAX_EDIT, requestData, tax));

        return taxViewBean;
    }   
View Full Code Here


    /**
     * @throws Exception
     *
     */
    public TaxViewBean buildViewBeanTax(final RequestData requestData, final Tax tax) throws Exception {
        final TaxViewBean taxViewBean = new TaxViewBean();
        taxViewBean.setId(tax.getId());

        taxViewBean.setVersion(tax.getVersion());
        taxViewBean.setCode(tax.getCode());
        taxViewBean.setName(tax.getName());
        taxViewBean.setDescription(tax.getDescription());
        taxViewBean.setPercent("" + tax.getPercent());
       
        DateFormat dateFormat = requestUtil.getFormatDate(requestData, DateFormat.MEDIUM, DateFormat.MEDIUM);
        if (tax.getDateCreate() != null) {
            taxViewBean.setDateCreate(dateFormat.format(tax.getDateCreate()));
        }
        if (tax.getDateUpdate() != null) {
            taxViewBean.setDateUpdate(dateFormat.format(tax.getDateUpdate()));
        }

        return taxViewBean;
    }
View Full Code Here

        final String taxCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_TAX_CODE);
        if(StringUtils.isNotEmpty(taxCode)){
            // EDIT MODE
            final Tax tax = taxService.getTaxByCode(taxCode);

            TaxViewBean taxViewBean = backofficeViewBeanFactory.buildViewBeanTax(requestData, tax);
            request.setAttribute(ModelConstants.TAX_VIEW_BEAN, taxViewBean);

            Object[] params = {tax.getName() + " (" + tax.getCode() + ")"};
            overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.TAX_EDIT.getKey(), params);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.web.mvc.viewbean.TaxViewBean

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.