Welcome Guest, Not a member yet? Register   Sign In
Could I use the model in the view? Who can help me?
#9

[eluser]xwero[/eluser]
It's not an issue i agree but i just wanted to show which consequences the 'Both the controller and the view have equal opportunity to access the model' theory has.

According to me equal opportunity includes loading a model in the view, but if i misinterpreted it please let me understand the meaning of the sentence.

if in your view you do something like this
Code:
$data = $this->model->getformdata();
You will have to add some kind of check if the validation returns errors
Code:
$data = (is_empty($this->validation->error_string))? $this->model->getformdata():$_POST;


Messages In This Thread
Could I use the model in the view? Who can help me? - by El Forum - 11-22-2007, 07:12 PM
Could I use the model in the view? Who can help me? - by El Forum - 11-22-2007, 07:28 PM
Could I use the model in the view? Who can help me? - by El Forum - 11-22-2007, 07:56 PM
Could I use the model in the view? Who can help me? - by El Forum - 11-22-2007, 08:35 PM
Could I use the model in the view? Who can help me? - by El Forum - 11-23-2007, 01:22 AM
Could I use the model in the view? Who can help me? - by El Forum - 11-23-2007, 01:31 AM
Could I use the model in the view? Who can help me? - by El Forum - 11-23-2007, 02:24 AM
Could I use the model in the view? Who can help me? - by El Forum - 11-23-2007, 02:56 AM
Could I use the model in the view? Who can help me? - by El Forum - 11-23-2007, 03:22 AM
Could I use the model in the view? Who can help me? - by El Forum - 11-23-2007, 03:35 AM
Could I use the model in the view? Who can help me? - by El Forum - 12-03-2007, 09:56 PM
Could I use the model in the view? Who can help me? - by El Forum - 12-03-2007, 11:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB