cancel
Showing results for 
Search instead for 
Did you mean: 

CAF Exception

Former Member
0 Kudos

Hi Everybdy,

I have made an application with some customization in MAM application.

Whenever i am clicking 3-4 times on a link in application , i am getting CAF Exception and it is happening in almost all links in the application ( even in the links that appear in a list )

What is the cause of this kind of error ? and how it can be avoided ?

To me , best way appeared was,

a) to show to user some nice page saying" please click only once on links "

b) Disable double click on links via Javascript.

c) I haev also put a try catch block in java controllers , so that i can catch it and show user a nice Page. But this wont help out as , error is thrown by JSP Page , not java files( i guess )

To give a) option -- i could only see JSTL Tags as options -


-


CAN i use JSTL tags in MAM application?

To give option 2) - i used this:

<script>

function doNothing()

{

}

<script>

< a ondbclick =doNothing()>

BUT, THIS IS NOT HELPING OUT , still exception is coming.

Please suggest a remedy of CAF Exception.

Regards,

Vipin.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi vipin,

>CAN i use JSTL tags in MAM application?

i think JSTL requires JSP1.2/Servlet2.3 which is not supported by Tomcat 3 used

in MI.

>Please suggest a remedy of CAF Exception.

im not sure if this would work, but might worth a try.

in your controller servlet, create a static flag e.g. bProcessing which will serve as

your marker if a request had been made already. override the <i>service</i> method

and set this flag to true once the request is received; then set this back to false

after the processing ends. you can then just ignore succeeding requests if the

flag is already true. something like:

static boolean bProcessing;
void service(req,res){
 if(!bProcessing){
  bProcessing = true;
  super.service(req,res);
 } 
  bProcessing = false;
}

there might be need to set back the flag to false in cases of exceptions or when

the request was canceled...

hope this help.

jo

Former Member
0 Kudos

Hello,

First of all, are you using MAM 3.0. PDA or Laptop version?

The error is occuring because of the double click and the single threaded DB. Once it occurs you have to restart MI. The catch exception solution on the server side won't work because of that.

For MAM 3.0 SR3, the PDA version is double-click proof (TM) as well as the Laptop version.

For your Javascript fix, you cannot put it in the double click because the single click will be called anyway. Put it in the single click with surrounding if statement and global clicked variable.

Thank you,

Julien.

Former Member
0 Kudos

Hi Julien,

I am using MAM2.5sr4 version.

Actually , i have already added this code: which diasbles the link once it is clicked, but still it was giving error.

function save ()

{

save.onclick = function{return false ; }

}

< a name= "save" href= "javascript:save()" >

Regards,

Vipin.