Bookshelf Home | Contents | Index | PDF |
Siebel Advisor API Reference > Pageset Functions for Siebel Advisor > BuildTargetUsageUse the BuildTarget function on a display page to create output target controls that display links, images, or text in response to a user selection. You call the BuildTarget function in the <BODY> section of a display page. Also, all BuildTarget calls must be inside the <FORM> section of the HTML source of display pages. The function is usually called from within a JavaScript document.write method. SyntaxBuildTarget(type,window,name[,arg1,arg2])
Link Output TargetsSet the type argument for the BuildTarget function to LINK to create a link output target. The table column specified by the name argument can contain pageset IDs or URLs. The isPage argument defines how the data is handled. The dynDefCol argument points to a column that contains information that dynamically overrides the defaults of the specified pageset. The syntax used to create a link output target is: BuildTarget("LINK",window,name,isPage[,dynDefCol]) NOTE: Pagesets must be located in the application pg subdirectory. ExampleThe following sample code creates a link output target based on a Configuration table column named CLINK: document.write(ISS.BuildTarget("LINK",window,"CLINK", </SCRIPT>If you liked this thing, you'll definitely like these other things.</a> When the user selections match a valid configuration, a pageset ID in the CLINK column is returned. When the user clicks the button, the pageset is loaded and displayed in the application. Subconfiguration Link Output TargetsSet the type argument for the BuildTarget function to SUBCONFIG_LINK to create a subconfiguration link output target. Use a subconfiguration link output target to navigate to the user interface of a child pageset from its parent pageset, or from the child pageset back to the user interface of its parent pageset. The syntax used to create a subconfiguration link output target is: BuildTarget("SUBCONFIG_LINK",window,instanceName) NOTE: Pagesets must be located in the application pg subdirectory. ExampleThe following sample code links from a parent page to a BURGER child page: document.write(ISS.BuildTarget("SUBCONFIG_LINK", </SCRIPT>Link to Hamburger</a> Similarly, a child page links to its parent page using the following sample code: document.write(ISS.BuildTarget("SUBCONFIG_LINK", </SCRIPT>Link to Burger Meal</a> Subconfiguration link output targets can link a child pageset, or a nested parent pageset, to the topmost parent pageset by using the reserved word TOP as the instanceName argument: Done selecting cheese for your burger? document.write(ISS.BuildTarget("SUBCONFIG_LINK", window,"TOP");) </SCRIPT>Link to Burger Meal</a> Also, subconfiguration link output targets can link one child pageset to another by using the syntax PARENT:CHILD as the instanceName argument: document.write(ISS.BuildTarget("SUBCONFIG_LINK", window,"PARENT:FRIES");) </SCRIPT>Would you like fries with that?</a> Optional Subconfiguration Link Output TargetsSet the type argument for the BuildTarget function to OPT_SUBCONFIG_LINK to create an optional subconfiguration link output target. Use an optional subconfiguration link output target when a pageset is used for both a subconfigured item and a standalone item. For example, if your application allows users to build fast food value meals, suppose that a user wanted to buy a drink without purchasing any food. By using an optional subconfiguration target link to the parent pageset on the DRINK pageset, the same DRINK pageset could be used, regardless of whether the person is ordering a value meal. A subconfiguration link back to the parent is not appropriate unless the user arrives at the pageset from a parent pageset. The optional link does not appear unless the user arrives from a parent pageset. The syntax to create an optional subconfiguration link output target is: BuildTarget("OPT_SUBCONFIG_LINK",window,instanceName,preText,postText)
NOTE: Pagesets must be located in the application pg subdirectory. ExampleUse the following sample code: document.write(ISS.BuildTarget("OPT_SUBCONFIG_LINK" "<TR><TD><a HREF="javascript:InstanceWrapper ('PARENT','window')">Link to Burger Meal</A></TD> if there is a parent. If there is not a parent, it returns an empty string (" "). Image Output TargetsWhen the value for the type argument for the BuildTarget function is PICT, an image output target is created. The image output target also uses optional Width and Height arguments. The syntax used to create an image output target is: BuildTarget("PICT",window,name[,width,height]) Argument Notes
ExampleThe following sample code creates an image output target that displays the file listed in the IMG column of a Configuration table: document.write(ISS.BuildTarget("PICT", window,"IMG")); When the user selections match a valid configuration, the value in the IMG column is returned. This value is the name of the image file that appears in the output target. Text Output TargetsWhen the type argument for the BuildTarget function is set to TEXT, a text output target control is created. The syntax used to create a text output target is: BuildTarget("TEXT",window,name,[formatFunction]) ExampleThe following sample code creates a text output target that displays an interior color selection. When the user selections match a valid configuration, a value in the DESC column is returned and displayed in the text output target. Note that this column is located in the Feature table COLORINT. document.write(ISS.BuildTarget("TEXT", window,"COLORINT.DESC")); The following sample code displays a price text as a number with two decimal places. document.write(ISS.BuildTarget("TEXT", window,"PRICE", ISS.ConvertFloatToCurrency)); Content Sources for Output TargetsThe name argument for the BuildTarget function refers to one of the following:
N-Back Link TargetThe N-Back Link target saves the input state of the current pageset and then load a specified pageset. You can create one or more N-Back Link targets per display page. The N-Back Link Target is used in conjunction with the N-Back Return target. For more information, see N-Back Return Target. The syntax used to create an N-Back Link output target is: BuildTarget ("NB_LINK", winObj, linktext, pagesetcol, returntext) Exampledocument.write(ISS.BuildTarget("NB_LINK",window, "Accessories","DYNDEFS", "Return to Server Configuration")); N-Back Return TargetThe N-Back Return target is used to navigate back to the previous pageset and restore the saved input state for that page. You can create one N-Back Return target per display page. An N-Back Return target will only be constructed if called from a pageset of which the "TOP" instance was traversed to by an N-Back Link. Otherwise an empty string is returned. For more information, see N-Back Link Target. The syntax used to create an N-Back Return output target is: BuildTarget ("NB_RETURN", winObj, linktext, tokencol) Exampledocument.write(ISS.BuildTarget("NB_RETURN",window,"Return")); |
Siebel Advisor API Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |