Work around for Application.cfc

I have an Application.cfc file that outputs a header and footer page for every request.  That works wonderful but if I try to open a page that is doing a <cfgrid> using a CFC file than I get an error of "Error invoking CFC /GATS/CFC/purchaseOrder.cfc : Internal Server Error [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]" when opening the page.
Commenting out the header/footer include in the Application.cfc file lets the <cfgrid> populate with the CFC file.  Is there a fix or work around for this?
Application.cfc file
<cfcomponent output="false">
<cffunction name="onRequestStart" returnType="boolean" output="true">
      <cfargument name="thePage" type="string" required="yes">
     <cfset PageName = GetFileFromPath(thePage)>
    <cfif not IsDefined("session.user.isAuthenticated") or
          session.user.isAuthenticated equal session.no>
      <cfif FindNoCase('index.cfm', PageName) is not 0>
        <cfelse>
          <cfset session.messages[1] = "Authentication required.">
          <cflocation url="#application.WebAddress#" addtoken="no">
      </cfif>
    </cfif>
    <cfif FindNoCase('index.cfm', PageName) is not 0>
      <cfset request.PageNavigation = "">
      <cfset request.Screen = "Login">
    </cfif>
    <cfif FindNoCase('mainMenu.cfm', PageName) is not 0>
      <cfset request.PageNavigation = "Home">
      <cfset request.Screen = "">
    </cfif>
    <cfif FindNoCase('purchaseOrder.cfm', PageName) is not 0>
      <cfset request.PageNavigation = '<a href="mainMenu.cfm">Home</a> &##8226; New Purchase Order'>
      <cfset request.Screen = "">
    </cfif>
    <cfif FindNoCase('logout.cfm', PageName) is not 0>
      <cfelse>
        <cfinclude template="includes/header.cfm">
    </cfif>
    <cfreturn true>
  </cffunction>
<cffunction name="onRequestEnd" returnType="void" output="true">
      <cfargument name="thePage" type="string" required="yes">
    <cfset PageName = GetFileFromPath(thePage)>
    <cfif FindNoCase('logout.cfm', PageName) is not 0>
      <cfelse>
        <cfinclude template="includes/footer.cfm">
    </cfif>
  </cffunction>
</cfcomponent>
purchaseOrder.cfm
<cfgrid name="AccountGrid" format="html" bind="cfc:GATS.CFC.purchaseOrder.GetQuantities({cfgridpage},{cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdirection})">
  <cfgridcolumn name="ID" header="ID" display="yes">
  <cfgridcolumn name="vendor_name" header="Name" display="yes">
</cfgrid>
I found this on the web:
That error is due to our application.cfm having a single HTML comment at the
start of the file. Apparently if your Application.cfm or Application.cfc file
outputs ANYTHING, binds to CFCs with AJAX (via HTML CFGRID or CFAJAXPROXY, for
example) do not work. The CFC will be called, but the data from it will never
"flow" into the CFGRID. Removing the comment from the Application.cfm file took
care of our CFGRID issue.
This there a way to have an Application.cfc file that displays a header and footer for every page and have and
have a page have a <cfgrid> in it?

BKBK,
I created the examples you posted and commenting out the header/footer lines in my Application.cfc displayed the cfgrid results (updating the query to a table I had).  Running the same example code with the header/footer included in the Application.cfc would not show the cfgrid results.
I attached the Application.cfc file for review.
Couldn't attach the file.
Application.cfc
<cfcomponent output="yes">
  <cfset this.name = "GATS">
  <cfset this.clientmanagement = "true">
  <cfset this.applicationtimeout = CreateTimeSpan("0","0","20","0")>
  <cfset this.sessionmanagement = "true">
  <cfset this.sessiontimeout = CreateTimeSpan("0","0","20","0")>
  <cfset this.scriptProtect = "true">
  <cfparam name="session.yes" default="Yes">
  <cfparam name="session.no" default="No">
  <cffunction name="onApplicationStart" returnType="boolean" output="no">
    <cfset application.Directory = "/GATS/">
    <cfset application.Datasource = "IA-webapplications">
    <cfset application.DatasourceGATS = "SBS-GATS">
    <cfreturn true>
  </cffunction>
  <cffunction name="onApplicationEnd" returntype="void" output="no">
    <cfargument name="ApplicationScope" required="yes" />
  </cffunction>
  <cffunction name="onSessionStart" returntype="void" output="no">
    <cflock scope="session" timeout="5" type="exclusive">
      <cfset session.no = "No">
      <cfset session.yes = "Yes">
      <cfset session.new = "New">
      <cfset session.user = StructNew()>
      <cfset session.user.isAuthenticated = session.no>
      <cfset session.user.emplid = ""> 
      <cfset session.user.userSSOId = "">
      <cfset session.user.firstName = "">
      <cfset session.user.lastName = "">
      <cfset session.user.name = "">
      <cfset session.messages = ArrayNew(1)>
      <cfset session.savedInputValues = ArrayNew(1)>
      <cfset session.filesTransferred = "">
    </cflock>
  </cffunction>
  <cffunction name="onSessionEnd" returntype="void" output="no">
    <cfargument name="SessionScope" required="yes">
    <cflock scope="session" timeout="5" type="exclusive">
      <cfset Arguments.SessionScope.user.isAuthenticated = session.no>
      <cfset Arguments.SessionScope.users.emplid = ""> 
      <cfset Arguments.SessionScope.user.userSSOId = "">
      <cfset Arguments.SessionScope.user.firstName = "">
      <cfset Arguments.SessionScope.user.lastName = "">
      <cfset Arguments.SessionScope.user.name = "">
    </cflock>
  </cffunction>
  <cffunction name="onRequestStart" returntype="void" output="yes">
    <cfargument type="String" name="TargetPage" required="yes">
    <cfset PageName = GetFileFromPath(TargetPage)>
    <cfif not IsDefined("session.user.isAuthenticated") or
          session.user.isAuthenticated equal session.no>
      <cfif FindNoCase('index.cfm', PageName) is not 0>
        <cfelse>
          <cfset session.messages[1] = "Authentication required.">
          <cflocation url="#application.WebAddress#" addtoken="no">
      </cfif>
    </cfif>
    <cfif FindNoCase('index.cfm', PageName) is not 0>
      <cfset request.PageNavigation = "">
      <cfset request.Screen = "Login">
    </cfif>
    <cfif FindNoCase('mainMenu.cfm', PageName) is not 0>
      <cfset request.PageNavigation = "Home">
      <cfset request.Screen = "">
    </cfif>
    <cfif FindNoCase('purchaseOrder.cfm', PageName) is not 0>
      <cfset request.PageNavigation = '<a href="mainMenu.cfm">Home</a> &##8226; New Purchase Order'>
      <cfset request.Screen = "">
    </cfif>
    <cfif FindNoCase('logout.cfm', PageName) is not 0>
      <cfelse>
        <cfinclude template="includes/header.cfm">
    </cfif>
  </cffunction>
  <cffunction name="onRequestEnd" returntype="void" output="yes">
    <cfargument type="String" name="TargetPage" required="yes">
    <cfset PageName = GetFileFromPath(TargetPage)>
    <cfif FindNoCase('logout.cfm', PageName) is not 0>
      <cfelse>
        <cfinclude template="includes/footer.cfm">
    </cfif>
    <cfif FindNoCase('sessionTerminated.cfm', PageName) is not 0>
      <cfinvoke method="onSessionEnd">
        <cfinvokeargument name="SessionScope" value="#session#">
      </cfinvoke>
    </cfif>
  </cffunction>
  <cffunction name="onError" returnType="void" output="no">
    <cfargument name="exception" required="true">
    <cfargument name="eventName" type="string" required="true">
    <cfthrow object="#arguments.exception#">       
  </cffunction>
</cfcomponent>

Similar Messages

  • Got error message with web based application that it would only work on MS Explorer 6.0 or newer. Any work around for this?

    When accessing a web based program I got a message that it could only be accessed using MS Explorer 6.0 or newer. Is there a work around for this?

    There is a way to do this.
    But it works or not, I have no idea.
    Enable  "Develop menu".
    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    Develop menu will appear in the Safari menu bar.
    Click the Develop menu and select "User Agent"
    There are choices. Do not forget to make Safari default again afterwards.

  • Work around for deprecated getIds() and getSession()

    Hi All,
    As getIds() and getSession() methods of HTTPSessionContext are deprecated I need to know some work around for them. Can anyone please help me out ?
    My problem is as follows -
    My application has users who can have more than one login till a maximum number. After that maximum number is reached, if same user tries to make another login system will only allow him/her to make it after removing all of his/her previous logins. As a part of that, system should also delete all the sessions associated with those previous logins. Now the methods getIds() and getSession() being deprecated, I don't know how it can be done without going to some persistent data layer (like database).
    I'm using WebSphere application server and the solution need to be applicable even for a clustered environment (i.e. I may need to put both of my web tier and application tier in a clustered environment).
    Any help will be really appreciated.
    Regards,
    Sourav

    i don't know about handling the multi tier issue but you can easily put an instance into the ServletContext that keeps track of the associations between users and sessions and can react accordingly.
    robert

  • Work around for kindle on ipad 1

    Restored my ipad 1 and lost kindle access due to update.  Is there a work around for this?

    Not sure that you fully searched the Amazon Kindle site. They tell you how to download a 5.1.1-compatible version of the Kindle App if you have not previously done so:
    Important: iPad, iPhone and iPod touch devices with iOS 6.0 or later are able to download the latest version of the Kindle reading app. If your device is running iOS 5.0 and you previously downloaded the Kindle application using the Apple account that is associated with your device, you will have the option of downloading a version of the Kindle application that is compatible with iOS 5.0. If you've never downloaded the Kindle application using the Apple account that is associated with your device and you want to download a version that is compatible with iOS 5.0, you'll need to first get the latest available version of the application on your Apple account, using the iTunes Store from your computer.
    So, download the current Kindle version to iTunes, then, according to this paragraph, you will then have the option of downloading the 5.x compatible version. I would imagine that if you have issues getting the 5.x version after downloading the current version, you can contact Amazon support to get help. They have always been helpful for me.
    Cheers,
    GB

  • Is there a work around for my Akai Pro EIE Pro interface to work with mountain lion

    Does anyone have a work around for the Akai EIE Pro Audio interface that just stopped working after the mountain lion upgrade. Akai has no response currently.

    Yep,
    They say they're working on it.
    It ***** though
    effo

  • In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    Nic, for me the iTunes window looks like this, when I connect my iPad 3:
    I select the iPad in the "devices" section of the Sidebar (use: "View > Show Sidebar" if the sidebar is hidden).
    Click the "Apps" tab in the "Devices" pane.
    Scroll all the way down in the Devices pane to "File Sharing" "Apps" section.
    Then do I click "GarageBand" to select the documents in the right panel.
    Which part is different for you? Perhaps you could post a screenshot?
    Regards
    Léonie

  • Work around for shared calendars

    Has anyone found a work around for shared calendars yet? This has to be one of the biggest downfalls of the iPhone, along with the fact it can't search in the mail app.
    If anyone ahs found a work around I'd be very keen to here it.

    I have not used this product but it sounds like it may be able to do what you want.
    http://www.busymac.com/index.html

  • Work around for radio tuner service not working

    A work around for the lack of radio tuner service that has appearently hit Itunes versions lower than 11.
    We all hope that Apple will restore Radio Tuner Service for us legacy products users soon, but I've been thrown under the bus more than once by Apple in the last 25 yrs to put much hope in that (I started with an Apple III w/a Z80 card running C/PM, yeah I'm that old)
    Have your iTunes and your favorite browser open.
    In your browser go to http://vtuner.com/setupapp/guide/asp/BrowseStations/startpage.asp
    This will give you a list of Genre's, etc of streaming internet stations.
    When you select a genre you'll get a list of stations that shows station ID, what type of feed codec and data rate.
    Select any of the AAC or MP3 feeds.
    Select play.
    This will send a small download file to your computer containing the selected feeds URL.
    Your computer will ask what app to use to open the file, select iTunes.
    This will automatically open a file called Internet Songs at the end of Playlists in iTunes (if you don't already have one), and will install the URL there. 
    All the stations you selected will now be permanently stored in Internet Songs.
    Viola, your very own custom personal internet radio playlist!
    GT
    Dual Core 2Ghz G5, 9.22/10.4.11/10.5.8

    Apperently iTunes 11 is not affected (Apple stil makes iTunes11 for the 14 yr old Microsoft XP OS, but not for anything PPCs can run. Go figure)
    "Next door" to Steve was metaphoric, he lived in Los Altos, about 15 miles away, but he cast a big shadow!
    On 9.2.1/10.4.11 differences, some time in the past someone selected 'save file' and checked the box 'don't ask again' on your computers dialog box. That's why you're not given a choice wih the file downloads. I would think that selection should be able to be reversed.
    iTunes 9.2.1/OS10.4.11 puts those downloaded URLs into the Music Libary of iTunes, no matter if it's opened directly, or you click on the file on your desktop. You can create a new playlist, highlight the selection in the Music Libary, and drag it to your new playlist to keep alll the steaming URLs together. NOTE, this only creates an alias, the URL copied by iTunes must remain in the Music Libary. You can then delete the the files on the desktop, if you want. I did multiple stations this way in 9.2.1, they all show in either the new playlist created, or in the Music Libary, and remain after the desktop files are deleted and trash emptied.
    You can switch sations by double clicking them. Another note, all the URLs were all from vtune.
    I hope this helps.
    PS, I forgot how clunky Tiger is compared to Leopard...

  • Work Around For Numbers Crashing

    Work Around For Numbers Users:
    For those of us who have numbers and have had problems with it crashing when scrolling across sheets that have checkboxes try this:  Double select a cell, and use the expanding group to navigate the sheet.  It seems to be stable when doing this.
    3 weeks after the os8 release and still no fix for this?  Pathetic.

    If anyone has been having trouble with upgrading the domain file and iWeb crashes, here is the fix that worked for me:
    http://discussions.apple.com/message.jspa?messageID=5100025#5100025
    *MAKE SURE YOU BACKUP YOUR DOMAIN FILES FIRST!*

  • Work around for User ID 32 character limitation in CCX Agent?

    Are there any kind of creative work arounds for getting past the ridiculous 32 character limit when logging into the CCX Agent?
    We are moving toward using the User Principal Name (UPN) in CUCM LDAP which means that the domain is now tacked onto the end of their existing User IDs.  We are doing this so that users from multiple domains can authenticate to various Cisco tools and apps.  It works very well, except when firing up the Agent!
    I've already been playing around with UPN suffixes, and while I can get them to show up in CUCM (and subsequently), I can't seem to get them to authenticate.
    I shouldn't even have to get this creative, just remove the 32 character limit, Cisco!
    We are running CCX 8.5 and CUCM 8.6

    Hi ,
    I am not aware about any such workarounds.
    After referring to the below guide,
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/configuration/guide/uccx851ag.pdf
    On page 78, it is mentioned as,
    Caution : When logging into Cisco Agent Desktop, agents use the Unified CM user ID and password. While the Unified CM limits agent IDs to 128 alphanumeric characters, the Unified CCX limits agent IDs to 31 alphanumeric characters. Be sure to abide by the 31 character-limit when configuring agents in Unified CM.
    I am sure even if it works by some workarounds also, you may see some issues specially from the CAD\CSD\CDA side, which Cisco will not support it quoting the same above reason.
    Hope it helps,
    Anand
    Please Rate helpful posts !!

  • Work around for 60 column limitation

    All,
    Does anyone know of a work around for the 60 column table limitation?
    Will this be changed in a future release?
    Thank you.

    I also need a workaround for this. I have users that want to download data as excel files, and the built in export to csv was working great until the dynamic sql statement pushed itself to more then 60 columns. Is there some other way to provide a link to the data as csv? Can I hook into the csv functionality of HTML DB? Can I create a page template that modifies the Content-Disposition and/or Content-Type so the browser thinks the page is csv/excel so that I could dump out a clob of data I put together? Should I just have a button that provides a link to something outside HTML DB to query and dump data from the database?
    As it is, the users really don't need to see the data on the screen. I just need a way to dump 60+ columns of data to the user as csv.

  • Work around for Excel's array formulae?

    I have an Excel spreadsheet which I have built over many years to manage maintenance tasks of my boat. I would like to convert this to run on Numbers. Unfortunately I can't find a work-around for Excel's "Array Formulas".
    The column headers of my spreadsheet contain maintenance tasks (plus data on how frequently by days or engine hours these jobs need to done). When I complete a maintenance task, I log the date and engine hours in a new row with an "x" to signify that the job is done. Excel then looks up the date/engine hours when each job was last done (ie the lowest "x") and then uses conditional formatting to highlight the column headers of which jobs are overdue. Is there a work around for this in Numbers?
    I attach an image shot of my Excel spreadsheet which may help:

    Hi Rich,
    Some made-up dates.
    If you have multiple x's in a column, change all but the most recent to "Done" or something other than x This approach looks for the date in Column A that matches a single x in a task column.
    This example works on years. I hope you change your oil and filter more often .
    One Header Row and four Footer Rows. Enter Years between services (D9) from the keyboard.
    To find the date of the last service (the only x in Column D)
    D10 contains this formula:
    =INDEX($A,MATCH("x",D,0))
    You can Fill Right to other columns.
    "Years since" (D11) contains this formula:
    =YEAR(TODAY())-YEAR(D10)
    "Alert" (D12) contains this formula:
    =IF(D11>D9,"Hey, You!", "OK")
    Conditional Formatting in D12 sets the text to red if it equals "Hey, You!"
    It would be best to combine these steps into one complex formula. Numbers is slowed down with each Header or Footer in a Table.
    Regards,
    Ian.

  • Work around for Excel "Array Formula" in Numbers?

    I have an Excel spreadsheet which I have built over many years to manage maintenance tasks of my boat. I would like to convert this to run on Numbers. Unfortunately I can't find a work-around for Excel's "Array Formulas".
    The column headers of my spreadsheet contain maintenance tasks (plus data on how frequently by days or engine hours these jobs need to done). When I complete a maintenance task, I log the date and engine hours in a new row with an "x" to signify that the job is done. Excel then looks up the date/engine hours when each job was last done (ie the lowest "x") and then uses conditional formatting to highlight the column headers of which jobs are overdue. Is there a work around for this in Numbers?

    It not clear from your post, but I get the impression you are inquiring about Numbers for OSX. This is the iOS iWork forum. You may want to repost here: https://discussions.apple.com/community/iwork/numbers
    If I'm wrong, and you are asking about Numbers for iOS, these links may help: http://help.apple.com/numbers/ipad/2.2/#/tan5ca02385
    http://help.apple.com/functions/mac/5.0/
    But Numbers for iOS does not fully support conditional text.

  • Work Around for a Panasonic AJ-D750 deck

    I recently upgraded to FCP 5 from 4.5. Since the upgrade I can not digitize from my Panasonic AJ-D750 DVC Pro deck, RS422 connection. Does anyone know a work around for this? Any information would be great!

    Hi, I had the exact problem with a Panasonic AJD950 deck. This is the response I got from Brian Conner
    " I wonder if this is caused by the deck polling problem that FCP5 brought about. FCP5 doubled the amount of deck polling it does during pre-roll and Panasonic decks don't like that.
    A couple of my support clients use a plug-in that Aja tech support passed on to me. The plug returns polling to pre-FCP5 levels. I think the plug was written by Panasonic.
    Try contacting Panasonic tech support to see if that's the case. "
    and thankfully he saved me from another two months of capturing films in 3min segements.
    I managed to find the disable polling file from someone on another forum and I haven't had the problem since. Maybe you could try to google it, or contact Aja, otherwise, if you still can't find it, I can email it to you (as far as I am aware it works with all capture cards, we have Blackmagic).
    Dual 2GHz PowerPC G5   Mac OS X (10.4.5)   XRaid Final Cut Studio

  • Work around for unsupported OS?

    I'm rcving a message that InDesign does not support the OS that I'm using, therefore I can't download or use it. Is there a work-around for this problem?

    Hi Rachel,
    Unfortunately there are no workarounds for the product which isn't supported for an OS.
    Check the System requirements here: http://helpx.adobe.com/x-productkb/policy-pricing/system-requirements-indesign.html
    Thanks!
    Ankit

Maybe you are looking for

  • HELP ME!!!! ITUNES WONT OPEN

    I am so depressed and angry..My beloved Itunes is not opening. I get the error report: "itunes has encountered a problem and needs to shut down sorry for the inconvience" I also get this one report saying something about "a dll file cannot be found"

  • How do you import mp4s into Premiere Pro CS6?

    When attempting to import an mp4 file, I get a dialog box indicating that the import failed because the file does not contain video or audio streams. The file is undamaged, it plays fine on windows media player, both audio and video. I tried loading

  • [SOLVED] An offlineimap question

    Greetings, I am trying to set up offlineimap with a Gmail account. Due to a network issue during the initial sync, I was only able to download ~50% of the mail stored with Google (I had to SIGINT, since offlineimap didn't seem to recognize that the h

  • EBS R12 forms over Internet...???

    Hii All, Can we deploy EBS R12 forms over internet? Is it supported by oracle..? will there be any issues in accessing EBS forms through internet...? Will there be any security issues...?? Did anybody implemented this already..? or using VPN is safe.

  • Authentication and MAIL FROM header

    Hello. As I know when i authenticate to exchange, i can then send mail with any header MAIL FROM. How can I change that behaviour, so exchange force checking that MAIL FROM is equal to authenticated credentials?