Help please! Enumerated fields do not seem to work in admin scaffold view in CakePHP 1.2...

2007-10-23 Thread Olaf Greve

Hi,

Last week I gave CakePHP a first try, and then went for the stable  
1.17 release. I created some tables, some scaffolded views, and as  
far as I remember, the enumerated DB fields all showed proper select  
fields in the edit screens.

Now, I've upgraded to the yesterday's 1.2 alpha (marked as pre-beta)  
release, in order to be able to easily enable the $scaffold =   
'admin'; trick, as I have only today left to come up with a  
(scaffolded) back-office for a prototype application. However... I  
now run into a very weird situation, in the respect that the  
scaffolding doesn't pick up my enumerated fields anymore in the edit  
view. For some reason, these fields display as normal input fields,  
but nothing can be selected/entered in them.

Googling on this issue has not yet lead me to an answer. Does anyone  
know how I can enable such scaffolded select fields with the  
enumerated values in the edit view?
 From a code point of view converting enum DB fields to HTML select  
fields is not so difficult to achieve, and I have done so previously  
too. If for some reason it is absolutely impossible to enable  
properly scaffolded enum select fields in CakePHP 1.2, can anyone  
tell me how I could best go about sticking in my own code in the  
scaffold controller?

I really hope someone has a (quick and easy) solution for this, as  
time is running out fast, and I'd lke to get the entire back-office  
up and running today still...:P

Tnx in advance, and cheers,
Olafo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: How to set up read-only viewing in normal routing and scaffolded viewing in admin routing?

2007-10-18 Thread Olaf Greve

Hi,

Thanks for your answer!
Also: I've CC'ed you directly on this message too, as yesterday my replies
to the list were rejected for some reason. I hope you don't mind...:P

> Also in 1.2 (you need it for the Auth component) you can put
> var $scaffold = 'admin';
>
> in your controller, to use scaffold only for admin_ actions, then make
> the others views like always.

Aha!
That sounds excellent!
I had decided not to go for version 1.2 due to its Alpha status, but this
makes it definitely worth a try!

> Anyway, my advice is to bake everything (using the console bake
> script ) and start building on that base rather than stick to the
> scaffold.

Hmmm, time is a major limiting factor for this particular assignment
(basically, I'll only have next Monday, Tuesday and at best a small part of
Wednesday for implementing the back-office and all sorts of intricate logic
on top of it - outside of those ours I'd have to work on it in my spare
time, which, having a baby would mean having to 'find the 25th hour in the
day'), so the main question would be how easily/quickly the method you
propose could be realised. In this case, the main advantage of having an
admin routed scaffold mechanism, would be that I'd have virtually no
overhead for building neat admin views (in this case 95% of the focus of the
assignment is on the front end, and not on the back-office)...
I hope this console script is easy to fit those needs and restrictions then?

Cheers!
Olaf



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---