Detecting changes in the context

hi,
I have a form to update the personal data.The existing data is fetched by using a RFC.Now My requirement is as follows:
The UI elements are bound to the view context elements wihich are populated by the model.
Now I need to call the update RFC ONLY IF the user has made any changes to ANY of the data in the screen.
Is there a way to know if the data in the screen is changed?
thanx,
Bhupesh

Hi,
   I think it's better to determine this from the model object itself, rather than the node.
   ARFC model objects generated from BAPIs an be typecasted to <i>ICMIModificationCount</i>.
   So you will need to check the <i>modCount()</i> for every model object as soon as the view is loaded. Save this count somewhere. This should be much better than iterating through all your node elements and checking if they have been modified.
   Now when you want to find out if the view has been changes or not, check the saved value with the current <i>modcount</i>. If they are not equal, then there has been a modification.
Regards,
Satyajit.

Similar Messages

  • Detecting changes in the replication site list

    Is there a way, when using the replication manager, to detect changes in the replication site list without having to continuously call repmgr_site_list()?
    Even if you still need to call repmgr_site_list() to determine just what changed, it would still be useful to only call it when the result would be different than the previous call.

    Currently, no. However, we are working on an enhancement for a future
    release that would include such a feature.
    Drop me an email, if you like. My address conforms to the Oracle
    convention: [email protected]
    Alan Bram
    Oracle

  • Detection of changes in the context prior saving a document

    Original thread title: IS_CHANGED_BY_CLIENT and RESET_CHANGED_BY_CLIENT methods / selection change
    Does anyone know, why is that the RESET method is recursive, but the IS method isn't?
    The problem is, I need to trigger a save of a document only when there is some change made by the user, but to do that i'm being forced to implement myself a recursive method which uses both IS_CHANGED_BY_CLIENT and GET_CHILD_NODES methods. While I simply call the RESET_CHANGED_BY_CLIENT method of the root node and it affects all subnodes.
    Another problem is that, the selection changes (e.g. in a dropdownbyindex) don't get accounted as changes by the IS_CHANGED_BY_CLIENT method.
    Is there any simpler way to implement this?
    Thanks

    Thanks for your comments Manish. I've already programmed the recursive method and it is working ok, seems to be the only way then.
    But how did you solve detection of selection changes? Currently i'm thinking of having an event handler for each dropdown, which will mark a flag to be evaluated additionally to the method's result. You did the same, or selection changes didn't matter in your case?
    Thank you
    Solved: The context change log seems to be a far better alternative, it also detects selection changes.
    Check DEMO_CONTEXT_CHANGES example. If you need only to detect changes, you can use just the enable_context_change_log and get_context_change_log methods.
    It may be a little bit taxing when the context is large though, I'd like if anyone which has had this experience could comment.

  • Sound Blaster Extreme Music do not detect changes on the console

    I'm using the sound blaster X-Fi XtremeMusic with Logitech Z-5500 and the Flexi Jack, connected on Digital mode (Using Coaxial and Optical). The OS? Is Windows Vista Ultimate 32 Bits.
    The problem at this moment is that I can not make any change on the console configuration, I mean, if I change the speaker connection or change any parameter of the configuration has no reaction,I even change the EAX effects, the CMSS-3D ad nothing happen, all that I can control with the console launcher is the volume.
    I reinstall the drivers and download from the website the latest drivers I found and same problem.
    ?Any help?
    THANKS?

    Choose Soundblaster in the dropdown box and you will see XFi listed , you will find the latest drivers there....Seems rather strange to me since this is a XFi card, but hey I did not design the Website......
    Message Edited by warriorking on 03-05-200706:40 PM

  • Detecting changes in the AUR

    How do people find out that they need to rebuild something from the AUR?  Is there anything other than having a list and checking everything on it once in a while?
    TOF.

    nomorewindows wrote:Pacaur wants to call everything -git to -git-latest.
    Yeah, -latest version. Which means they won't be compiled if already to latest version.
    man pacaur wrote:
    --devel
    When used with update operations, also upgrade AUR development packages (supported are cvs, svn, git, hg, bzr and darcs development packages). The build of development packages that are found up-to-date after the source checkout will be skipped.
    There's a reason the cloning is done after the main prompt: to minimize time the user spend interacting with the package manager.
    cfr wrote:
    I have a script which checks for changes in official and unofficial repos with pacman, and uses cower to check for updates. If there are any, it displays a notification saying so.
    There are 2 problems:
    1) VCS packages - I have no good way to deal with these;
    2) packages which are replaced or dropped altogether from AUR.
    Would really like a way to add some sort of checks for these but have not yet come across anything hopeful .
    You might want to look at pacaur source code: 1/ is achieved like explained right above, 2/ is done by displaying a warning when foreign packages aren't found in the AUR either.
    Last edited by Spyhawk (2013-11-27 07:56:22)

  • XY-Graph / Plot legend: How to detect changes in 2nd/3rd/4th ... legend position

    Hello,
    I have an XY-Graph with 4 plots. How can I detect, for example, the color change of the second plot in the legend. The active plot, using a property node, is always plot 0. So I am not able to detect changes in the 2nd/3rd ... plot.
    Any ideas?
    Thanks a lot.
    Best regards,
    Michael
    Solved!
    Go to Solution.

    You can do it with an event sturcture.
    Attachments:
    Plot detect.vi ‏25 KB

  • Web Dynpro & Adobe Interactive Forms - how to update the context node

    Hi Experts,
    I got a WD Component with some context nodes that are mapped to some views and are filled in this views. These context nodes are the dataSource for the Interactive Forms. These forms are embedded in a view by UIElement Interactive Forms.
    My problem is, everytime when I change the structure of the context nodes (i.e. there's an additional attribute necessary), I have to design new forms to get the context nodes linked to the form. My existing forms cannot handle updated context nodes.
    The change in the context node is displayed on web dynpro side, in the dataSource view in UIElement property. But in TA sfp there is the old context node structure displayed without any change (i.e. in number of attributes).
    My forms' layout type is ZCI Layout the interface is based on XML.
    How can I easily update the forms' context node structure without creating new forms every time?
    Thanks in advance,
    Tan

    ok, got it.
    by double clicking on templateSource in UIElement properties the interface can be updated.
    Regards from Murphy's Law.
    Tan

  • How do I change the context-root of a web app with a deployment plan?

    I've been trying to figure this out for several hours.
    I'm deploying a .ear file which sets the context root for the single web application it deploys in its application.xml deployment descriptor:
    <application>
    <display-name>MyApp</display-name>
    <module>
    <web>
    <web-uri>MyAppViewControler.war</web-uri>
    <context-root>MyApp</context-root>
    </web>
    </module>
    </application>
    I want to change the context-root from /MyApp to something else when deploying the ear file. It seemed to me that using a deployment plan was the way to do this. But when I use this plan:
    <deployment-plan>
    <application-name>MyApp<application-name>
    <variable-definition>
    <variable>
    <name>NEWCONTEXTROOT</name>
    <value>foobar</value>
    </variable>
    </variable-definition>
    <module-override>
    <module-name>MyApp</module-name>
    <module-type>ear</module-type>
    <module-descriptor external="false">
    <root-element>application</root-element>
    <uri>META-INF/application.xml</uri>
    <variable-assignment>
    <name>NEWCONTEXTROOT</name>
    <xpath>/application/module/web/context-root</xpath>
    </variable-assignment>
    </module-descriptor>
    </module-override>
    </deployment-plan>
    I get an error:
    weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    /bea/user_projects/domains/devod1/nullplan.xml:0: problem: cvc-complex-type.2.4a: Expected element 'web-uri@http://java.sun.com/xml/ns/javaee' instead of 'context-root@http://java.sun.com/xml/ns/javaee' here in element web@http://java.sun.com/xml/ns/javaee:<nullplan.xml>
    I looked at http://e-docs.bea.com/wls/docs103/pdf/deployment.pdf which says:
    "You cannot use a deployment plan to change the context-root in an application.xml
    file. However, if an application is deployed as a library, you can either change the
    context-root through an weblogic-application.xml file or use the deployment plan
    to change the context-root in an weblogic-application.xml file."
    I don't understand what this means. I'm not deploying my application as a library.
    Does anyone know how to change the context-root for an application?
    Any help would be greatly appreciated!

    Hi James,
    I am quite new to Welogic if i am wrong please correct me.I have re-deployed my application (.war) with this Plan.xml
    &lt;?xml version='1.0' encoding='UTF-8'?&gt;
    &lt;deployment-plan xmlns="http://www.bea.com/ns/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/deployment-plan http://www.bea.com/ns/weblogic/deployment-plan/1.0/deployment-plan.xsd" global-variables="false"&gt;
    &lt;application-name&gt;BrowserR08.003&lt;/application-name&gt;
    *&lt;variable-definition&gt;*
    * &lt;variable&gt;*
    * &lt;name&gt;CONTEXTROOT&lt;/name&gt;*
    * &lt;value&gt;BrowserWeb/servlet/BrowserServlet&lt;/value&gt;*
    * &lt;/variable&gt;*
    * &lt;/variable-definition&gt;*
    &lt;module-override&gt;
    &lt;module-name&gt;BrowserWeb.war&lt;/module-name&gt;
    &lt;module-type&gt;war&lt;/module-type&gt;
    &lt;module-descriptor external="true"&gt;
    &lt;root-element&gt;weblogic-web-app&lt;/root-element&gt;
    &lt;uri&gt;WEB-INF/weblogic.xml&lt;/uri&gt;
    &lt;hash-code&gt;1231953167814&lt;/hash-code&gt;
    *&lt;variable-assignment&gt;*
    * &lt;name&gt;CONTEXTROOT&lt;/name&gt;*
    * &lt;xpath&gt;/weblogic-web-app/context-root&lt;/xpath&gt;*
    * &lt;operation&gt;add&lt;/operation&gt;*
    * &lt;/variable-assignment&gt;*
    &lt;/module-descriptor&gt;
    &lt;module-descriptor external="false"&gt;
    &lt;root-element&gt;web-app&lt;/root-element&gt;
    &lt;uri&gt;WEB-INF/web.xml&lt;/uri&gt;
    &lt;/module-descriptor&gt;
    &lt;module-descriptor external="true"&gt;
    &lt;root-element&gt;wldf-resource&lt;/root-element&gt;
    &lt;uri&gt;META-INF/weblogic-diagnostics.xml&lt;/uri&gt;
    &lt;/module-descriptor&gt;
    &lt;/module-override&gt;
    &lt;config-root&gt;/export/home1/tecapp/BrowserR08.003/plan&lt;/config-root&gt;
    &lt;/deployment-plan&gt;
    I do not know wether i will require the other module descriptor definition in this Plzn.xml. Now when I go to following link.
    Deployments --&gt; MyApp --&gt; Testing
    It gives me following url as a test page:
    http://localhost:7001/BrowserWeb/servlet/BrowserServlet
    as soon as i click on to the above link it redirects me to following.
    http://localhost:7001/BrowserWeb/servlet/BrowserServlet/servlet/BrowserServlet
    Same if i remove these context-root part my normal Testing menu shows me following link as my webapp access path
    http://localhost:7001/BrowserWeb &lt;-- My war file name is BrowserWeb.war so it is default name of my deployed application if i am not wrong
    and as soon as i click on above link it redirects me to the following one.
    http://localhost:7001/BrowserWeb/servlet/BrowserServlet
    It means application server know that my full web access page is with '*servlet/BrowserServlet*' because its adding it in both the cases.
    What I want is a constant URL whcih does not change?
    Hope this helps :)

  • How can I change the hotkey assignments for options listed in the context-click (right-click) menu?

    How can I change the letter assignments designated to the options that appear in the right-click drop-down menu?
    I frequently save specific items and inspect elements in webpages, however currently the key assignment for 'View Page Info' is the letter ' i ', which inconveniently is located out of the reach of my left hand.
    Rather than forcing ambidextrous mouse usage to allow my right-hand to rest on the keyboard, if I could be pointed in the right direction for customizing these assignments I would greatly appreciate it. I have been able to disable some of the menu items I don't use with firebug but didn't see/didn't know how to go about customizing this option in about:config or deeper in the program files.
    Thanks ahead of time, I'm sure this will be a quick and hopefully easy file/preference name assignment I just need to add, I just couldn't find any forums that had already addressed the request.

    While that add-on is pretty useful and handy for customizing the keyboard shortcuts for items housed in the Menu Bar, it does not provide the resource to change the key combinations assigned to items in the context-click menu
    (the one that appears when you right-click a HTML element or image or such with specific actions pertaining to the item you clicked on - See image)
    https://support.cdn.mozilla.net/media/uploads/images/2014-12-14-13-13-50-85097a.png

  • How to change the context name

    I have deployed an application in oracle 9iAS, with the context as Sample,
    now iam able to access the application as
    http://ipaddress:7777/context
    how to change the application to run in default context
    how to change it to http://ipaddress:7777 to access the application, where should i make the changes

    Just to share the solution.
    Solved it following way:
    deployed like I usually deploy via EM and then used "Fetch Deployment Plan" in EM (you can actually fetch the plan in admin console, too, I think). And then modified that plan.xml istead of creating my own. The advantage is: EM does the magic, you only have to copy the solution ;-)
    The problem for me was, that I was not modifiying the appropriate deployment descriptor because I haven't seen the descriptor's xml file in JDeveloper. This xml was generated by JDev when using "Deploy to EAR". Only realised that after I have unzipped the generated ear.

  • Changing the context menu?

    When I right-click on an icon and get the context menu, it's got some very lengthy names next to some of the programs (looks like build numbers or something). Sometimes it goes for 50 characters!
    Question:
    Where is this data stored (that is, the data that is actually appearing on that context menu) and how can I change it? I would love context menus that are slim and short, with just a one-word program file name...
    Thanks!

    I'm no expert on this, but...
    The list that shows in the Open With section is generated either dynamically, or on startup and stored in the launchservices database. Which application will open which file is determined by the settings in each application's info.plist file. Launchservices scans each info.plist to determine the relevant file types for each app and then displays them as options when you go to Open With.
    If you want to change the name of the app as it is displayed in that list, you'll need to figure a way to change the name as it appears in info.plist
    You can access the info.plist files by Ctrl-clicking the app and choosing 'Show Package Contents'. If you are going to try editing it, it's a lot easier if you install the Property List Editor included as part of the Developer Tools on your Mac OS X DVD.

  • After changing the context path, felix console, I can not checkout content via vlt.

    Hi everyone,
    I have the following issue. After changing the context path, via felix console, I can not checkout the content via vlt. Before that, I could checkout without any problems.
    I am using CQ5.5, CRX2.3, context path: /Test
    That is what I am trying:
    vlt -v --credentials admin:admin co http://localhost:23310/Test/server/crx.default
    Connecting via JCR remoting to http://localhost:23310/Test/server
    [WARN ] Authentication required to access repository descriptors
    [ERROR] checkout: com.day.jcr.vault.vlt.VltException: Unable to mount filesystem
    caused by: javax.jcr.ItemNotFoundException: Not Found
    caused by: org.apache.jackrabbit.webdav.DavException: Not Found
    Other versions I tried:
    vlt -v --credentials admin:admin co http://localhost:23310/crx
    vlt --credentials admin:admin co http://localhost:23310/Test/server
    vlt --credentials admin:admin co http://localhost:23310/Test
    vlt --credentials admin:admin co http://localhost:23310/Test/crx
    To verify if I could connect to the instance properly I started CRXDE
    and try to connect to "http://localhost:23310/Test"
    After click the ok button I got that error:
    No file system is defined for scheme: jcr
    Part of the .log file (.crxde):
    eclipse.buildId=unknown
    java.version=1.6.0_37
    java.vendor=Apple Inc.
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
    Framework arguments:  -keyring /Users/peterwimsey/.eclipse_keyring -showlocation
    Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/peterwimsey/.eclipse_keyr
    ing -showlocation
    !ENTRY org.eclipse.core.resources 2 10035 2012-11-25 19:01:19.268
    !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to
    recover changes.
    !ENTRY org.eclipse.osgi 4 0 2012-11-25 19:04:14.363
    !MESSAGE Application error
    !STACK 1
    java.lang.reflect.InvocationTargetException
            at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)
            at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62)
            at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau
    ncher.java:110)
            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav
    a:79)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
            at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
            at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr
            at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
            at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)
            at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65)
            at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107)
            at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350)
            at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100)
            at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6)
    Any tips or hints are welcome.
    In the case you need more information, just leave a note.
    Thanks in advance for your help.
    Best regards,
    Peter

    The VLT works fine with the above URL change but How to fix "CRXDE" Initialization error if a context path is defined?
    I have a context path defined /Test and when I am trying to login to CRXDE with URL as http://localhost:4502/Test, I am getting below Initialization Error.
    Any workaround as Which URL should work while logging to repository (with context path) using CRXDE 1.0.1
    eclipse.buildId=unknown java.version=1.6.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments:  -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.osgi 4 0 2013-04-25 17:50:23.802 !MESSAGE Application error !STACK 1 java.lang.reflect.InvocationTargetException at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121) at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr
    at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107) at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350) at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100) at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6) at com.day.cq.ide.init.SetupWorkspaceOperation.execute(SetupWorkspaceOperation.java:119) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) ... 13 more Root exception:
    Thanks.

  • [svn:osmf:] 9829: Extending ILayoutContext with an ' updateIntrinsicDimensions' method, that the ILayoutRender uses to inform the context that context' s intrinsical dimensions may have changed because its children got layed-out .

    Revision: 9829
    Author:   [email protected]
    Date:     2009-08-31 06:38:08 -0700 (Mon, 31 Aug 2009)
    Log Message:
    Extending ILayoutContext with an 'updateIntrinsicDimensions' method, that the ILayoutRender uses to inform the context that context's intrinsical dimensions may have changed because its children got layed-out. Adding implementing code to LayoutContextSprite and LayoutRendererBase.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/layout/ILayoutContext.as
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/layout/LayoutContextSprite.as
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/layout/LayoutRendererBase.as

    A slow boot time can be caused by login items.
    User Login Items:
        Flux
        NoSleep
        ClipMenu
        Canon IJ Network Scanner Selector2
        BetterTouchTool
        USBOverdriveHelper
        TotalFinder
        Gmail Notifr
    Open System Preferences > Users & Groups > Login Items
    Remove one login item noted above then restart your Mac to test. It may be one or multiple items causing the slow boot.

  • Detecting Change in Elements between Versions of XML Doc

    Hi There
    I have a structured XML Schema based table in XMLDB 9.2.0.4 and am trying to detect when a non-repeating element off the root element changes (audit).
    I have created a row level update trigger and each time one element is changed via UPDATEXML two or three other elements are detected as changed. I am wondering if I have some sort of DOM fidelity issue here and perhaps my trigger is not the best for detecting this. we use XS:ANY elements in the XML schema and I know that there appears to be space injection into the element tag content and also extraneous namespace tags on tags in the XS:ANY elements.
    Can you give me any advice on my schema XSD and perhaps my trigger. Maybe what I am trying to do is not possible until 10g version of XMLDB.
    XSD
    ====
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Martyn J Ricks (University of Tasmania) -->
    <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Grant John Hyland (University of Tasmania) -->
    <xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns="http://www.utas.edu.au/cu" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.utas.edu.au/cu" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="UnitSetYear" type="UnitSetYearType" xdb:defaultTable="CU_UNIT_SET_YEARS_XML">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="OfferedInCoursesType" xdb:SQLType="CU_UN_OFFEREDINCRSS_TYP">
              <xs:sequence>
                   <xs:element name="Course" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="OFFERED_IN_COURSE" xdb:SQLType="VARCHAR2" xdb:SQLCollType="CU_UN_OFFERED_IN_CRS_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Unit set is involved in these courses, as specified in the quality assurance manual.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="3"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RecommendedTextType" mixed="true" xdb:SQLType="CU_UN_RECOMMENDEDTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RecommendedTextsType" xdb:SQLType="CU_UN_RECOMMENDEDTEXTS_TYP">
              <xs:sequence>
                   <xs:element name="RecommendedText" type="RecommendedTextType" minOccurs="0" maxOccurs="unbounded" xdb:SQLCollType="CU_UN_RECOMMEND_TEXT_COLTYP" xdb:SQLName="RECOMMENDED_TEXT"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequiredTextType" mixed="true" xdb:SQLType="CU_UN_REQUIREDTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequiredTextsType" xdb:SQLType="CU_UN_REQUIREDTEXTS_TYP">
              <xs:sequence>
                   <xs:element name="RequiredText" type="RequiredTextType" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="REQUIRED_TEXT" xdb:SQLCollType="CU_UN_REQUIRED_TEXT_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Prescribed texts</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="BAMajorsType" xdb:SQLType="CU_UN_BAMAJORS_TYP">
              <xs:sequence>
                   <xs:element name="BAMajor" maxOccurs="unbounded" xdb:SQLName="BA_MAJOR" xdb:SQLType="VARCHAR2" xdb:SQLCollType="CU_UN_BA_MAJORS_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Majors that this unit applies to in the BA degree course</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="20"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="AssessType" mixed="true" xdb:SQLType="CU_UN_ASSESS_TYPE">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="ReqTextType" mixed="true" xdb:SQLType="CU_UN_REQTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequisiteType" xdb:SQLType="CU_UN_REQUISITE_TYP">
              <xs:sequence>
                   <xs:element name="ReqType" xdb:SQLName="REQUISITE_TYPE" xdb:SQLType="VARCHAR2">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="6"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ReqText" type="ReqTextType" xdb:SQLName="REQUISITE_TEXT"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequisitesType" xdb:SQLType="CU_UN_REQUISITES_TYP">
              <xs:sequence>
                   <xs:element name="Requisite" type="RequisiteType" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="REQUISITE" xdb:SQLCollType="CU_UN_REQUISITE_COLTYP"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="TeachPatternType" mixed="true" xdb:SQLType="CU_UN_TEACHPATTERN_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="DescType" mixed="true" xdb:SQLType="CU_UN_DESC_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="SpecialNoteType" mixed="true" xdb:SQLType="CU_UN_SPECIALNOTE_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="UnitSetYearType" xdb:SQLType="CU_UN_UNITSETYEAR_TYP">
              <xs:sequence>
                   <xs:element name="UnitSetID" xdb:SQLName="UNITSET_ID">
                        <xs:simpleType>
                             <xs:restriction base="xs:integer">
                                  <xs:minInclusive value="10000000"/>
                                  <xs:totalDigits value="8"/>
                                  <xs:fractionDigits value="0"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Year" xdb:SQLName="YEAR">
                        <xs:annotation>
                             <xs:documentation>The academic year of the unit set</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:integer">
                                  <xs:totalDigits value="4"/>
                                  <xs:fractionDigits value="0"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="UnitSetLabel" xdb:SQLName="SET_LABEL" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>The label that will be used as terms of reference for the unit set</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="20"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="UnitSetTitle" xdb:SQLName="UNIT_TITLE" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>The Unit Set Title for the Year</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="100"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Offered" xdb:SQLName="OFFERED" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Is the unit on offer this year (Y/N). Defaults to Y.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="SpecialNote" type="SpecialNoteType" xdb:SQLName="SPECIAL_NOTE"/>
                   <xs:element name="InWeb" xdb:SQLName="IN_WEB" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Should this Unit Set appear on the web.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Desc" type="DescType" xdb:SQLName="DESCRIPTION" xdb:SQLType="CLOB">
                        <xs:annotation>
                             <xs:documentation>Short description of Unit content</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="Staff" xdb:SQLName="STAFF" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Staff teaching this unit.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="TeachPattern" type="TeachPatternType" xdb:SQLName="TEACHING_PATTERN">
                        <xs:annotation>
                             <xs:documentation>Number of lectures , tutorials, laboratories and workshops</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="Requisites" type="RequisitesType" xdb:SQLName="REQUISITES"/>
                   <xs:element name="Assess" type="AssessType" xdb:SQLName="ASSESSMENT">
                        <xs:annotation>
                             <xs:documentation>Mode of assessment and percentages</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="BAMajors" type="BAMajorsType" minOccurs="0" xdb:SQLName="BA_MAJORS"/>
                   <xs:element name="RequiredTexts" type="RequiredTextsType" xdb:SQLName="REQUIRED_TEXTS"/>
                   <xs:element name="RecommendedTexts" type="RecommendedTextsType" xdb:SQLName="RECOMMENDED_TEXTS"/>
                   <xs:element name="OfferedInCourses" type="OfferedInCoursesType" xdb:SQLName="OFFERED_IN_COURSES"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    Trigger
    ========
    CREATE OR REPLACE TRIGGER CU_UNITSETYR_XML_AUDR_TRG
    AFTER DELETE OR UPDATE
    ON CU_UNIT_SET_YEARS_XML
    FOR EACH ROW
    DECLARE
    v_user VARCHAR2(30);
    v_old_xml_doc xmltype;
    v_new_xml_doc xmltype;
    v_old_unitset_id cu_unit_sets.unitset_id%TYPE;
    v_old_offered VARCHAR2(1);
    v_new_offered VARCHAR2(1);
    v_old_inweb VARCHAR2(1);
    v_new_inweb VARCHAR2(1);
    v_old_title VARCHAR2(100);
    v_new_title VARCHAR2(100);
    v_old_staff VARCHAR2(500);
    v_new_staff VARCHAR2(500);
    v_old_special_note xmltype;
    v_new_special_note xmltype;
    v_old_unit_desc xmltype;
    v_new_unit_desc xmltype;
    v_old_teach_pattern xmltype;
    v_new_teach_pattern xmltype;
    v_old_assess xmltype;
    v_new_assess xmltype;
    v_old_offered_in_courses xmltype;
    v_new_offered_in_courses xmltype;
    v_old_BA_Majors xmltype;
    v_new_BA_Majors xmltype;
    v_old_req_texts xmltype;
    v_new_req_texts xmltype;
    v_old_reco_texts xmltype;
    v_new_reco_texts xmltype;
    v_old_year INTEGER;
    v_mod_type VARCHAR2(1);
    BEGIN
    -- Establish the username from the CUM_PORTAL_APP context
    v_user := sys_context('CUM_PORTAL_APP','CURRENT_USER');
    IF (v_user IS NULL) THEN
    -- Means that CUM Portal App did not make the change
    v_user := USER;
    END IF;
    -- Determine modification type
    IF (updating) THEN
    v_mod_type := 'U';
    ELSIF (deleting) THEN
    v_mod_type := 'D';
    END IF;
    v_old_xml_doc := :OLD.sys_nc_rowinfo$;
    v_new_xml_doc := :NEW.sys_nc_rowinfo$;
    SELECT extractvalue(v_old_xml_doc, '/UnitSetYear/UnitSetID'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Year'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Offered'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/Offered'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/UnitSetTitle'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/UnitSetTitle'),
    extract(v_old_xml_doc, '/UnitSetYear/SpecialNote'),
    extract(v_new_xml_doc, '/UnitSetYear/SpecialNote'),
    extract(v_old_xml_doc, '/UnitSetYear/Desc'),
    extract(v_new_xml_doc, '/UnitSetYear/Desc'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Staff'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/Staff'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/InWeb'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/InWeb'),
    extract(v_old_xml_doc, '/UnitSetYear/TeachPattern'),
    extract(v_new_xml_doc, '/UnitSetYear/TeachPattern'),
    extract(v_old_xml_doc, '/UnitSetYear/Assess'),
    extract(v_new_xml_doc, '/UnitSetYear/Assess'),
    extract(v_old_xml_doc, '/UnitSetYear/OfferedInCourses'),
    extract(v_new_xml_doc, '/UnitSetYear/OfferedInCourses'),
    extract(v_old_xml_doc, '/UnitSetYear/BAMajors'),
    extract(v_new_xml_doc, '/UnitSetYear/BAMajors'),
    extract(v_old_xml_doc, '/UnitSetYear/RequiredTexts'),
    extract(v_new_xml_doc, '/UnitSetYear/RequiredTexts'),
    extract(v_old_xml_doc, '/UnitSetYear/RecommendedTexts'),
    extract(v_new_xml_doc, '/UnitSetYear/RecommendedTexts')
    INTO v_old_unitset_id,
    v_old_year,
    v_old_offered,
    v_new_offered,
    v_old_title,
    v_new_title,
    v_old_special_note,
    v_new_special_note,
    v_old_unit_desc,
    v_new_unit_desc,
    v_old_staff,
    v_new_staff,
    v_old_inweb,
    v_new_inweb,
    v_old_teach_pattern,
    v_new_teach_pattern,
    v_old_assess,
    v_new_assess,
    v_old_offered_in_courses,
    v_new_offered_in_courses,
    v_old_BA_Majors,
    v_new_BA_Majors,
    v_old_req_texts,
    v_new_req_texts,
    v_old_reco_texts,
    v_new_reco_texts
    FROM dual;
    IF (v_old_unitset_id IS NOT NULL AND v_old_year IS NOT NULL) THEN
    -- Had to do this to avoid problems with create resource statement which on insert appears
    -- to manifest itself as an update of a null document????
    IF (updating OR deleting) THEN
    -- Audit the XML document
    INSERT INTO cu_unit_set_years_xml_audit
    (unitset_id, YEAR, xml_doc, mod_type, mod_by, mod_date)
    VALUES
    (v_old_unitset_id,
    v_old_year,
    v_old_xml_doc.getclobval(), -- convert to clob
    v_mod_type,
    USER,
    SYSDATE);
    END IF;
    IF (updating AND v_old_offered != v_new_offered) THEN
    cu_events_pkg.log_event(p_event_type => 'USOFF',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Offered">'||v_old_offered||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_inweb != v_new_inweb) THEN
    cu_events_pkg.log_event(p_event_type => 'USINWEB',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Publish on Web">'||v_old_inweb||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_title != v_new_title) THEN
    cu_events_pkg.log_event(p_event_type => 'USTIT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="UnitSet Title">'||v_old_title||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_special_note.getClobVal() != v_new_special_note.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USSPECN',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Special Note">'||NVL(v_old_special_note.getStringVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_unit_desc.getClobVal() != v_new_unit_desc.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USDESC',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Description">'||NVL(v_old_unit_desc.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_staff != v_new_staff) THEN
    cu_events_pkg.log_event(p_event_type => 'USSTAFF',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Staff">'||NVL(v_old_staff,'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_teach_pattern.getClobVal() != v_new_teach_pattern.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USTEACHP',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Teaching Pattern">'||NVL(v_old_teach_pattern.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_assess.getClobVal() != v_new_assess.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USASSESS',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Asessment">'||NVL(v_old_assess.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_offered_in_courses.getStringVal() != v_new_offered_in_courses.getStringVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USOFFCRS',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Offered in Courses">'||NVL(v_old_offered_in_courses.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND ((v_old_BA_Majors IS NULL) OR (v_old_BA_Majors.getStringVal() != v_new_BA_Majors.getStringVal()))) THEN
    -- Special Treatment here because the BAMajors tag is optional.
    -- If missing this causes an error with the getClobVal() method.
    IF (v_old_BA_Majors IS NULL) THEN
    cu_events_pkg.log_event(p_event_type => 'USBAMAJ',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="BAMajors">NULL</Col>
    </Row>
    </RowSet>'));
    ELSE
    cu_events_pkg.log_event(p_event_type => 'USBAMAJ',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="BAMajors">' || v_old_BA_Majors.getStringVal() ||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    END IF;
    IF (updating AND v_old_req_texts.getClobVal() != v_new_req_texts.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USREQTXT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Required Texts">'||NVL(v_old_req_texts.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_reco_texts.getClobVal() != v_new_reco_texts.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USRECOTXT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Recommended Texts">'||NVL(v_old_reco_texts.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    END IF;
    END;

    Be aware that you could also do an ALTER SESSION instead of a ALTER SYSTEM. This would prevent to shutdown the database to make the change, within the session, active.
    M

  • ColdFusion 11: cfclient in the context of the CFML language, not the tooling

    G'day:
    I am reposting this from my blog ("ColdFusion 11: <cfclient> in the context of the CFML language, not the tooling") at the suggestion of Adobe support:
    @dacCfml @ColdFusion Can you post your queries at http://t.co/8UF4uCajTC for all cfclient and mobile queries.— Anit Kumar Panda (@anitkumar85) April 29, 2014
    I have edited this in places to remove language that will be deemed inappropriate by the censors here. Changes I have made are in [square brackets]. The forums software here has broken some of the styling, but so be it. There is worthwhile discussion in the comments of the article on my blog: perhaps go have a read.
    G'day:
    This article could end up being a complete waste of space, as I am operating under more real-world re-interpretation of the raison d'être of <cfclient>, as described by Ram:
    ColdFusion [11] has added support for client side CFML (<cfclient>) and this code is translated to JavaScript
    Mike Henke has pointed out that the first part of this "CF11 has added support for client-side CFML" is actually ******** (my wording, not his):
    "ColdFusion Splendor has added support for client side CFML" is probably phrased wrong and gave me flash backs to VBScript or CFML running in the client browser.
    Maybe this is better verbiage. "ColdFusion Splendor has added support for CFML to generate JS".
    Because... there's not such thing as "client-side CFML". That would imply CFML actually running on the client (ie: the browser, or the mobile device, as is the target of <cfclient> as a concept). This is absolutely not true. I know Ram went on to qualify what he meant there, but the messaging from Adobe on <cfclient> has been inaccurate. Possibly I think to the point of actual misrepresentation (in the legal sense, I mean).
    What <cfclient> does is... convert CFML code to JavaScript. So let's look at that idea.
    Why I say this article could be a complete waste of space is that I dunno if this is the intent of <cfclient>; because, really, the messaging from Adobe as to what <cfclient> is for is very muddied. In general the narrative about it is bundled-in with various features of ColdFusion Builder 3.0, in regards to mobile application creation and packaging (and debugging, and all sort of stuff that sounds quite nice but I don't care about as I don't use CFB).
    However <cfclient> has to stand on its own merit in the CFML language, completely decoupled from CFB features. And as far as I can tell, Mike is right: as far as CFML goes, <cfclient> is a tag which tells ColdFusion to - instead of compiling to byte code - compiles the enclosed CFML code to JavaScript instead.
    This of course just sets my alarm klaxons going.  Because Adobe are (I choose my words carefully) [not very good] at converting CFML to client-side code. This has been borne out by <cfform>, <cflayout>, <cfpod> etc. Back in the days of CFMX7 the "CFML-to-client-side" wizards had some merit, because the client-side arena was still immature, and the team at Macromedia actually had some exposure to the idea of "website development", so they knew where the pain points were that they could possible ameliorate. Times have changed, and the client-side of things is probably now more mature an environment than CFML is - Javascript is probably are more coherent language than CFML is, now - and it is very very very clear that the current Adobe ColdFusion Team don't know the first thing about web development (they can't even write decent CFML for their own documentation, before we get onto how they'd be doing web work!), so they are completely out of their depth when it comes to addressing pain points that web devs might have these days. Not only have they not walked a mile in a web dev's shoes, they don't even - as far as I can tell - know what shoes are, or why someone would be wearing them.
    And <cfclient> is a far more "meta" solution than <cfform> or <cfpod> were... at least the CFML-to-client-side solution there had a tangible target in mind. <cfclient> has removed the targets, and is just a tag designed for converting general CFML to general JS. Yikes.
    600-odd words in, here's some code. This is the first-ever code I have written using <cfclient>:
    <cfclient> <cfset msg = "G'day World"> <cfoutput>#message#</cfoutput> </cfclient>
    So I'm off to a false start: I admit I'm sitting in the pub and I've had a few pints (probably four, I guess; this is "having some drinks before deciding to actually drink this evening" sort of level for me), and I inadvertently [messed-up] my variable names here. And this did not yield a compile error. The error just fell through to JS, where it did error
    Uncaught ReferenceError: message is not defined gdayWorld.cfm:4
    If, in contrast, I tried this in CoffeeScript, I'd get this:
    coffee> msg = "G'day world"
    'G\'day world'
    coffee> alert msg
    undefined
    coffee>
    alert message
    ReferenceError: message is not defined
        at eval (eval at  (http://larryng.github.io/coffeescript-repl/js/main.js:96:26), :1:9)
    Important note: I know nothing about CoffeeScript - it seems like a solution to a non-existent problem to me - so I just googled "hello world coffeescript" and REPLed the code on http://larryng.github.io/coffeescript-repl/.
    The point is here is that ColdFusion, during the "compile" process should actually notice I am referencing a variable that doesn't exist. I'm OK with this being a runtime error in the normal CFML-compile process, because there could be many moving parts (and other files) involved in the runtime environment, but I don't think this is a valid notion with <cfclient>? Or maybe it is?
    Update:As Ray points out and Aaron agrees with below: I was being unduly harsh here... it's entirely reasonable for variables to be declared in other JS code elsewhere in the response.
    Anyway, once I actually write my code properly, I get this:
    G'day World
    On the screen. What CF actually sends back in the response is this:
    <script type="text/javascript" src="/CFIDE/cfclient/cfclient_main.js"></script> <script type="text/javascript" src="/CFIDE/cfclient/cffunctions.js"></script> <meta name="viewport" content="width=device-width"> <script type='text/javascript'>globalDivStruct=null;var _$gdayWorld_func=function(){var self=this;var variables={};self.__init=function(){var localdivstruct=globalDivStruct;var __output_var="";var tmpVarArray={};message="G'day World";localdivstruct.outputvar+=message;return""}}; function __startPage__$gdayWorld(){document.write("\x3cdiv id\x3d'__cfclient_0'\x3e\x3c/div\x3e");window.ispgbuild=false;var clientDivStruct={divId:"__cfclient_0",outputvar:""};globalDivStruct=clientDivStruct;try{_$gdayWorld=new _$gdayWorld_func;_$gdayWorld.__init()}catch(__eArg){if(__eArg!=="$$$cfclient_abort$$$")throw __eArg;}__$cf.__flush(clientDivStruct)}__startPage__$gdayWorld(); </script>
    [Blimey]. To output a string variable? Really? That's what you compile my CFML down to?
    Gobsmacked.
    And [forget] emotive things like "gobsmacked"... if one looks at the size of the response, it's 128kB to represent "G'day World" on the screen. 128kB might not be a great deal these days when it comes to a web page, but when it comes to rendering "G'day world", it's lunacy. And on a mobile phone - which intrinsically might be in an area in which one is paying a premium for data - it's just irresponsible. This is before we get to the point that it seriously should not take 128kB of data to render 11 bytes.
    Blimey. To be honest I was gonna try some more tricky CFML and see how it compiled, but I've run out of will to live (and I have to concede the beer is getting the better of me, and my laptop battery is almost dead). I'll continue this, but I will let this article stand or fall on its own merit; something <cfclient> certainly seems to be unable to do, thusfar.
    I'll be back on the case with this tomorrow.
    Adam

    The functions defined in the cffunctions.js are not namespaced. If it is namespaced, you would have to add the namespace while using a function inside cfclient.
    These functions are not namespaced, so that you can use the same syntax for using a function inside and outside the cfclient block.
    This is indicative of everyone's concern that you guys would just implement / encourage poor practice in your <cfclient> implementation.
    How is it - given you're "compiling" the CFML anyway - you cannot translate source code that says "listlen()" into "compiled" JS that is CF.listLen() or something? Thus good CFML can be translated into good JS.
    You seem to think that there's a one-to-one mapping between what the CFML says and what the resultant JS needs to be.
    You've basically written a mechanism for a CFML developer to write bad JavaScript.
    Well done.
    Adam

Maybe you are looking for