Привет, ребята. У меня есть хороший проект на JavaScript. Я начинаю пытаться переключить JavaScript, и я получаю сообщение об ошибке:
function saveComment( id )
{
$("#commentErrors").css("visibility", "hidden");
var hashTab = {};
commentField = document.getElementById("comments-"+id);
// hard code the constant Node.TEXT_FIELD as its value "3" since
// IE doesn't support DOM constants correctly
hashTab["comments"] = commentField.firstChild.nodeType==3
? commentField.innerHTML
: commentField.firstChild.value;
hashTab["id"] = id;
//hashTab["entryWorkloadYear"] = document.getElementById("entryWorkloadYear").value; // Where is this element?!
----->>> WhatIfDataAction.saveComment(hashTab,
{
callback:saveCommentCallback,
timeout:60000,
errorHandler: dwrSessionErrorHandler
}
);
}
есть мысли?
saveComment выглядит так:
public CommentForm saveComment(Map<String,String> properties)
throws Exception
{
EntryBean entry = WhatifCache.fetchEntryFromCache(getSession());
CommentForm form = new CommentForm(properties);
if (form.validate(this))
{
CommentBean bean = entry.getComment(form.getId());
bean = CommentBean.deepCopy(bean);
form.overlayFormData(bean);
entry.updateComment(bean);
}
return form;
}