how to reset data pages control to the 1st page?

Hi,

does anyone know how to reset the data pages control to the first one using JavaScript?

Cheers
Bruno

Please see the Online help for the CAF.Table.Model. Specifically the information about paging. Here’s a link: http://ajax-softwareag.com/articles/N7M0TP/DesignerOnlineHelp/caf_model_paging.html

Regards,
–mark

Hi Mark,

i’ve followed your advice and used go(0,-1) to do the reset.
It does the work, but it also throws the following error:

Error: CAF.model(“jsfwmp9767:defaultForm:asyncTable:__row__template:rbSelect”) is null
Source File: http://hxb30598.hiscox.nonprod:8000/wm_cafshared/dyn/base.js?l=en_US&v=071130112040
Line: 3071

This is the line code where the error is thrown:

var evalNext=function(){
if(externals.length&&typeof(Library)!=“undefined”){
Library.load(externals.shift(),evalNext);
return;
}
for(var i=0,s;s=internals[i];i++)
eval(s); <------
}

Any clues?
Thanks
Bruno

Unfortunately, that error message is simply pointing to the line where asynchronously loaded script is evaluated, so the line number information isn’t too helpful. Try looking through the asynchronous response logged via the caf logger (see http://www.ajax-softwareag.com/articles/N7M0TP/DesignerOnlineHelp/caf_cls_logger_bookmarklet.html) to see if you can find a line of script containing the string ‘CAF.model(“jsfwmp9767:defaultForm:asyncTable:__row__template:rbSelect”)’, and check what its doing. It sounds like some script inside the table is trying to lookup a control with an id of ‘rbSelect’, but is failing because that control doesn’t exist, at least in the template row (see http://www.ajax-softwareag.com/articles/N7M0TP/DesignerOnlineHelp/caf_template_row.html for more info on template rows).

Hi,

the rbSelect is a radiobutton in the first column. When I check the logger there are a lot of references to it, one for each row. I haven’t done any customization for the template row, because I don’t need to add rows to it, it’s just a read only so that the user is able to select one row.
Do I need to add anything to the template because of the go(0,-1)?
The strange thing is that when I click the table pages, specially the first one, the javascript code that runs is identical to mine, but it doesn’t throw the error.
In attachment there’s the CAF logger.

Thanks
Bruno
logger.txt (25.6 KB)