Replicating default edit error behaviour
Forum » Forum / New Content » Replicating default edit error behaviour
Started by: PrajPraj
On: 1225963605|%e %b %Y, %H:%M %Z|agohover
Number of posts: 4
rss icon RSS: New posts
Replicating default edit error behaviour
PrajPraj 1225963605|%e %b %Y, %H:%M %Z|agohover

By default when there's an edit error (e.g. required field missing) the default processing sets the cursor to the appropriate field and highlights it in red. This is how the default component processor works.

Is it possible to replicate this behaviour exactly? Users are used to having this occur on errors, and it would be nice to trigger this on all PeopleCode validation.

What would be neccessary? My original thoughts were:

  • Set the cursor to appropriate field with SetCursorPos before the error message is displayed.
  • Change the style sheet to PSERROR

However, after the error is corrected, you need another event to set the stylesheet back so that the errored field is no longer highlighted in red. This seems too complicated - could there be an easier way - e.g. call some JavaScript to this part?

Any thoughts or ideas …

Reply  |  Options
Unfold Replicating default edit error behaviour by PrajPraj, 1225963605|%e %b %Y, %H:%M %Z|agohover
Re: Replicating default edit error behaviour
PrajPraj 1226003540|%e %b %Y, %H:%M %Z|agohover

On seconds thoughts, you probably need to trigger an event on the field again to validate it so you now know that it is no longer in error. However, triggering that error without user interaction is where I'm stuck.

Reply  |  Options
Unfold Re: Replicating default edit error behaviour by PrajPraj, 1226003540|%e %b %Y, %H:%M %Z|agohover
Re: Replicating default edit error behaviour
Anonymous (192.131.85.x) 1227529967|%e %b %Y, %H:%M %Z|agohover

use style sheet 'PABOLDTEXT' to to set the stylesheet back so that the errored field is
no longer highlighted in red.

Thanks,
Sharmil

Reply  |  Options
Re: Replicating default edit error behaviour
Anonymous (192.131.85.x) 1227530046|%e %b %Y, %H:%M %Z|agohover

Ignore the prvious one…

use style sheet 'PSEDITBOX' to to set the stylesheet back so that the errored field is
no longer highlighted in red.

Thanks,
Sharmil

Reply  |  Options
New Post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License