Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9034647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:32:28+00:00 2026-06-16T08:32:28+00:00

I need to navigate from one controller to another, so I’ve made one render

  • 0

I need to navigate from one controller to another, so I’ve made one render method:

private static final String ACTION_SHOW_JUSTIFICANTE = "action=" + ServletContextKeys.SC_SHOW_JUSTIFICANTE;
@Autowired
private MyOtherController myOtherController;

@RequestMapping(params = ACTION_SHOW_JUSTIFICANTE)
 public final String doRenderShow(ModelMap model, RenderRequest renderrequest, PortletSession portletSession) {
    MyBean myBean = service.getBean();
    model.addAttribute(ServletContextKeys.SC_BEAN, myBean);
    return myOtherController.doRender(model, renderrequest);
}

The render method of the other controller:

@RequestMapping(params = ACTION_MY_OTHER_CONTROLLER)
public final String doRender(ModelMap model, RenderRequest renderrequest) {
if (!model.containsAttribute(ServletContextKeys.SC_BEAN)) {
        model.addAttribute(ServletContextKeys.SC_BEAN, new MyBean());
    }
//Do some stuff..

return ServletContextKeys.SC_VIEW_PAGE;
}

And it works fine, but the problem is about Date binding when I trying to display the bean values in the JSP:

<form:input id="registerDate" size="10" styleClass="input" path="registerDate" readonly="${imputado}"/>      

The register date is shown whith this format: ‘Mon Oct 08 22:00:00 GMT 2012’ instead the needeed one: ‘dd/MM/yyyy’

I already have defined a initBinder method:

@InitBinder
public final void initBinder(WebDataBinder binder) { 
        //Date
        SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
        dateFormat.setLenient(false);
        binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}

But, probably in this case, I’m not calling it (It actually works ok, in other normal cases)

Any ideas how to format this date and fix this issue..? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T08:32:30+00:00Added an answer on June 16, 2026 at 8:32 am

    It was my fault! Sorry, but the code is Ok. the problem was that the initBinder was defined just in one of the controllers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my app for WP7(mango) I need to navigate the user from one point
While making AutoHotkey-script I encountered the following problem. I need navigate listbox (one position
I am solving how to pass values from one page to another without making
I can't navigate the XML doc programmatically and I need an one-line XPath solution
Could any one help me on how to navigate from one jquery ui tab
I need to let user navigate back and forward through different images (from 10
I have one ViewModel and two Views. How can I navigate to View2 from
So, I need use this event so I can navigate trought blog posts. I
I am pushing and popping from one view to the other within my App.
In jQuery Mobile I have several chained dialog boxes sliding in/out one after another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.