Create CAF.Output.Model Object

Hi ,
I am not able to create a new CAF client side object.

var elem1 = new CAF.Output.Model ("ss","dd");
if(elem1 == null){
Logger.warn("elem1 is null1" );
}else{
Logger.warn("elem1 is not null1" );
}

Logger.warn("2" + elem1.isVisible());

It is displaying “elem1 is not null1”, but when I try to call any method on that object as mentioned in the DOC
at http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_ga/My_webMethods/8-2-SP1_CAF_JavaScript_Reference/CAF.Output.Model.html

I get the following error:
Timestamp: 8/8/2012 6:58:55 PM
Error: $(element) is null
Source File: http://localhost:8585/ui/dyn/general.js?l=en_US&v=120808185846
Line: 1357

Please help !!

I would recommend just getting the model by using the CAF.model(id) function.

See:
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/My_webMethods/8-2-SP1_CAF_JavaScript_Reference/CAF.html#!s!model

For example:


var elem1 = CAF.model("jsfwmp6326:defaultForm:panel_id");
if(elem1 == null){
Logger.warn("elem1 is null1" );
}else{
Logger.warn("elem1 is not null1" );
}

Logger.warn("2" + elem1.isVisible());