Open GoogleCodeExporter opened 9 years ago
Here is an algorithm for handling this:
1. Add "error" and "success" fields into json's formed by servlets. "Error" is
the class of the message (could be "success", "info" or "error"); "success" is
the message you want to display.
2. Add the following to your page: <div class="container" id="notifier">
</div>
3. Include script file message-maker.js
4. When handling the json with Javascript (for instance, during the $.getJSON
method) call addMessage(data), where data is the json you are processing.
What's left is to implement it on all pages.
Original comment by Jiallomb...@gmail.com
on 12 May 2012 at 1:31
Another note - warning messages for incorrectly filled fields. These include:
1. Fields with empty values
2. Null choices in dropdown
3. Incorrectly formed e-mails
4. Logins that already exist
This could be accomplished by adding a, for example, "fields" parameter to the
json, which will be a pairs array of such structure: "fieldname" :
"errormessage". The corresponding field names are highlighted as erratic (see
commented code on index page - you just need to change add a class to the input
field), and a message is written underneath them (just like in the example). A
message should also appear at the top of the screen.
Original comment by Jiallomb...@gmail.com
on 13 May 2012 at 7:16
partly finished. Every ajax process servlet (when processing changes made by
user) in now sending message back (successful or error)
Original comment by goldsm...@gmail.com
on 15 May 2012 at 10:11
Original issue reported on code.google.com by
goldsm...@gmail.com
on 10 May 2012 at 7:32