Never found any great docs on it...
Instantiate an Iterator and pass it to this custom tag. read some of the
metadata on it.
http://ajlcom.instantspot.com/blog/index.cfm/2006/5/12/Document-Your-ObjectsDynamically
On 12/7/06, Derek Perez <[EMAIL PROTECTED]> wrote:
Thanks Aaron,
do you have any idea where I could read about the Iterator objects? I
haven't found any good resouces for using those...I don't really know much
about them at all!
Thanks!
- Derek
PS: Someone ought to write a nice article or something about iterators :)
On Thu, 7 Dec 2006 15:40:48 -0600, "Aaron Lynch" <[EMAIL PROTECTED]> said:
loop over something like this for x number of permissions you want to
add...
NewRole = User.getPermissionIterator().add();
NewRole.setValue();
NewRole.setSomeOtherValue();
for each new role, then do
User.Save()
I think that is what you need.
On 12/7/06, Teddy Payne <[EMAIL PROTECTED] > wrote:
>
> My first thought was that you just create one record object for the
> permission table. If you know the userID, you load up the permission record
> and then save the record. I believe there is a method on the record object
> that clears out the data. So in essence, you just loop over the array, load
> the reocrd object up and save them and then at the end of the loop you clean
> up the record object.
>
> This really prevents create anymore than one record object for the
> permissions table.
>
> Teddy
>
> On 12/7/06, Derek Perez <[EMAIL PROTECTED] > wrote:
> >
> > Hey everyone,
> >
> > hope you all are having a productive week. I am in the process of
> > writing a user account system with reactor....and I am somewhat stuck on a
> > conceptual level of how I should accomplish this task. I have a "user"
> > table, a "permission" table, and a "userPermissionJoin" table. There is a
> > list of permissions that a user from the user table can have from the
> > permissions table (thus the need for the userPermissionJoin table). Hope
> > that makes sense...so heres the issue:
> >
> > I saw the documentation on how to add:
> >
> > <!--- create a customerRecord --->
> > <cfset CustomerRecord = Reactor.createRecord("Customer") />
> >
> > <!--- get the user record's address --->
> > <cfset AddressRecord = CustomerRecord.getAddress() />
> >
> > <!--- populate the customer and address --->
> > <cfset CustomerRecord.setUsername("jblow") />
> > <cfset CustomerRecord.setPassword ("9ummy") />
> > <cfset CustomerRecord.setFirstName("Joe") />
> > <cfset CustomerRecord.setLastName("Blow") />
> >
> > <cfset AddressRecord.setStreet1("1234 Left Turn Ln.") />
> > <cfset AddressRecord.setCity("Albuquerque") />
> > <cfset AddressRecord.setState("New Mexico") />
> > <cfset AddressRecord.setZip("87112") />
> >
> > <!--- save the customer and address! --->
> > <cfset CustomerRecord.save() />
> >
> > okay fine and good, but what happens if I have a list or an array of
> > permission ID's that I need to have appended to a single user record? can
> > someone help me try to understand what the best method of handling this is?
> > Thanks so much for your help!! have a great day!
> >
> > - Derek
> >
> >
> > --
> > Derek Perez
> > [EMAIL PROTECTED]
> >
> >
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > -- -- -- --
> > Reactor for ColdFusion Mailing List
> > [email protected]
> > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > -- -- -- --
>
>
>
>
> --
> <cf_payne />
> Adobe Certified ColdFusion MX 7 Developer
> Atlanta CFUG (ACFUG): http://www.acfug.org
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- --
> Reactor for ColdFusion Mailing List
> [email protected]
> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- --
>
--
Aaron Lynch
www.AaronJLynch.com
www.WorldWildWeb.biz
www.InstantSpot.com
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
--
Derek Perez
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
--
Aaron Lynch
www.AaronJLynch.com
www.WorldWildWeb.biz
www.InstantSpot.com
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --