function initialize (action) {
// ----------------------------
- if (action == "setContext") {
- edit.elements[2].focus();
- } else
- if (action == "renameDocument") {
- edoc.documentTitle.focus();
- } else
- if (action == "renameKnowledge") {
- edit.knowledgeTitle.focus();
- } else
- if (action == "addKnowledge") {
- edit.elements[1].focus();
- } else
- if (action != "display") {
- edit.elements[0].focus();
- }
+ if(typeof edit !== 'undefined') {
+ if (action == "setContext") {
+ edit.elements[2].focus();
+ } else
+ if (action == "renameDocument") {
+ edoc.documentTitle.focus();
+ } else
+ if (action == "renameKnowledge") {
+ edit.knowledgeTitle.focus();
+ } else
+ if (action == "addKnowledge") {
+ edit.elements[1].focus();
+ } else
+ if (action != "display") {
+ edit.elements[0].focus();
+ }
+ }
}
function setValue () {
// -------------------
* @return SUCCESS
*/
public String doCreate() {
- if ("true".equals(getWriteAccess()) && getUserRights().canCreateDocument()
+ if ("true".equals(getWriteAccess())
&& _commentValue!=null && _commentValue.length()>0
&& _commentTitle!=null && _commentTitle.length()>0) {