Jeremy Burns
Class Outfit
jeremyburns@classoutfit.com
http://www.classoutfit.com
On 26 Aug 2010, at 00:49, jostster wrote:
> Is it just me misunderstanding what this is supposed to do or is it a
> bug?
>
> I have an Upload controller with 2 actions.
>
> index():
> This is where the database query is done to retrieve dropdown list
> values and send them to the index.ctp where the form is created.
>
> upload():
> This is where the validating is done and the uploading to the system
> is done.
>
>
> Problem:
> In upload() I have it do validation and if validation fails then it
> will do Controller::render('index'); so that it will display the form
> again with the error messages. Even though the index view is
> displayed the UploadController::Index is not run so that the values
> from the database can be retrived.
>
> Temp solution:
> What I have to do right now is before I call
> Controller::render('index'); I have to call $this->index(); so that
> the database query will be ran and the $this->set() values are created
> for the index.ctp file.
>
> My understanding of how this SHOULD work is if
> Controller::render('index') is ran then it will run the action for
> index() and then run the index view. Is this not the case?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment