// Render each time the page is refreshed since a new comment may have be added
request.element.isStatic = 0;
request.comments = structNew();
application.ptComments.scripts.loadJQuery();
application.ptComments.scripts.loadJQueryUI();
application.ptComments.scripts.loadADFLightbox();
formID = application.ptcomments.getCommentsFormID();
// get the items
items = attributes.elementInfo.elementData.propertyValues;
// Validate if the comments structure exists to post comments
if (( StructKeyExists(request.params, "comments") AND StructKeyExists(request.params.comments, "contentDataPageID") ) OR
( StructKeyExists(request.comments, "contentDataPageID") ) )
{
// Set the content Form ID from the Content Page ID
request.comments.contentDataPageID = request.params.comments.contentDataPageID;
request.comments.contentformID = application.ptComments.ceData.getFormIDFromPageID(pageid=request.comments.contentDataPageID);
}
else {
request.comments.contentDataPageID = 0;
request.comments.contentformID = 0;
}
// Set the flag to render the action links for the comments
renderActionLinks = false;
if ( request.renderState.renderMode NEQ "read" )
renderActionLinks = true;