Solved

actionErrors: Is this a common problem

Posted on 2011-09-03
6
419 Views
Last Modified: 2013-11-24
Hi all,
I just started using action errors with my application.
I added action errors to a form I for creating a new Course, I check if the course name and course code were already used (in the database).

Note: I am using this same actionForm for create course, edit course and delete course.

All good so far  
Next, I ran my application again and, I checked the update Course page and, since I am using the same form, the course name and course code are highlighted as errors even though I haven't changed them (actionErrors check the Database for course name and course code and finds that they already exist).
Is this a common problem and how can I avoid it?
Any help would be appreciated.
Cheers,
Kieran
0
Comment
Question by:kieranocallaghan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36492434
1)      The error is not from an ActionScript is server side error you need to pass appropriate message usually is error code or error type + description
2)      The all errors must be handle by your listener functions and popup an Alert box
3)      Is the error such as Null pointer exception you will not be notifying by Flash Player is you are installed consumer version. You must use debugger Flash Player and download from this url
http://www.adobe.com/support/flashplayer/downloads.html
4)      The user requests and responses or error description you may need to log for reviewing later. The easiest way use flashlog.txt  http://livedocs.adobe.com/flex/3/html/help.html?content=logging_04.html

0
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 36492657
think about your logic.

add a course will check the database and return an error if the course exists in the database while edit/delete a course must check that the course exists and error if the course does NOT exist.
0
 

Author Comment

by:kieranocallaghan
ID: 36494009
Hi ve3ofa,
Thanks for your reply, yes that's the situation I am in!
I tried another approach:
In action errors check if user is creating a course, editing a course or deleting a course but this caused lots more complexity.
I though about creating a different form for create, edit and delete course but this doesn't make sense either.
I am wondering if there is a standard way to handle this situation.
Regards,
Kieran
0
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 36494211
you will need 2 forms - add  
delete/modify can use the same logic but the action will be different
0
 

Author Comment

by:kieranocallaghan
ID: 36505859
I just tried that and it works great, thanks ve3ofa!
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question