User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 361,899 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,383 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 7656 | Replies: 2
Reply
Join Date: Jul 2005
Posts: 69
Reputation: bkendall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
bkendall's Avatar
bkendall bkendall is offline Offline
Junior Poster in Training

Element is undefined in a Java object of type class [Ljava.lang.String; referenced as

  #1  
Sep 20th, 2005
I am trying to debug a form that is basically a popup where the user enters a date and then two more dates are generated based off of date and the user can then edit those dates. When the user tries to save the second set of dates the "Element is undefined in a Java object of type class [Ljava.lang.String; referenced as" error is generated I am thinking this could just be a simple syntax error if that is the case here is the code for the page that has the error:

<cfif isdefined("form.txtFFFirstDate")>
<!--- used clicked save--->
	<cfset SESSION.Order.FrequentFlyer.Use = "Y">
	<cfset SESSION.Order.FrequentFlyer.UsedAtLeastOnce = "Y">
	<cfset SESSION.Order.FrequentFlyer.TargetDate = ArrayNew(1)>
	
	<cfset SESSION.Order.FrequentFlyer.TargetDate[1] = #DateFormat(form.txtFFFirstDate,"MM/DD/YYYY")#>
	<cfloop index="i" from="2" to="#SESSION.Order.FrequentFlyer.Count#">
		<cfset SESSION.Order.FrequentFlyer.TargetDate[i] = #DateFormat(form.txtFFDateSet[i],"MM/DD/YYYY")#>
	</cfloop>
</cfif>

my other idea is that the values are never being passed to this page.

<cfloop index="i" from="2" to="#SESSION.Order.FrequentFlyer.Count#">
	<tr>
		<td>
			Date <cfoutput>#i#</cfoutput>:
			<input type="text" name="txtFFDateSetMonth[<cfoutput>#i#</cfoutput>]" class="txtboxdt" maxlength="2" 
				value="<cfoutput>#Mid(DateFormat(dtTargetDate[i],"MM/DD/YYYY"),1,2)#</cfoutput>"> /
			<input type="text" name="txtFFDateSetDay[<cfoutput>#i#</cfoutput>]" class="txtboxdt" maxlength="2"
				value="<cfoutput>#Mid(DateFormat(dtTargetDate[i],"MM/DD/YYYY"),4,2)#</cfoutput>"> /
			<input type="text" name="txtFFDateSetYear[<cfoutput>#i#</cfoutput>]" class="txtboxdt" maxlength="2"
				value="<cfoutput>#Mid(DateFormat(dtTargetDate[i],"MM/DD/YYYY"),9,2)#</cfoutput>">
			<input type="hidden" name="txtFFDateSet[<cfoutput>#i#</cfoutput>]">
		</td>
	</tr>			
	</cfloop>
	<input type="hidden" name="txtFFFirstDate" value="<cfoutput>#form.txtFFDateSet#</cfoutput>">

anyway any help at all would be great
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Posts: 69
Reputation: bkendall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
bkendall's Avatar
bkendall bkendall is offline Offline
Junior Poster in Training

Re: Element is undefined in a Java object of type class [Ljava.lang.String; reference

  #2  
Sep 20th, 2005
the referring page has a loop that generate the value for the page that is getting the error and I am thinking that the value is not being passed to that page.

</tr>
   <cfloop index="i" from="2" to="#SESSION.Order.FrequentFlyer.Count#">
   <tr>
      <td>
         Date <cfoutput>#i#</cfoutput>:
         <input type="text" name="txtFFDateSetMonth[<cfoutput>#i#</cfoutput>]" class="txtboxdt" maxlength="2"
            value="<cfoutput>#Mid(DateFormat(dtTargetDate[i],"MM/DD/YYYY"),1,2)#</cfoutput>"> /
         <input type="text" name="txtFFDateSetDay[<cfoutput>#i#</cfoutput>]" class="txtboxdt" maxlength="2"
            value="<cfoutput>#Mid(DateFormat(dtTargetDate[i],"MM/DD/YYYY"),4,2)#</cfoutput>"> /
         <input type="text" name="txtFFDateSetYear[<cfoutput>#i#</cfoutput>]" class="txtboxdt" maxlength="2"
            value="<cfoutput>#Mid(DateFormat(dtTargetDate[i],"MM/DD/YYYY"),9,2)#</cfoutput>">
         <input type="hidden" name="txtFFDateSet[<cfoutput>#i#</cfoutput>]">
      </td>
   </tr>         
   </cfloop>
   <input type="hidden" name="txtFFFirstDate" value="<cfoutput>#form.txtFFDateSet#</cfoutput>">

this hidden field
<input type="hidden" name="txtFFDateSet[<cfoutput>#i#</cfoutput>]">
contains the undefined value. does it need a value (name="" value="") on the referring page and if so what should it be?

Forgive me in advance if I am not being clear, I have looked at this issue all day with no revelations.
Reply With Quote  
Join Date: Jul 2005
Posts: 69
Reputation: bkendall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
bkendall's Avatar
bkendall bkendall is offline Offline
Junior Poster in Training

Re: Element is undefined in a Java object of type class [Ljava.lang.String; referenced as

  #3  
Sep 26th, 2005
well no one responded to this post so I don't have to thank anyone but I did get it figured out and in case someone has the same trouble... I needed an eval statement in my loop so my cfset needed something like this:

<cfset tmpDate = EVALUATE("FORM.txtFFDateSet#i#")> 
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 8:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC