I think a User HABTM Group, or (if only one group per user is allowed)
Group hasMany User.
On Oct 4, 9:06 am, TGG008 <[EMAIL PROTECTED]> wrote:
> you can alseo use RequestHandel component.
>
> to do this kind of things
>
> requestAction('controller/action')
RequestHandler isn't for that. But of course you can requestAction()
in your views.
> On 10月4日, 上午2时46分, starkey <[EMAIL PROTECTED]> wrote:
>
> > Yeah, I have created a hasMany relationship in the User model to
> > Groups. Are you saying the User controller, on save(), will
> > automatically insert one or more new Groups and make the relationship
> > because of the hasMany relationship? I never considered that... So
> > on one form posting to the User controller I could have:
>
> > User Name: __________________
>
> > Select Memberships:
> > __ Group A
> > __ Group B
>
> > Add to New Group(s):
> > _________________
> > _________________
>
> > SUBMIT CANCEL
>
> > That would be great!
>
> > Thanks,
> > Shawn
>
> > On Oct 3, 2:29 pm, TGG008 <[EMAIL PROTECTED]> wrote:
>
> > > I'm thinking of it too,
>
> > > but i think you should define the relationship between the Group and
> > > User Model
>
> > > then when you create a User in the User Model ,,It'll automatically Do
> > > the associated action..
>
> > > On Oct 4, 1:56 am, starkey <[EMAIL PROTECTED]> wrote:
>
> > > > Hello, all!
>
> > > > I am trying to figure out the best practice in this situation... In
> > > > my application's setup process you create new items in a flow. For
> > > > example, they can add a new user and put that user in a new group:
>
> > > > Create User -> Create User Group
>
> > > > So I would have a User controller and a Group controller. When the
> > > > user submits the form to create a User it calls the User controller
> > > > which saves the data. Now, to automatically send the user to the
> > > > "Create Group" page should I use $this->redirect('/Group/add')?
>
> > > > I can't really think of a better way...
>
> > > > Thanks,
> > > > Shawn- 隐藏被引用文字 -
>
> > - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---