if (fb_.verbInfo.executionMode is "start") { // validate attributes // url/xfa - string - one of these is required if (structKeyExists(fb_.verbInfo.attributes,"url")) { if (structKeyExists(fb_.verbInfo.attributes,"xfa")) { fb_throw("fusebox.badGrammar.requiredAttributeMissing", "Required attribute is missing", "Either the attribute 'url' or 'xfa' is required, for a 'relocate' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#."); } else { fb_.theUrl = fb_.verbInfo.attributes.url; } } else { if (structKeyExists(fb_.verbInfo.attributes,"xfa")) { // url = myself + the xfa value fb_.theUrl = "##myFusebox.getMyself()####xfa." & fb_.verbInfo.attributes.xfa & "##"; } else { fb_throw("fusebox.badGrammar.requiredAttributeMissing", "Required attribute is missing", "Either the attribute 'url' or 'xfa' is required, for a 'relocate' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#."); } } // addtoken - boolean - default false if (structKeyExists(fb_.verbInfo.attributes,"addtoken")) { if (listFind("true,false,yes,no",fb_.verbInfo.attributes.addtoken) eq 0) { fb_throw("fusebox.badGrammar.invalidAttributeValue", "Attribute has invalid value", "The attribute 'addtoken' must either be ""true"" or ""false"", for a 'relocate' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#."); } } else { fb_.verbInfo.attributes.addtoken = false; } // type - server|client - default client if (structKeyExists(fb_.verbInfo.attributes,"type")) { // FB51: adds moved and javascript types: if (listFind("server,client,moved,javascript",fb_.verbInfo.attributes.type) eq 0) { fb_throw("fusebox.badGrammar.invalidAttributeValue", "Attribute has invalid value", "The attribute 'type' must either be ""server"", ""client"", ""moved"" or ""javascript"", for a 'relocate' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#."); } } else { fb_.verbInfo.attributes.type = "client"; } // strict mode - check attribute count: if (fb_.verbInfo.action.getCircuit().getApplication().strictMode) { if (structCount(fb_.verbInfo.attributes) neq 3) { fb_throw("fusebox.badGrammar.unexpectedAttributes", "Unexpected attributes", "Unexpected attributes were found in a 'relocate' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#."); } } // compile switch (fb_.verbInfo.attributes.type) { case "server": fb_appendLine(''); break; case "client": fb_appendLine(''); break; case "moved": fb_appendLine(''); fb_appendLine(''); break; case "javascript": fb_appendLine(''); break; } fb_appendLine(''); }