Skip to main content
vksrinu
Inspiring
August 3, 2011
Question

undefined in a Java object of type class coldfusion.filter.FormScope

  • August 3, 2011
  • 2 replies
  • 3519 views

I have CF 5 version application and planning for migration to  CF9. when i was testing the application in CF9 i am getting the below error. the application is working fine in CF5. i have dynamic form variables and i am trying to evaluate them using the evaluate function, but i am getting the below error. when i am dump the form variable i can see the variable "QTY_CAXOARW125WU41C" in it with the some value.

<cfset AddedProduct.quantity = Evaluate("Form.qty_" & "#Replace(child_sku,"-","_","ALL")#")>

Element QTY_CAXOARW125WU41C is undefined in a Java object of type class  coldfusion.filter.FormScope.

can you please let me know how to fix this issue. i tried with the below code also still same error.

form["QTY_#child_sku#"]

    This topic has been closed for replies.

    2 replies

    vksrinu
    vksrinuAuthor
    Inspiring
    August 5, 2011

    in CF9 i was getting the spaces in the query, i used trim to remove them, its working fine now.

    In CF5 it does not has this issue.,

    Inspiring
    August 3, 2011

    What happens when you do this?

    <cfdump var="#form.QTY_CAXOARW125WU41C#">

    or this

    <cfdump var="#form['QTY_CAXOARW125WU41C']#">

    vksrinu
    vksrinuAuthor
    Inspiring
    August 4, 2011

    when i say the below stmt:
    <cfdump var="#form.QTY_CAXOARW125WU41C#">
    Element not found error.
    when i say the below stmt:
    <cfdump var="#form['QTY_CAXOARW125WU41C']#">
    Element QTY_CAXOARW125WU41C is undefined in a Java object of type class coldfusion.filter.FormScope.
    Srinivas

    Inspiring
    August 4, 2011

    Something does not add up. What are the results of .. ?

    <cfset testKey = "QTY_CAXOARW125WU41C">
    <cfoutput>
        structKeyExists URL = #structKeyExists(URL, testKey)#<br>
        structKeyExists FORM = #structKeyExists(FORM, testKey)#<br>
        listFindNoCase = #listFindNoCase(FORM.fieldNames, testKey)#<br>
    </cfoutput>
    <cfdump var="#FORM.fieldNames#">

    Message was edited by: -==cfSearching==-