Search Results

Search found 2 results on 1 pages for 'swiety'.

Page 1/1 | 1 

  • JSF how to temporary disable validators to save draft

    - by Swiety
    I have a pretty complex form with lots of inputs and validators. For the user it takes pretty long time (even over an hour) to complete that, so they would like to be able to save the draft data, even if it violates rules like mandatory fields being not typed in. I believe this problem is common to many web applications, but can't find any well recognised pattern how this should be implemented. Can you please advise how to achieve that? For now I can see the following options: use of immediate=true on "Save draft" button doesn't work, as the UI data would not be stored on the bean, so I wouldn't be able to access it. Technically I could find the data in UI component tree, but traversing that doesn't seem to be a good idea. remove all the fields validation from the page and validate the data programmaticaly in the action listener defined for the form. Again, not a good idea, form is really complex, there are plenty of fields so validation implemented this way would be very messy. implement my own validators, that would be controlled by some request attribute, which would be set for standard form submission (with full validation expected) and would be unset for "save as draft" submission (when validation should be skipped). Again, not a good solution, I would need to provide my own wrappers for all validators I am using. But as you see no one is really reasonable. Is there really no simple solution to the problem?

    Read the article

  • How to distinguish date at midnight from date w/o time in Oracle?

    - by Swiety
    I would like to distinguish date at midnight (i.e. '12/05/2010 00:00:00') from date without time specified (i.e. '12/05/2010'). This value is provided by user, sometimes it is only date which is important, sometimes it is date and time and later the application is expected to show the time only when it was explicitly provided. So for the following inputs I would expect the following outputs: for '12/05/2010' I would expect '12/05/2010' for '12/05/2010 09:23' I would expect '12/05/2010 09:23' for '12/05/2010 00:00' I would expect '12/05/2010 00:00' I know I can model it in two separate columns, date and time, but I was wondering was there any way of handling this in single date column?

    Read the article

1