First be aware I am rather new to cakephp so I may be wrong :)
And I came from more complex things like websphere and .net so I may
have wrong habits :)

First I thought about views like You, but it felt like running against
the wind. It helped me really to think about views as pages from the
sitemap. So if I don't have separate page for inquire I don't create
view for it!

> (for example, customer had 5 inquiries, you're showing one at a time
> through ajax). Do you now have to create an action/view for each of
> these elements anyway so that ajax can request them? And each of these
> views will basically just display a single element? It seems
> redundant!

I don't like to send whole html for this. If You use some kind of
framework it should be easy to just get json or xml from server and
only replace data in the form. And You can basically control what You
show (full, summary, oneline) both through data You send  or form You
show, dependent Your needs.

So you would only need json view for inquire...

For example in mootools You can do something like this:

//get json data through request then

//for each child input element of div with id = inquire_form

    //check if You have data for it

    //if not - hide the input

    //if yes - replace the data

I hope my English is understandable. :)

Robert

ps. careful: if You use security component You can't dynamically add
elements to Your form. It took me several hours to realize that...

>
> I guess you could have one action/view pair for all the elements, and
> specify the type of element through the request, but then the view
> will be selecting what to display based on the type of request. That
> seems like bypassing the whole MVC structure to have View handle
> request, select data, and display it.

one more thing - I create more and more helpers for working with html
and I would probably use helper not element to create inquire form for
customer view...
--~--~---------~--~----~------------~-------~--~----~
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