Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
Spring MVC adelante agregando valores de parámetros de solicitud separados por comas cuando tenemos el mismo nombre de parámetro para topRequest y solicitud de reenvío

Spring MVC adelante agregando valores de parámetros de solicitud separados por comas cuando tenemos el mismo nombre de parámetro para topRequest y solicitud de reenvío

 @RequestMapping(path = "/details") public ModelAndView details(@ModelAttribute final DetailsForm detailsForm){ //DetailsForm contain a parameter called destinationId with value 1234 final ModelAndView mav = new ModelAndView(); //Some logic to get targeted destinationId (7890) using destinationId (1234) from detailForm mav.setViewName("forward:/search?destinationId=7890"); return mav; } @RequestMapping(path = "/search") public ModelAndView details(@ModelAttribute final SearchForm searchForm){ //Here I tried to get destinationId from model-attribute searchForm final Integer destinationId = searchForm.getDestinationId(); //Then it returned me 1234,7890 }

¿Alguien puede ayudarme a resolver esto? Quiero obtener solo 7890.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Yo también estoy interesado en la respuesta. También me encontré con este problema, lo pirateé agregando un método:

 private String getLastPartFromFormValue(final String value) { if (value == null) return null; String[] parts = value.split(","); return parts[parts.length -1]; }
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!