Elements with Date and Time Data Type

0

I would like to take a doubt, we should treat fields differently which have data type as time and date I say in relation to the view, why I have a problem I need to plot some date and time in a table in my view but the fields that are not date and time appear in a good already the fields that have as type time and date appear as Object

public static List<FolhaBean> bindingProperties(List<Folha> folhas) {

        List<FolhaBean> folhasBean = new ArrayList<>();

        folhas.forEach(folha -> {

            FolhaBean folhaBean = new FolhaBean(folha.getIdFolha(), folha.getData(), folha.getEntrada(), 
                    folha.getSaidaAlmoco(), folha.getVoltaAlmoco(),folha.getSaida(), folha.getBancoHoraNegativo()
                    , folha.getBancoHoraPositivo(), folha.getVersion(), folha.getNomeUsuario());

            folhasBean.add(folhaBean);
        });

        return folhasBean;
    }

this is the bean I'm using to bring the information

@RequestMapping(value = REDIRECT_PAGE_CARREGAR, method = RequestMethod.GET)
   public ModelAndView showCarregar(Model model, HttpServletRequest request){

        usuarioBean= folhaService.findFetchAll();


        model.addAttribute("usuarioBean", usuarioBean);


        return new ModelAndView(REQUEST_MAPPING_PAGE_CARREGAR);
    }

    @RequestMapping(value = "/carregarDados", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<List<FolhaBean>> carregar() {

        List<Folha> folhas = folhaService.findFetchAll();

        List<FolhaBean> folhasBean = FolhaBean.bindingProperties(folhas);
        return new ResponseEntity<List<FolhaBean>>(folhasBean, HttpStatus.OK);
    }

and this is the controller.

Thecodethatgeneratesthetableisthis

Data-locale="en-data-url=" $ {loadFollow} "data-locale = data-show-columns="2" date-show-toggle="true" data-show-columns="true" data-show-item-name="data-show-refresh=" true "date-toolbar=" # toolbar "date-query-params = true "date-pagination-pre-text=" Previous "data-response-handler=" responseHandler "& gt ; id Date Entry Departure Lunch Return Lunch Departure Bank Positive Bank Negative User License

    
asked by anonymous 11.04.2017 / 15:20

1 answer

0

The problem has already been solved in the way I was accessing the object.

I was accessing the object directly, but after I took a look at json I saw that I needed to access the object and then the attributes of that object, ex user.name.

    
10.11.2017 / 21:09