I am trying to integrate CakePHP with ExtJS. What is the best way to
handle validation? How can I capture validation messages in the
Controller so that I can return them to the ExtJS form in JSON format?
--~--~-~--~~~---~--~~
You received this message because you
CakePHP doesn't discern between html attributes, by default it escapes
all attribute values. If you want to change this behaviour, then you
can pass 'escape' = false as part of that second array, *however* you
will manually need to escape all other values (including the input
value I believe).
A
I have two database tables. Tenants and expenses. Tenant has many
expenses. Expense belongs to tenant. When ever a new expense is
created a tenant who has paid for the expense is associated with it.
Now i want another relationship which is affects. Each expense may
not affect all tenants. So
Hello,
I'm using the unobtrusive datepicker (
http://bakery.cakephp.org/articles/view/using-the-unobtrusive-date-picker-widget-in-cakephp
) but the calendar button is not showing up.
The output HTML is:
head
link rel=stylesheet type=text/css href=/cake_1_2/css/
datepicker.css /
...
If I believe what you are saying, something like this would work (not
sure what fields you need):
// all the tenants
tenants
- id
- name
// all the expenses
expenses
- id
- cost
// relating a tenant to an expense = multiple tenants possible on an
expense
tenantExpenseRelation
- id
- tenant_id
Hello,
I'm a little confused with My Paginatorplease forgive me as i'm a
basic learner :)
I'm currently showing links to pages 1 2 3 4 5 on the bottom of my
website:
Here is part of the code: div class='awlPager'b1/b a href=/
mypage/index/page:22/a etc etca href=/mypage/index/page:
55/a
are you doing the right form-create(); ???
best would be if you copy paste you controller and view so i can have
a look at it.
Alexandru's solution should work..
cheers
On Dec 12, 8:56 pm, _Z zmcar...@gmail.com wrote:
Hi Alexandru.
Thank you for the input. But a dropdown box is STILL not
Hi Paul,
You can also access the validation errors directly in the view, so you
could just have this in your controller...
$this-User-save($this-data);
and something like this in your view...
?php
$response = array(
'success' = empty($this-validationErrors),
'errors' =
I use Firebug in this case to see what files are being loaded, and to
make sure I'm getting no 404s on things like js or css files, etc.
Cheers,
Adam
On Dec 13, 8:34 pm, cakephpro...@googlemail.com
cakephpro...@googlemail.com wrote:
Hello,
I'm using the unobtrusive datepicker
_Z wrote:
I validated with pr($store_tables); That I am indeed getting back a
list of tables.
However the echo $form-input('store_table_id'); does not produce a
dropdown.
Any other ideas or things I need to check?
Like yash said, please paste your controller and view.
Ok gents:
In Waitlists controller, just reading session variable, and returning
all entries that match that store.
Waitlists Controller
function index() {
$this-Waitlist-recursive = 0;
$storeid = $this-Session-read('UserStoreId');
$store_tables =
On Dec 13, 4:30 am, thankyou gregbo...@gmail.com wrote:
Hello,
I'm a little confused with My Paginatorplease forgive me as i'm a
basic learner :)
I'm currently showing links to pages 1 2 3 4 5 on the bottom of my
website:
Here is part of the code: div class='awlPager'b1/b a href=/
Adam,
thanks, firebug is a really useful addition. I managed to track down
one problem and it now shows the first button of looped items but not
any subsequent ones. This is the code :
foreach ($applications as $applicant):?
tr
td
?php
Ed, looks like those fails are on the schema and containable classes,
not the model. And as you found out bake doesn't search through every
related model to add fixtures from. It only goes one level deep, you
need to manually add all the missing fixtures.
-Mark
On Dec 12, 5:53 pm, Ed Howland
I've published a little information on the migration process. Maybe
that will help you out. One of the biggest hurdles for me was the ACL
changes. At the time there wasn't much information about the changes,
but I think most of that information has been updated in the Cook book
now. My
I have a vendors table with a few common properties shared between
commercial_vendors and organizational_vendors. Any given vendor can
be either a commercial vendor _or_ an organizational vendor, but not
both. Is it correct to associate my models such that:
commercial_vendor belongsTo vendor
If I have view caching enabled and I have the following files.
news.php
news_find_something.php
news_find_something_page_2.php
element_news_something.php
documents_find_news_page_4.php
If I call clearCache('news') the news.php file is deleted but the
other files remain.
If I call it again a
Is it correct to associate my models such that:
commercial_vendor belongsTo vendor
organizational_vendor belongsTo vendor
Yes, in the first application I am working on with CakePHP I have the
following tables
organisations
people
agencies
households
schemes
agency_contacts
clients
staff
I
Does anyone can help me with this please?
Thank you
Joao
On Dec 11, 11:47 pm, João Aguiam joaoagu...@gmail.com wrote:
Hello,
I'm developing two sites in cake php at the same time. In each site (both
are on the same machine) the following error is occurring:
*Notice* (8)
On Dec 13, 1:33 pm, WebbedIT p...@webbedit.co.uk wrote:
Is it correct to associate my models such that:
commercial_vendor belongsTo vendor
organizational_vendor belongsTo vendor
Yes, in the first application I am working on with CakePHP I have the
following tables
organisations
Hmm, Thanks. I'll have to toy with that. Looks like a good way to do
it. ^_^
On Dec 12, 3:58 am, Liebermann, Anja Carolin
anja.lieberm...@alltours.de wrote:
Hi Bios,
What I do is in my app_cotroller.php:
$this-set('usergroup',$this-Auth-user('group_id'));
Hi again,
I have managed to track back what I think the problem is but I'm
having a hard time thinking this is an issue inside Cake given the
number of users who are using the on parameter. If I add $this-id =
[the id of my user] as the first line inside cake/libs/model/model.php
in the
Hi There,
Problem solved. $this-User-id was unset inside the controller -
which is kinda weird. I have fixed it by doing the following:
$this-User-id = $this-data[User][id];
Does it seems odd that I should have to do that? The example of code
I'm using was taken from a supposed working
Hi Mr Timp,
Yes, your example looks a bit old/odd. The correct equivalent of :
$this-User-data = $this-data;
is this:
$this-User-set($this-data);
This will ensure $this-User-id is updated with the correct value.
However, having said that, most of the code you've got seems unneeded.
Replace
I have a vendors table that contains a field named address_id that
is a foreign key to addresses.id. If I define the models as shown
below then I'm unable to request a scaffolded version of /vendors/
without getting an error: Unknown column 'Address.vendor_id' in 'on
clause'. I don't want a
Hi Adam,
Awesome! Exactly the kind of feedback I was looking for. Your right
I'm probably basing my design on older ways of doing things, your
example is much less complicated and easier to read.
Thanks for your feedback!
--~--~-~--~~~---~--~~
You received this
You seem to be rught Mark, But why does this dependency exist in the
first place?
Ed
On Sat, Dec 13, 2008 at 10:36 AM, mark_story mark.st...@gmail.com wrote:
Ed, looks like those fails are on the schema and containable classes,
not the model. And as you found out bake doesn't search through
Rob Wilkerson wrote:
I have a vendors table that contains a field named address_id that
is a foreign key to addresses.id. If I define the models as shown
below then I'm unable to request a scaffolded version of /vendors/
without getting an error: Unknown column 'Address.vendor_id' in 'on
Hello,
Using $this-here within my $form-create(..) brings me to action=/
path/to/cake/path/to/cake/action/id while my installation is in /
path/to/cake.
This then causes the action to fail, as an extra 'path/to/cake' is
added. (This is a generalized example.)
Anyone else having this
29 matches
Mail list logo