Ok, can't figure if it's wrong or not, so I'm gonna ask the question
here:

I made a new fckEditor helper to handle some problematic of our own.
The thing it does is that it instantiate an fckEditor named after the
field like any other cake field (data[model][field]).

So we got a display function like this to create our fckEditor field
public function display($instance_name = '', $default_value = '',....)

which we call in the form like this
echo $fckeditor->display('model.field',$text,...)

My difficulties come to setting the value, first way we made this work
was like this (in the helper):
$this->_o_EditorInstance->Value = $text; //set the value in the
textarea of the fckeditor

and then in the controller:
set($text, $this->data['model']['field']);

All of this is working well, but I don't like the idea of having to
set my value any time I got a fckEditor in a form for a field which is
for me like any other. So what I noticed is that I was able to access
directly $this->data['model']['field'] in my view or my helper which
gets me to :

$this->_o_EditorInstance->Value = $this->data['model']['field']; //I'm
here in the helper

I got ride off my $text, It's working well, I'm happy, but I'm afraid
I'm going against the way cake works. And anyway it bother me, what
would be wrong about accessing directly $this->data in a view, when it
has been properly and cleanly set in the controller (As long as we
only read values of our form from $this->data, as probably cake reads
the data to set the value for a standard input).

Hopes it’s clear enough. Thx for your help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to