uidesigner/com.nokia.sdt.series60.componentlibrary/components/menu/MenuItemBase.js
author timkelly
Mon, 29 Mar 2010 15:56:12 -0500
changeset 1138 352c0236f181
parent 0 fb279309251b
permissions -rw-r--r--
bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


include("../messageLibrary.js")
include("../implLibrary.js")

function MenuItemBase() {

}

// IComponentValidator
MenuItemBase.prototype.validate = function(instance) {

	var messages = null;
	
	// cannot have a "selected" event if a submenu is present
	if (instance.children.length != 0 && "selected" in instance.events) {
		var messages = new java.util.ArrayList();
		var modelMessage = newModelMessage(IStatus.WARNING, 
			formatString(
				lookupString("selectedEventInCascadingMenuItem"), 
				[ instance.name ]), 
			instance, null, "selected");
		messages.add(modelMessage);
	} 
	return messages;
}

MenuItemBase.prototype.queryPropertyChange = function(instance, propertyId, newValue) {
	return null;
}