How to get parameter in the url in the controller class

hi There,

we have a requirement . we have main screen and the controller class.
we want to pass the url http://localhost:8080/app?building_id=1000

I am wondering how we can get the value of the parameter building_id, that is 100 in the controller class.

do we have a way to do that? one way is to use screen link but it has some issue when we screen link to the main window. so we are trying something else.

Can someone give us a hand? we are using CUBA 6.9.5 btw.

@RequestMapping(value = "/getActiveJourneyDetOfReportingStaff/{userId}", method = RequestMethod.GET, produces = JSONConverter.MIME_STR)
public ResponseEntity<Object> getReportingStaffActiveJourneyDet(@PathVariable("userId") String userId){
    final ExtUser userDetails = userDetailsService.loadUserDetailsById(userId);

thank you. but that is not what i am expecting.
that is Spring style.
i am using Vaddin which comes with controller class and XML descroptor.

i want to retrieve the parameter in the controller class


This is possible: Screen Links - CUBA Platform. Developer’s Manual


1 Like
public void init(Map<String, Object> params) {
    try {
        params.forEach((key, value) -> {
                System.out.println(key +" : "+value);