Re: I have the same problem

2007-12-02 Thread ldb

G'day

Thanks for mentioning this, I did have problems with 1.18 but I just
stared with CakePHP and thought I just didn't know how to use them
right. Missed something in the setup...;-)

On Dec 2, 4:42 pm, Jimz [EMAIL PROTECTED] wrote:
 Hi Keymaster,

 I'm getting the same problem.

 If I refresh one second after setting a session in 1.18 while security
 is on high, my shopping cart session disappears...

 It is getting set, but is gone the next time a page is loaded.

 Moving it to medium security seemed to fix the problem for me too.

 keymaster wrote:
  I have an app which has been working steadily for almost a year,
  through several cake releases, up to and including cake 1.17.

  When I upgrated to cake 1.18, with no changes to the app, all of a
  sudden session variables are disappearing during some (not all) of my
  ajax requests. The call to $this-Session-check('myVar') is returning
  false.

  I am using CAKE_SECURITY = high.

  I checked through the release notes of 1.18 and found several session
  related fixes. One in particular caught my eye - it had to do with a
  bugfix to regenerate session id's on every request. (update which
  fixes #3313)

  I wondered if perhaps that might have something to do with my
  problems.

  So, I lowered CAKE_SECURITY from high to medium. That fixed the
  problem. To double check, I raised it back to high, and problem
  returned.

  I reverted back to cake 1.17 and there was no problem both for
  CAKE_SECURITY = high and low.

  Anyone else experience problems with session vars in 1.18?

  Are we supposed to do things differently now that session id's are
  being regenerated for CAKE_SECURITY = high?
--~--~-~--~~~---~--~~
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: newbie question - multiple functions in a page

2007-12-02 Thread ldb

G'day

Would the Ajax helper be what you are looking for, or have I
misunderstood? I did visit your link..;-)



On Dec 2, 5:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi everyone,
 Apologies if this is a silly question, I'm brand new to Cake (and
 frameworks in general!).

 Every tutorial under the sun shows you how to make a view with another
 page for editing, another page for adding etc., but nobody seems to be
 able to show an example of an everyday web page, with lots of
 different dynamic systems built into a single page.

 I'm thinking of how you'd extend a site wirh a basic layout that looks
 like this one:http://www.snook.ca/archives/cakephp

 Presumably all the ads, book lists and things come from included
 elements - I've got that far, but how to make these dynamic? What if I
 wanted the left nav to be a list of users, with Edit and Delete links
 next to their names, while the main content panel gives me my editable
 list of articles. And what if at the bottom of the page I wanted to
 display my CD list?

 I can build a full class for music, articles and users, and they can
 work fine seperately (one view for listing my music, in the music
 folder, another view for editing my articles, in the articles folder
 etc.), but how does one combine them into a single view? I just can't
 see what you're supposed to do to combine lots of interactions into a
 single page, and where you're supposed to put view files with multiple
 functionality. If someone can explain, or point me to a tutorial, I'd
 be most grateful!

 Jon.
--~--~-~--~~~---~--~~
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: using one select box to generate the results for two more

2007-12-02 Thread ldb

G'day

Just for closing, restructure of the table was required, then the
folks I was doing this for dropped the requirement

On Nov 16, 8:08 am, ldb [EMAIL PROTECTED] wrote:
 G'day

 Ah, should have mentioned, I can restructure the table if that is
 needed, was trying not to. Been through too much trying to figure this
 one out, restructure would have to be less trouble if it makes Cake
 happier and works better within it's format.

 Thanks...;-)

 On Nov 16, 8:04 am,ldb[EMAIL PROTECTED] wrote:

  G'day

  Thanks. I have already applied the setup from devmoz, it was very
  helpful and I have the example working and another copy where the  two
  tables involved actually can use a belongs to just as an extra test.
  I have likely not explained this fully, sorry. I have a table with
  model numbers  other info on the products called models, then I
  have a table which only contains three columns, ID, Model Number
  and Other Model Number called Altmodels, so that items that are
  comparable could be looked up and interchanged. The ID number is an
  autoincrement, Model Number and Other Model Number can occur
  several times in all possible combinations. Any reference to the codes
  would point back to the Models table, it's really just a kind of
  index.

   I could not determine a fit with the associations ( I could be
  missing something there) so I set up the generateList to accommodate
  this and realized that upon load, how do I tell the lower two lines
  the model code selected by default? Or can I. Maybe I am on the wrong
  track with that part and don't need those lines? I am using
  scriptaculous and have verfied that it is working within this cake
  project. I have done PHP b ut just started with Cake, I figure I'm
  abusing it but not sure how.

  On Nov 16, 1:44 am, francky06l [EMAIL PROTECTED] wrote:

   You probably need an ajax call to update the 2 boxes when the value of
   your first box changes.
   See a sample here 
   :http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-usi...

   On Nov 15, 10:29 pm,ldb[EMAIL PROTECTED] wrote:

G'day

I just can't seem to find the right answer to this one. Hopefully
someone can  point me in the right direction please. I have the
following function in a app/controllers/models_controller.php.  I
load three select boxes two of which rely  on data from the first one.
I can enter a manual value into the array as you can see, and they
display the data fine,  but I can't seem to  figure out how to capture
the value of the current selected item from the first generateList to
feed it to the two others.

Can someone please enlighten me?.;-)

 function index() {
$this-set('models', 
$this-Modelinfo-Model-generateList(null, 'Model_Number', null,

'{n}.Model.Model_Number','{n}.Model.Model_Number', true, true ) );

$this-set('modelinfos', 
$this-Modelinfo-generateList(array('Modelinfo.Model_Number'= 
'LD400'),null, null,

'{n}.Modelinfo.Model_Number','{n}.Modelinfo.AltModel_Number'));

$this-set('altmodels', 
$this-Altmodel-generateList(array('Altmodel.Model_Number'= 
'LD400'),null, null,

'{n}.Altmodel.Model_Number','{n}.Altmodel.Alt_Model'));

}

Thanks
--
   ldb
--~--~-~--~~~---~--~~
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: Newbie question: how do i load the javascript helper ?

2007-11-30 Thread ldb

G'day

Hopefully I'm not misunderstanding.

In your controller, make sure you have it defined. var $helpers =
array('Html', 'Form','Javascript', 'Ajax' ); is the full line I have
for context.
That will work for just Javascript.
If you use any helpers that are not built in, just make sure you put a
copy of the helper is in app/views/helpers and then add the name,
just like you did with 'Javascript'.

You should now have access.:-)


On Nov 30, 11:31 am, Eemerge [EMAIL PROTECTED] wrote:
 Sorry to ask such a newbie question, but i didnt find anything about
 it in the manual. Maybe i missed it, but anyway:

 how do i load the javascript helper?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



FormWizard snippet for Cake 1.1

2007-11-30 Thread ldb

G'day

Sorry, I'm new to cake and have been scaling hills for the past few
weeks.
I have read all the entries I can find and am still missing something
on how
it hooks up and works. I have to use Cake 1.1 for this, no choice

I have a project where I use four forms
modelinfo,productinfo,custinfo
and review. I took the FormWizard snippet from cakeforge and have
been
trying to implement it. I have the following structure.

app/controller/component/wizard.php:

 - contains the actual component as downloaded.

app/controller/wizard_controller.php:
=
// code start
?php
class WizardController extends AppController {

var $name = 'Wizard';
var $helpers = array('Html', 'Form','Javascript', 'Ajax' );
var $components = array('FormWizard');

function index() {
}

function start() {
$ways=array(start =
array(pages,modelinfo,productinfo,
custinfo,review));
$this-FormWizard-initWizard($ways);
}

}

I put the following in each view that I use:

?php
  echo $html-submit(Previous Step,array(name=previous));
  echo $html-submit(Next Step,array(name=next));
?


The end result is that at first that I stay on the same page when
using
Previous/Next.
I realize I'm not using it right, misunderstood something,  but cannot
find
any info that helps me see how I've got it wrong. Can anyone please
point me
in the right direction, I've been on a tight timeline for this project
and have
had lots of hurdles so far.

Thanks...
--
ldb


--~--~-~--~~~---~--~~
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: Migration from 1.1 to 1.2 problems

2007-11-28 Thread ldb

G'day

I have been finding bits and pieces of how to fix migration issues
between 1.1 and 1.2. (wonderful beast BTW). But cannot figure out why
my radio buttons look more like little popsicle sticks than circles
where a dot goes. I am not using any css on the radio buttons, but the
following is the line that results in the problem.

  ?php
  echo $form-radio('IssueDetail/Warranty_Code', array('1' =
'None', '2' = 'Dealer Warranty (90 days)', '3' = 'Factory Warranty',
'4' = 'Extended Warranty'), array( 'size' = '1', 'label' = false,
'separator' = 'br', 'value' = '1' ));
?


I finally put this code at the top of my default.ctp to make sure it
would completely outside any divs that would affect it, same result.
I know the fieldsets are there the resulting code is:

fieldsetlegendWarranty Code/legendinput type=radio
name=data[IssueDetail][Warranty_Code] id=WarrantyCode1 size=1
value=1 checked=checked  /Nonebrinput type=radio
name=data[IssueDetail][Warranty_Code] id=WarrantyCode2 size=1
value=2  /Dealer Warranty (90 days)brinput type=radio
name=data[IssueDetail][Warranty_Code] id=WarrantyCode3 size=1
value=3  /Factory Warrantybrinput type=radio
name=data[IssueDetail][Warranty_Code] id=WarrantyCode4 size=1
value=4  /Extended Warranty/fieldset

I'm hoping I've got an initial config wrong because even the radio
button example from http://www.donutczar.com/blog/?p=3; does the same
thing, the radio button appears to stretch to the maximum width of the
div or in this case the entire  browser window? Can anyone help
please? Happy to read but am currently out of material.;-)

To save folks the trouble, the donutczar site has :
?php echo $form-radio('Contacts.firstName',array('yes','no')); ?


Thanks...
ldb



--~--~-~--~~~---~--~~
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: javascript declarations

2007-11-21 Thread ldb

G'day

Thanks very much for that reference.  I did try the fix but it did not
work in my situation. But it's a great link and is bookmarked for
future issues. Much appreciated.

I did end up trying a grueling comparison of the header tags between
two cake projects, one works, one (the current one) did not. I
couldn't visually see any differences. However, replacing it with a
copy of the header from the working project behaves. There's something
in there and I have to get on with this project but am keeping the
code aside so I can finally figure out what it is a bit later. Because
it's going to bother me.  Definitely syntax, hex or something.

Funny too, the javascript- link  was generating the identical code
to just entering it using the script type='text/javascript tag
which did work fine.

On Nov 20, 6:06 pm, bingo [EMAIL PROTECTED] wrote:
 hi idb

 I came across this problem many times..and the only reason IE7 fails
 to load javascript is when the script type=...  ... is the first
 element of the page..checkout my blog where I reported all the
 problems related to javascript and IE7. There is nothing specific to
 cakephp, its javascript and browser problem

 http://ragrawal.wordpress.com/2007/10/25/top-5-reasons-why-ie7-is-com...

 On Nov 20, 3:11 pm, Pablo Viojo [EMAIL PROTECTED] wrote:

  Please provide more details...javascript error, if any, generated html code,
  etc

  --
  Pablo Viojo
  [EMAIL PROTECTED]://pviojo.net

  On Nov 20, 2007 4:07 PM,ldb[EMAIL PROTECTED] wrote:

   G'day

   This has got to be a tweak I missed, can someone please tell me what
   IE7 doesn't like about the following javascript declaration I have in
   my default.thtml header?  I've tested and the isset($javascript) is
   true.

   ?php
 if(isset($javascript)) {
  echo ($javascript-link('prototype'));
  echo ($javascript-link('scriptaculous'));
  echo ($javascript-link('datepicker'));
 }
   ?

   This works fine in Firefox and Safari on Windows and of course any
   linux browser???

   Thanks...;-)

   --
  ldb- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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: recommendations for credit card processing

2007-11-21 Thread ldb

G'day

Are there any favorites for processing credit card transactions with
CakePHP? Are there any cavets about installing things like Google
Checkout or Authorize.net? I've been reading about this, but haven't
gained any solid opinions yet, sounds like I have to just pick one.

My particular application involves only one product unit which I would
like to feed the checkout and process the credit card. So no shopping
cart is necessary but I can alter one if necessary for the same
effect.


Thanks..
--
ldb

--~--~-~--~~~---~--~~
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: javascript declarations

2007-11-20 Thread ldb

G'day

This has got to be a tweak I missed, can someone please tell me what
IE7 doesn't like about the following javascript declaration I have in
my default.thtml header?  I've tested and the isset($javascript) is
true.

?php
   if(isset($javascript)) {
echo ($javascript-link('prototype'));
echo ($javascript-link('scriptaculous'));
echo ($javascript-link('datepicker'));
   }
?

This works fine in Firefox and Safari on Windows and of course any
linux browser???

Thanks...;-)

--
ldb

--~--~-~--~~~---~--~~
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: using one select box to generate the results for two more

2007-11-16 Thread ldb

G'day

Thanks. I have already applied the setup from devmoz, it was very
helpful and I have the example working and another copy where the  two
tables involved actually can use a belongs to just as an extra test.
I have likely not explained this fully, sorry. I have a table with
model numbers  other info on the products called models, then I
have a table which only contains three columns, ID, Model Number
and Other Model Number called Altmodels, so that items that are
comparable could be looked up and interchanged. The ID number is an
autoincrement, Model Number and Other Model Number can occur
several times in all possible combinations. Any reference to the codes
would point back to the Models table, it's really just a kind of
index.

 I could not determine a fit with the associations ( I could be
missing something there) so I set up the generateList to accommodate
this and realized that upon load, how do I tell the lower two lines
the model code selected by default? Or can I. Maybe I am on the wrong
track with that part and don't need those lines? I am using
scriptaculous and have verfied that it is working within this cake
project. I have done PHP b ut just started with Cake, I figure I'm
abusing it but not sure how.



On Nov 16, 1:44 am, francky06l [EMAIL PROTECTED] wrote:
 You probably need an ajax call to update the 2 boxes when the value of
 your first box changes.
 See a sample here 
 :http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-usi...

 On Nov 15, 10:29 pm,ldb[EMAIL PROTECTED] wrote:

  G'day

  I just can't seem to find the right answer to this one. Hopefully
  someone can  point me in the right direction please. I have the
  following function in a app/controllers/models_controller.php.  I
  load three select boxes two of which rely  on data from the first one.
  I can enter a manual value into the array as you can see, and they
  display the data fine,  but I can't seem to  figure out how to capture
  the value of the current selected item from the first generateList to
  feed it to the two others.

  Can someone please enlighten me?.;-)

   function index() {
  $this-set('models', $this-Modelinfo-Model-generateList(null, 
  'Model_Number', null,

  '{n}.Model.Model_Number','{n}.Model.Model_Number', true, true ) );

  $this-set('modelinfos', 
  $this-Modelinfo-generateList(array('Modelinfo.Model_Number'= 
  'LD400'),null, null,

  '{n}.Modelinfo.Model_Number','{n}.Modelinfo.AltModel_Number'));

  $this-set('altmodels', 
  $this-Altmodel-generateList(array('Altmodel.Model_Number'= 
  'LD400'),null, null,

  '{n}.Altmodel.Model_Number','{n}.Altmodel.Alt_Model'));

  }

  Thanks
  --
 ldb
--~--~-~--~~~---~--~~
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: using one select box to generate the results for two more

2007-11-16 Thread ldb

G'day

Ah, should have mentioned, I can restructure the table if that is
needed, was trying not to. Been through too much trying to figure this
one out, restructure would have to be less trouble if it makes Cake
happier and works better within it's format.

Thanks...;-)



On Nov 16, 8:04 am, ldb [EMAIL PROTECTED] wrote:
 G'day

 Thanks. I have already applied the setup from devmoz, it was very
 helpful and I have the example working and another copy where the  two
 tables involved actually can use a belongs to just as an extra test.
 I have likely not explained this fully, sorry. I have a table with
 model numbers  other info on the products called models, then I
 have a table which only contains three columns, ID, Model Number
 and Other Model Number called Altmodels, so that items that are
 comparable could be looked up and interchanged. The ID number is an
 autoincrement, Model Number and Other Model Number can occur
 several times in all possible combinations. Any reference to the codes
 would point back to the Models table, it's really just a kind of
 index.

  I could not determine a fit with the associations ( I could be
 missing something there) so I set up the generateList to accommodate
 this and realized that upon load, how do I tell the lower two lines
 the model code selected by default? Or can I. Maybe I am on the wrong
 track with that part and don't need those lines? I am using
 scriptaculous and have verfied that it is working within this cake
 project. I have done PHP b ut just started with Cake, I figure I'm
 abusing it but not sure how.

 On Nov 16, 1:44 am, francky06l [EMAIL PROTECTED] wrote:

  You probably need an ajax call to update the 2 boxes when the value of
  your first box changes.
  See a sample here 
  :http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-usi...

  On Nov 15, 10:29 pm,ldb[EMAIL PROTECTED] wrote:

   G'day

   I just can't seem to find the right answer to this one. Hopefully
   someone can  point me in the right direction please. I have the
   following function in a app/controllers/models_controller.php.  I
   load three select boxes two of which rely  on data from the first one.
   I can enter a manual value into the array as you can see, and they
   display the data fine,  but I can't seem to  figure out how to capture
   the value of the current selected item from the first generateList to
   feed it to the two others.

   Can someone please enlighten me?.;-)

function index() {
   $this-set('models', $this-Modelinfo-Model-generateList(null, 
   'Model_Number', null,

   '{n}.Model.Model_Number','{n}.Model.Model_Number', true, true ) );

   $this-set('modelinfos', 
   $this-Modelinfo-generateList(array('Modelinfo.Model_Number'= 
   'LD400'),null, null,

   '{n}.Modelinfo.Model_Number','{n}.Modelinfo.AltModel_Number'));

   $this-set('altmodels', 
   $this-Altmodel-generateList(array('Altmodel.Model_Number'= 
   'LD400'),null, null,

   '{n}.Altmodel.Model_Number','{n}.Altmodel.Alt_Model'));

   }

   Thanks
   --
  ldb
--~--~-~--~~~---~--~~
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: using one select box to generate the results for two more

2007-11-15 Thread ldb


G'day

I just can't seem to find the right answer to this one. Hopefully
someone can  point me in the right direction please. I have the
following function in a app/controllers/models_controller.php.  I
load three select boxes two of which rely  on data from the first one.
I can enter a manual value into the array as you can see, and they
display the data fine,  but I can't seem to  figure out how to capture
the value of the current selected item from the first generateList to
feed it to the two others.

Can someone please enlighten me?.;-)

 function index() {
$this-set('models', $this-Modelinfo-Model-
generateList(null, 'Model_Number', null,
'{n}.Model.Model_Number','{n}.Model.Model_Number', true, true ) );

$this-set('modelinfos', $this-Modelinfo-
generateList(array('Modelinfo.Model_Number'= 'LD400'),null, null,
'{n}.Modelinfo.Model_Number','{n}.Modelinfo.AltModel_Number'));

$this-set('altmodels', $this-Altmodel-
generateList(array('Altmodel.Model_Number'= 'LD400'),null, null,
'{n}.Altmodel.Model_Number','{n}.Altmodel.Alt_Model'));

}

Thanks
--
ldb

--~--~-~--~~~---~--~~
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: generated list not available in one view, results in Undefined variable referencing the list variable.

2007-11-14 Thread ldb

G'day

Ah, finally found the right reference. Don't know how I missed it on
the first time through the CakePHP manual but I plan on re-reading it
anyway . The var $uses =   is the solution.  Thanks anyway, and
sorry for the extra  noise...;-)

http://manual.cakephp.org/chapter/controllers


On Nov 14, 5:18 pm, ldb [EMAIL PROTECTED] wrote:
 G'day

 I feel that I am somewhat standing in front of a forest shooting at
 it, hoping to hit a tree looking for what would cause the following. I
 am hoping I've just  missed something in my usage of CakePHP here and
 someone can refer me to the right doc.

 I have a controller  called model_alternates_controller.php which
 contains the following lines (amoung others):

 $this-ModelAlternate-recursive = 0;
 $this-set('modelAlternates', 
 $this-ModelAlternate-findAll());

 $this-set('tirelist', $this-ModelAlternate-

 generateList( ));

 I have two views defined in the following structure:
  app/views/model_alternates/index.thtml
  app/views/models/index.thtml

 In app/views/model_alternates/index.thtml, I have the following:
 div
  ?php
  echo $html-selectTag('ModelAlternate/
 alt_model_id', $tirelist, null, array('Model_Number' =
 'model_alternates'));
?

 /div

 This works fine in the models_alternates view but putting the same
 lines in the models/index.thtml just gives me Notice: Undefined
 variable: tirelist in /cakehome/app/views/models/index.thtml on line
 16. It uses the same controller, maybe I am fighting the naming
 conventions between models/controllers and views?

 I was originally trying to set up display that when a model code was
 selected, the other box of alternate choices would change according
 to the contents of that table. But the model_alternates  table has an
 autoincrement key as the primary. I was trying what I had read about
 for setting that scenario up and it was not working so I set this up
 as a smaller test to make sure I hadn't misunderstood the basics of
 the selects in CakePHP. I figure I missed reading something but have
 been reading alot today, mostly wrong turns but very educational ones.
 Can anyone please tell me which grove of trees to aim for?

 Thanks...
 --
 ldb


--~--~-~--~~~---~--~~
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: generated list not available in one view, results in Undefined variable referencing the list variable.

2007-11-14 Thread ldb

G'day

I feel that I am somewhat standing in front of a forest shooting at
it, hoping to hit a tree looking for what would cause the following. I
am hoping I've just  missed something in my usage of CakePHP here and
someone can refer me to the right doc.

I have a controller  called model_alternates_controller.php which
contains the following lines (amoung others):

$this-ModelAlternate-recursive = 0;
$this-set('modelAlternates', $this-ModelAlternate-
findAll());
$this-set('tirelist', $this-ModelAlternate-
generateList( ));

I have two views defined in the following structure:
 app/views/model_alternates/index.thtml
 app/views/models/index.thtml

In app/views/model_alternates/index.thtml, I have the following:
div
 ?php
 echo $html-selectTag('ModelAlternate/
alt_model_id', $tirelist, null, array('Model_Number' =
'model_alternates'));
   ?

/div

This works fine in the models_alternates view but putting the same
lines in the models/index.thtml just gives me Notice: Undefined
variable: tirelist in /cakehome/app/views/models/index.thtml on line
16. It uses the same controller, maybe I am fighting the naming
conventions between models/controllers and views?

I was originally trying to set up display that when a model code was
selected, the other box of alternate choices would change according
to the contents of that table. But the model_alternates  table has an
autoincrement key as the primary. I was trying what I had read about
for setting that scenario up and it was not working so I set this up
as a smaller test to make sure I hadn't misunderstood the basics of
the selects in CakePHP. I figure I missed reading something but have
been reading alot today, mostly wrong turns but very educational ones.
Can anyone please tell me which grove of trees to aim for?

Thanks...
--
ldb


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---