ArrayAppend does not return the array - it returns "True, on
successful completion."

(http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000381.htm)

So:

<cfparam name="session.pageList" default="#arrayNew(1)#" />
<cfset arrayAppend( session.pageList, structNew() ) />
... etc.


Dominic

> <!--- Set up a variable to hold the array position that we're inserting into. 
> --->
> <cfset NumberPage = arraylen(session.PageList)>
> <!--- Populate the new structure with the item information passed from the 
> form. --->
> <cfset session.cart[NumberPage].PageListInfo = session.page>
>
> <cfloop index="NumberPage" from=1 to="#arraylen(sesson.item)#">
> <cfset session.item[NumberPage].PageListInfo = session.page>
> </cfloop>

2009/3/11 Priya Koya <priya23...@gmail.com>:
>
> I am trying to add my Pagelist to the array .. using structure. I am using 
> structure to add everytime pagelist to an array so that I can display my list 
> of pages updated or inserted on every user session. This is wat I am using...
>
> <cfparam name="session.pageList" default="arrayNew()">
> <!--- Append a new element to the array.  This element is a new structure. 
> --->
> <cfset session.pageList = arrayAppend( session.pageList, structNew() )>
> <!--- Set up a variable to hold the array position that we're inserting into. 
> --->
> <cfset NumberPage = arraylen(session.PageList)>
> <!--- Populate the new structure with the item information passed from the 
> form. --->
> <cfset session.cart[NumberPage].PageListInfo = session.page>
>
> <cfloop index="NumberPage" from=1 to="#arraylen(sesson.item)#">
> <cfset session.item[NumberPage].PageListInfo = session.page>
> </cfloop>
>
> I get an error:
> Object of type class java.lang.String cannot be used as an array ....
>
> Can anyone Help with this ....
>
> Thanks,
> Priya
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320352
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to