1 /* 2 * Copyright (C) 2008-2009 WaveMaker Software, Inc. 3 * 4 * This file is part of the WaveMaker Client Runtime. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 dojo.provide("wm.base.components.NavigationCall"); 19 dojo.require("wm.base.components.ServiceCall"); 20 dojo.require("wm.base.components.NavigationService"); 21 22 /** 23 Encapsulates a {@link wm.NavigationService} configuration with a trigger to invoke the configured service. 24 @see wm.ServiceCall#update 25 @name wm.NavigationCall 26 @class 27 @extends wm.Component 28 @extends wm.ServiceCall 29 */ 30 dojo.declare("wm.NavigationCall", [wm.Component, wm.ServiceCall], { 31 /** @lends wm.Variable.prototype */ 32 service: "navigationService", 33 operation: "gotoLayer", 34 // page navigation can lead to destruction, so abort processing 35 processResult: function(inResult) { 36 if (!this.owner) 37 return; 38 return this.inherited(arguments); 39 }, 40 processError: function(inError) { 41 if (!this.owner) 42 return; 43 return this.inherited(arguments); 44 } 45 }); 46 47 wm.Object.extendSchema(wm.NavigationCall,{ 48 autoUpdate: {ignore: 1}, 49 startUpdate: {ignore: 1}, 50 service: {ignore: 1, writeonly: 1}, 51 operation: { group: "common", order: 24}, 52 updateNow: { ignore: 1}, 53 queue: { group: "operation", order: 20}, 54 clearInput: { group: "operation", order: 30}, 55 input: { ignore: 1 , writeonly: 1, componentonly: 1, categoryParent: "Properties", categoryProps: {component: "input", bindToComponent: true, inspector: "Navigation"}} 56 }); 57 58 // design only... 59 /**#@+ @design */ 60 wm.NavigationCall.extend({ 61 }); 62 /**#@- @design */ 63 64 wm.NavigationCall.description = "Navigation service call."; 65