Date Formatting, JSTL tags and the Spring framework

Hi all, i have a small problem and i am hoping maybe someone here knows the solution. I am using a date field in a search page, binding it using a customDateEditor, and using a validator for correct formatting. The problem i have is this: i am using the <spring:bind> tag so that the page will return with the value that caused a validation fault. But even if the page succeeds it is submitted back onto itself, this time carrying the search results. But this time the date field will return in a completly different format. I cannot use the <fmt:formatDate> tag because of <spring:bind>. How can i register a "reverse" bind editor if you will, something that will print my data according to a specific format depending on the class?
Code snippet follows :
<spring:bind path="filesRequest.fileEndDateSearch">
<input type="text" id="fileEndDateSearch" name="fileEndDateSearch" class="txtBox" value="<fmt:formatDate value="${status.value}" type="date" pattern="yyyy-MM-dd" />"/>
</spring:bind>
Using <fmt:formatDate> for the ${status.value} will cause an exception in case the validator fails, as the format date tag will try to parse the erroneous input.
Just in case i was not that clear in the first paragraphs, here's exactly what i'm trying to achieve: using the Spring framework i want to design a search page that submits back onto itself(with or without some search results) that takes advantage of the validator, the <spring:bind> tag (that is to say, if the user submits some erroneous data it is returned to him in the corresponding field so he can correct it) and somehow should format the data it receives from the form according to a specific format.

If you don't want the default localized version, I think you might have to do your own logic for how to display the dates.
<fmt:formatDate value="${now}" dateStyle="SHORT"/> might be close... but
with the following you can set the patterns to what you want. No automagic though :(
<fmt:formatDate value="${now}" pattern="MM-dd-yyyy"/>

Similar Messages

  • Different Date Formats on CRM and BI Client

    Hi,
    When trying to run the CRM Interactive Report "Accounts with Open Activities", I receive the following error:
    Different date formats on CRM and BI client 01/13/2009 13.01.2009 SC5CLNT200
    Does anybody know how to resolve this error?
    Thanks

    Hi Peter,
    As far as i remember, I had the same issue.
    Once I matched the date format in reporting client using SU01 on default tab with CRM date format, I did't see the error again.
    Did you try restarting the Browser & also relogin GUI.
    Else lets see what else can be done.
    Best Regards
    Shiven

  • Date format in forms and reports in windows 7

    i have problem with date format in developer 10g and developer 6i
    it show date in this format 2011/25/1
    it sould be like this 25/1/2011
    how i can reslove this
    in xp it work fine

    Are you generating Forms and Reports from Oracle Designer, or using Oracle Developer tools directly?
    If this is a Forms question, try the Forms forum - Forms
    If this is a Reports question, try the Reports forum - Reports
    Either way, or with Designer, the problem is probably that you are allowing the date format to default instead of explicitly specifying a date format. Always specify the date format - you want "DD/MM/YYYY".

  • Problem in Date Format when user chages the date format in preferences

    I want to generalize my code so that user can change what ever Date format he wants, I will get the date from the page in the format yyyy-mm-dd, and if the Date Format is
    set to MM/dd/yyyy in prefernces i need to use MM/dd/yyyy and if the Date Format is set to dd-Mon-yyyy in prefernces i need to use dd-MMM-yy, so my question is how to know what Date format is set in the preference so that i can have all the possible date format for inserting the date
    Thanks
    Babu

    Babu,
    The date format in OAF Pages is controlled by profile ICX: Date format mask.This profile can be set at site as well as user level for the individual users to set the Date format.
    But I would advice not to go for setting different profile values at user level, because i remember some old threads, where seeded Oracle pages fail, as code their is not generalised to handle date formats.
    If your are planning to have this in ur custom page, go ahead, but do check the entire flow is working fine for different values of this profile at user level.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Changing date format for some of the date columns in a subject area

    Hi,
    I have a requirement to change the date format for some of the date columns to dd-mon-yyy for only a particular subject area. Is there a feature available in the RPD which can help me do this?
    In Answers - Column Properties for a Particular column of a report, we can save the style and formatting as system wide default for the particular column or the data type, but that applies across subject areas.
    I tried with the config files too , but that too applies to all suject areas.
    Thanks in Advance,
    Gaurav

    Why don't you create 2 logical column derived from same date physical col and then change the format for one logical column and use it in Subject Area ?

  • How to develop and deploy Spring framework app in Sun One App Server 8.1

    Hi,
    Can anyone give sample on how to develop and depoly spring framework application in J2EE 1.4 Server or Sun One App Server 8.1 .
    Its very urgently needed for my project to learn and implement spring framework i would very thankful if any one can help.
    Thanking You
    Naveen

    Pretty standard for AS8 to deploy Spring. The only thing to watch for is the security manager, which you'll probably want to turn off.

  • How to remove the date format validation done by the UI

    Hi All,
    I am having a date field which is an input field for Dateof Birth. User can either select from the calendar or enter his own date. If the user enters invalid date format'(032342525') something like this, when we move to the next tab the column turns to Red and it displays a message saying that date is not a valid date. I wanted to validate that on Save instead of tab click.
    Can anyone of you tell me how can we remove this date format validation in Java Webdynpro.
    Thankyou for your time and consideration!
    Madhavi

    Thankyou for your reply. I cannot the change the date type to string bcas the users need date picker to select the date. The problem I am having is once the format is wrong and the UI validates, though the other fields are entered by the user the application returns error saying that the required field are not entered.
    And also I am having multiple containers in my view set and for all other error messages I am using a popup to display the messages and this only error is shown at the bottom of the page which the users does'nt like.
    Is there any way I can identify that format error occured before it throws on the UI screen??
    Regards,
    Madhavi

  • Using Adobe Photoshop CS2 version 9 and have updated it, but when stacking photos, it comes up with PSD, whereas I want Jpeg, and I change the format to Jpeg and the box then comes up with cannot save as there is a program error. Be very grateful for help

    Using Adobe Photoshop CS2 version 9 and have updated it, but when stacking photos, it comes up with PSD, whereas I want Jpeg, and I change the format to Jpeg and the box then comes up with cannot save as there is a program error. Be very grateful for help with this, please.

    jpg does not support Layers.
    Just to make sure, what exactly do you mean by "stacking photos" and what do you want to achieve thereby?

  • IPhone number formatting for Ireland and the UK now supported!

    I was pretty impressed to discover that the iPhone 2.2 update now supports telephone number formatting in Ireland and the UK.
    So, for example an Irish mobile number will be displayed as (086) XXX XXXX instead of just 086XXXXXXX. Seems to work flawlessly for any number I've tried, including special rate like freephone 1 800 etc.
    The same is now also true for the UK, it displays the numbers correctly formatted now too!
    It certainly makes things easier to read!

    vice versa in us

  • I formated my macpro and the re-instalation of lion os x give a message contact Mas care

    i formated my macpro and the re-instalation of lion os x give a message contact Mas care

    I've fount a similar problem post here in the forum: https://discussions.apple.com/thread/3193464?start=0&tstart=0
    I've tried some of the stuff there and I'll update here as soon as I have any news.

  • How can I change the date format in Reminders and in Notes?

    How can I change the date format in both Notes and Reminders? Preference on Imac and Settings in IOS do not allow me to change the format in those 2 apps.
    I Like to see 10oct rather than 10/10, as an example.

    pierre
    I do not have Mavericks or iOS - but the first thing I would do is reset the defaults - I'll use Mavericks as an example
    From If the wrong date or time is displayed in some apps on your Mac - Apple Support
    OS X Yosemite and Mavericks
        Open System Preferences.
        From the View menu, choose Language & Region.
        Click the Advanced button.
        Click the Dates tab.
        Click the Restore Defaults button.
        Click the Times tab.
        Click the Restore Defaults button.
        Click OK.
        Quit the app where you were seeing incorrect dates or times displayed.
        Open the app again, and verify that the dates and times are now displayed correctly.
    Then customize to taste - OS X Mavericks: Customize formats to display dates, times, and more
    OS X Mavericks: Customize formats to display dates, times, and more
    Change the language and formats used to display dates, times, numbers, and currencies in Finder windows, Mail, and other apps. For example, if the region for your Mac is set to United States, but the format language is set to French, then dates in Finder windows and email messages appear in French.
        Choose Apple menu > System Preferences, then click Language & Region.
        Choose a geographic region from the Region pop-up menu, to use the region’s date, time, number, and currency formats.
        To customize the formats or change the language used to display them, click Advanced, then set options.
        In the General pane, you can choose the language to use for showing dates, times, and numbers, and set formats for numbers, currency, and measurements.
        In the Dates and Times panes, you can type in the Short, Medium, Long, and Full fields, and rearrange or delete elements. You can also drag new elements, such as Quarter or Milliseconds, into the fields.
        When you’re done customizing formats, click OK.
        The region name in Language & Region preferences now includes “Custom” to indicate you customized formats.
    To undo all of your changes for a region, choose the region again from the Region pop-up menu. To undo your changes only to advanced options, click Advanced, click the pane where you want to undo your changes, then click Restore Defaults.
    To change how time is shown in the menu bar, select the “Time format” checkbox in Language & Region preferences, or select the option in Date & Time preferences.
    Here's the result AppleScript i use to grab the " 'Short Date' ' + ' 'Short Time' "  to paste into download filenames - works good until I try to post it here - the colon " : " is a no-no but is fine in the Finder
    Looks like iOS Settings are a bit less robust
    - Date/Time formats are displayed according to 'tradition' of your region > http://help.apple.com/ipad/8/#/iPad245ed123
    buenos tardes
    ÇÇÇ

  • 9iLite and the compact framework for PPC

    Does oracle plan to support development for Pocket PC under the compact framework ie. using MS Visual Studio.net. If so, how soon can we except an oracle data adapter for the pocket pc.

    If your application is complex you'll undoubtedly have
    to extend whichever framework you choose. Struts is
    very flexible and allows you to incorporate custom
    functionality easily. As it was pointed out, Struts works only with the web tier. If you're writing complex apps, you'll need a more 'complete' framework to manage your middle-tier as well.
    If you're not using EJB, lightweight containers like Spring or Pico can help.
    BTW, you can use Spring with Struts if you wish. Personally, I'm less than impressed by Struts, but that's just my opinion.

  • Date format in mail - "yesterday, the day before,..."

    Hello.
    When using mail in the new version, the left gutter gathering all the inboxes, each message summary displays the essentials infos.
    In many cases the date display is set to show the reception hour on the same day (fine), the previous day is shown as "yesterday" and the day before yesterday as "the day-before-yesterday", and finally "two days ago".
    My system is in french thus it's not written" two days ago" but (I translate) "before-before-yesterday".... This doesn't help me anymore.
    Here is my question: is there a way to set the date format in the message short in order to have the full numerical date as soon as "yesterday", actually to always have a numerical date display ... no more "avant-avant-hier".
    Thanks

    Thanks but...
    I just sort of just figured out the obvious and noticed, that I'd even have a big problem if that regex of mine worked.... unluckily, there actually seem to be days with a number smaller than 3, but no negative days in the human calendar... so I'm going to rest first and think it over after that. Most likely I'm going to end up subtracting a day in unix-time and converting back, better ideas are not necessary but welcome .
    (edit: oh, and thanks again - that might come handy when I ended up with the same $(\[chaos\]) trying the unix time version later)
    Last edited by whoops (2009-08-25 18:29:30)

  • Non US date format within Workspace and Guides

    Is is possible to change the date format displayed within the workspace and Guides to a non US date format?
    This really is a show stopper for us as our standard date format is DD/MM/YYYY and the forms won't be usable for our staff if they are not in this format.

    For Workspace, the date format strings are provided in the localized resource swfs so if you need to change them, can either update the resource swf in question, or possibly provide a new one for the locale you really want to service.  The shipping english swf is named workspace_rb_en_US.swf so maybe you want to provide another one with a different en_XX suffix.  The Workspace source is shipped with the product and I think the Customizing Workspace doc explains how to do this.  The ES2 version of the doc may not be ready yet, but the ES version should explain the concepts.  You may need a hotfix to get the proper ant scripts to build it, but you would have to check with support on this.

  • Where does one manage date formats for display and input

    the user specification is that dates be displayed as YYYY-MON-DD. Is there a config or properties file which contains the date format for display? Is there a calendar drop-down that can be positioned next to a date input field for a question on a screen?
    Thanks,
    Allan

    Hi Allan,
    Curious why the rule project wasn't created with "English (Canada)" initially? If your project is English (UK) with the default configurations for that locale, then I assume your currency values are appearing in OWD with the GBP symbol (£) instead of a dollar sign ($)?
    As for the impact of switching… I highly recommend getting confirmation from the OPA Dev team before doing it, but in the meantime, if you wanted to experiment on your own with a separate test rulebase (as opposed to whatever formal rulebase you're working on), here are my observations from an initial look… (FYI, I'm an experienced OPA rulie, but I'm non-technical and not in the Dev team, so best to check with them!)
    I poked around the language parser files and saw that English (UK) has an English (UK) verb list, whereas English (Canada) uses the English (US) verb list. The vast majority of verbs are identical in all the variations of English, however, there are a couple which differ. So if you've used any verbs which have a different spelling between the 2 lists, there may be some attribute text to tweak, e.g.
    - English (UK): the person travelled to Australia
    - English (US): the person traveled to Australia
    - English (UK): the person cancelled the reservation
    - English (US): the person canceled the reservation
    I saw some other different files between English (Canada) vs English (UK), but didn't notice anything in them which I'd expect to impact the rulebase.
    As for how it might impact other components:
    * screens file and the properties file – May be some tweaking depending on how you addressed the verb spelling issue above.
    * regression test files – May be some tweaking depending on how you addressed the verb spelling issue above.
    * messages.(locale).properties – The default messages.(locale).properties file appears to be based on the Language setting of the Project. I just tested this and OWD used a different messages.(locale).properties file when I changed the Project Language (OPM | File menu | Project Properties | Common Properties | General | Language).
    * Siebel Connector – don't know what the impact would be.
    OPA Dev team – Can you review what I've said here? And add any relevant further detail?
    Cheers,
    Jasmine

Maybe you are looking for

  • MB5B vs Book Inventory

    Does anybody know what causes this? On MB5B(for a particular date in the past) stock quantity shows 10 and the same date there was a physical inventory document created, counted but not posted-The book inventory  is 15 and the stock type is the .i.e

  • To Generate file with whitespaces for the last fields -Receiver file FCC

    Hi Experts, We need to create a file at receiver side having last field of 50 length.If value of last field is less than 50 length than we need to keep whitespaces on the right side.When we create file the whitespaces get trimmed and files are create

  • Running query report times out

    All, At my customer we have a BW3.1 system. When running a query using ta rsrt it times out after 1 hour. The query/report should be done in 5 minutes but somehow it gets stuck. With an SQL trace we see no queries and in the Dialog work process we do

  • What happened to my graphics?

    Some of the graphics used in Java Studio Web Reports have disappeared from my laptop. I was using Java Studio to reverse-engineer projects and create UML diagrams. For a month, everything worked fine. Now when I create a Web Report, the Sun logo is m

  • Error -54 Importing to network Home folder

    I posted this yesterday but I seem to have posted in iTunes for Windows by mistake, so here goes again: Since upgrading to 10.4/iTunes 7 (I did both at the same time, now on 10.4.8/7.0.1) I'm having trouble importing to iTunes from anywhere- from fil