Re: Formatar a mensagem - $this->Session->setFlash(__('minha msg'));

2013-04-22 Thread Tony Messias
Seguinte, o método setFlash aceita 4 parâmetros: 1) String da mensagem; 2) *
element* que será usado; 3) array de parâmetros; e 4) índice da mensagem na
sessão;

Vejo pelo menos três formas de você fazer isso:

   1. Criando um *element* para cada tipo de mensage;
   2. Com apenas um *element* e passando a *class* "good/bad" para mudar o
   estilo de exibição;
   3. Usar índices diferentes e, com isso, você pode colocar em div's
   diferentes.

Lembro que uma vez tive o mesmo problema e escolhi usar um *element* só
passando a *class*, deu certo pra mim.

Se ainda tiver dúvida, pode perguntar.

Att,


--

Luiz Antonio S Messias
Desenvolvedor Web

<http://twitter.com/tonyzrp>
@tonyzrp <http://twitter.com/tonyzrp>
*LinkedIn* <http://www.linkedin.com/in/luizantoniosmessias>


2013/4/22 Anderson Moraes 

> Tony, obrigado pela resposta.
>
> Não entendi muito bem como por em prática o que vc me passou, eu tenho que
> criar um estilo para cada tipo de mensagem (bad / good)???
>
>
>
> Em segunda-feira, 22 de abril de 2013 17h17min15s UTC-3, Anderson Moraes
> escreveu:
>
>>  Boa tarde pessoal,
>>
>> Então, na página default.ctp eu tenho a seguinte linha: > $this->Session->flash(); ?>
>> Quando uma mensagem é setada é essa linha que exibe, correto?
>>
>> Então se eu tenho uma mensagem de sucesso: $this->Session->setFlash(__('*
>> *Usuário cadastrado com sucesso.')); eu gostaria que o background-color
>> da minha mensagem fosse verde e só exibisse o vermelho em casos onde a
>> mensagem tenha uma relação negativa, ex.: 
>> $this->Session->setFlash(__('**Usuário
>> ou senha inválidos.'));
>>
>> o CakePHP 2.x tem alguma forma de informar qual "style" usuar na
>> mensagem???
>>
>> Grato desde já,
>>
>> Anderson
>>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Formatar a mensagem - $this->Session->setFlash(__('minha msg'));

2013-04-22 Thread Anderson Moraes
Tony, obrigado pela resposta.

Não entendi muito bem como por em prática o que vc me passou, eu tenho que 
criar um estilo para cada tipo de mensagem (bad / good)???



Em segunda-feira, 22 de abril de 2013 17h17min15s UTC-3, Anderson Moraes 
escreveu:
>
>  Boa tarde pessoal, 
>
> Então, na página default.ctp eu tenho a seguinte linha:  $this->Session->flash(); ?>
> Quando uma mensagem é setada é essa linha que exibe, correto?
>
> Então se eu tenho uma mensagem de sucesso: 
> $this->Session->setFlash(__('Usuário cadastrado com sucesso.')); eu 
> gostaria que o background-color da minha mensagem fosse verde e só exibisse 
> o vermelho em casos onde a mensagem tenha uma relação negativa, ex.: 
> $this->Session->setFlash(__('Usuário ou senha inválidos.'));
>
> o CakePHP 2.x tem alguma forma de informar qual "style" usuar na 
> mensagem???
>
> Grato desde já,
>
> Anderson
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Formatar a mensagem - $this->Session->setFlash(__('minha msg'));

2013-04-22 Thread Tony Messias
Tem isso aqui:

http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#creating-notification-messages

Att,


--

Luiz Antonio S Messias
Desenvolvedor Web

<http://twitter.com/tonyzrp>
@tonyzrp <http://twitter.com/tonyzrp>
*LinkedIn* <http://www.linkedin.com/in/luizantoniosmessias>


2013/4/22 Anderson Moraes 

>  Boa tarde pessoal,
>
> Então, na página default.ctp eu tenho a seguinte linha:  $this->Session->flash(); ?>
> Quando uma mensagem é setada é essa linha que exibe, correto?
>
> Então se eu tenho uma mensagem de sucesso:
> $this->Session->setFlash(__('Usuário cadastrado com sucesso.')); eu
> gostaria que o background-color da minha mensagem fosse verde e só exibisse
> o vermelho em casos onde a mensagem tenha uma relação negativa, ex.:
> $this->Session->setFlash(__('Usuário ou senha inválidos.'));
>
> o CakePHP 2.x tem alguma forma de informar qual "style" usuar na
> mensagem???
>
> Grato desde já,
>
> Anderson
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Formatar a mensagem - $this->Session->setFlash(__('minha msg'));

2013-04-22 Thread Anderson Moraes
 Boa tarde pessoal, 

Então, na página default.ctp eu tenho a seguinte linha: Session->flash(); ?>
Quando uma mensagem é setada é essa linha que exibe, correto?

Então se eu tenho uma mensagem de sucesso: 
$this->Session->setFlash(__('Usuário cadastrado com sucesso.')); eu 
gostaria que o background-color da minha mensagem fosse verde e só exibisse 
o vermelho em casos onde a mensagem tenha uma relação negativa, ex.: 
$this->Session->setFlash(__('Usuário ou senha inválidos.'));

o CakePHP 2.x tem alguma forma de informar qual "style" usuar na mensagem???

Grato desde já,

Anderson

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Error in setFlash not in a view

2012-10-12 Thread cosinusweb
Hi , when I have a pdo error like a constraint viloation for example, 
cakephp load pad_error.ctp.


I would rather prefer having the error message in my session set flash

I ve a fonction like that but when there is a constraint viloation it neve 
redirect and it stop saying "Internal Error"

if($this->{$this->modelClass}->delete( $id )){
    $this->Session->setFlash( 
__('MontantRecharge_Delete_OK'),'notif',array('type' => 'success'));
}else{
$this->Session->setFlash( 
__('MontantRecharge_Delete_KO'),'notif',array('type' => 'error'));
}
$this->redirect( $this->referer() );

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Fatal Error on call to '$this->Session->setFlash'

2012-09-13 Thread Tilen Majerle
AppController extends "Controller" class...and in this class it was
automatically added this component.
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/9/13 McScreech 

> Thank you very much, I had forgot to include the Session component.
>
> I haven't begun a new project in some time (since about cake 1.2) - forgot
> some basis setup stuff, I guess I was thinking the basic components and
> helpers were included by default.
>
> I do wonder however, how it _was_ able to work on my first few passes with
> the freshly baked app with no comonents or helpers included before I
> started to modify it?
>
> Thanx again, McS
>
>
> On Thursday, 13 September 2012 09:37:52 UTC-4, MaJerle.Eu wrote:
>>
>> first..your controller should extends AppController, than make sure
>> SessionComponent in included in your component list :)
>> --
>> Lep pozdrav, Tilen Majerle
>> http://majerle.eu
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Fatal Error on call to '$this->Session->setFlash'

2012-09-13 Thread McScreech
Thank you very much, I had forgot to include the Session component.

I haven't begun a new project in some time (since about cake 1.2) - forgot 
some basis setup stuff, I guess I was thinking the basic components and 
helpers were included by default.

I do wonder however, how it _was_ able to work on my first few passes with 
the freshly baked app with no comonents or helpers included before I 
started to modify it?

Thanx again, McS

On Thursday, 13 September 2012 09:37:52 UTC-4, MaJerle.Eu wrote:
>
> first..your controller should extends AppController, than make sure 
> SessionComponent in included in your component list :)
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Fatal Error on call to '$this->Session->setFlash'

2012-09-13 Thread Tilen Majerle
first..your controller should extends AppController, than make sure
SessionComponent in included in your component list :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/9/13 McScreech 

> G'day,
>
> I do not understand how I induced this error:
> 'Error: Call to a member function setFlash() on a non-object'
> which happens on any call to '$this->Session->setFlash' as noted in the
> default edit (or add) function below?
>
> I was adding options to the related form (option lists, labels, titles)
> when I broke it and have been looking for misplaced or missing closing
> parens, braces, brackets, or commas with no luck. This is a bare-bones
> data-entry app with _nothing_ extra included other than the DebugKit
> plugin. I did notice that even though the flash message fails the changes
> made by editing or adding a record _are_ correctly saved to the db and
> displayed in the index view when refreshed.
>
> Any hints on where to look next will be greatly appreciated.
>
> MTIA, McS
>
> public function edit($id = null) {
> $this->Batch->id = $id;
> if (!$this->Batch->exists()) {
> throw new NotFoundException('Invalid batch');
> }
> if ($this->request->is('post') || $this->request->is('put')) {
> if ($this->Batch->save($this->request->data)) {
> $this->Session->setFlash('The batch has been saved'); /*this line*/
> $this->redirect(array('action' => 'index'));
> } else {
> $this->Session->setFlash('The batch could not be saved. Please, try
> again.'); /*this line*/
> }
> } else {
> $this->request->data = $this->Batch->read(null, $id);
> }
> } // end edit($id = null)
>
>  --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Fatal Error on call to '$this->Session->setFlash'

2012-09-13 Thread McScreech
G'day,

I do not understand how I induced this error:
'Error: Call to a member function setFlash() on a non-object'
which happens on any call to '$this->Session->setFlash' as noted in the 
default edit (or add) function below?

I was adding options to the related form (option lists, labels, titles) 
when I broke it and have been looking for misplaced or missing closing 
parens, braces, brackets, or commas with no luck. This is a bare-bones 
data-entry app with _nothing_ extra included other than the DebugKit 
plugin. I did notice that even though the flash message fails the changes 
made by editing or adding a record _are_ correctly saved to the db and 
displayed in the index view when refreshed.

Any hints on where to look next will be greatly appreciated.

MTIA, McS

public function edit($id = null) {
$this->Batch->id = $id;
if (!$this->Batch->exists()) {
throw new NotFoundException('Invalid batch');
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->Batch->save($this->request->data)) {
$this->Session->setFlash('The batch has been saved'); /*this line*/
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash('The batch could not be saved. Please, try 
again.'); /*this line*/
}
} else {
$this->request->data = $this->Batch->read(null, $id);
}
} // end edit($id = null)

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Session::setFlash dosn't work under chrome

2012-04-01 Thread rvcT
*cake version:* 2.1.1
*chrome version:* 18.0.1025.142 m Latest
*code to reproduce error:*
put in controller action:
public function testflash(){
$this->Session->setFlash("flash message will not be shown in chrome");
$this->redirect(array('action' => 'index'));
}
in the default layout:
Session->flash(); ?>

GET url /yourcontroller/testflash

*detail: *the code will work as normal and show the flash message in 
Firefox 10 , IE6 as i tested , when using HTTP debugger like fiddler , u 
will notice that 'CAKEPHP' cookie is set with 302 redirect but when the 
redirection page is opened chrome dosn't set the cookie back!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Links in the setFlash

2012-03-09 Thread majna
You can use Router like:
$url = Router::url(array('controller'=>'users', 'action'=>'login'));
$this-Session->setFlash(sprintf('Please login', $url));


On Friday, March 9, 2012 3:47:17 AM UTC+1, Thiago Silva wrote:
>
> Hello, 
>
> I'm trying to insert links in the Session->setFlash method, but it's 
> not working. 
> I've tried to use Html helper in the controller but it crashed. 
> I'm using version 2.1. 
>
> Thanks, 
> Thiago

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Links in the setFlash

2012-03-08 Thread Thiago Silva
Hello,

I'm trying to insert links in the Session->setFlash method, but it's
not working.
I've tried to use Html helper in the controller but it crashed.
I'm using version 2.1.

Thanks,
Thiago

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: setFlash doesn't appears using $ajax->submit

2011-06-16 Thread Miles J
setFlash() requires the whole page to reload to work, you cant fire
off an AJAX call and expect some random flash message to appear in the
page.

On Jun 16, 7:48 pm, Cruisine  wrote:
> hi guys,recently i've been using ajax submit to save the data into
> database...but whenever i use $ajax->submit(), setFlash doesn't appear
> on my page.i'm so curious what's wrong with the setFlash...and
> it'll terrible since i can't show to the user whether the data have
> already saved or not
> need ur help soon..thanks...

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: setFlash issue in 1.3?

2011-06-16 Thread Krissy Masters
Never tried but seen it along the travels. So i cant speak to its effect or
if it'swhat you need but it might get you started.

http://bakery.cakephp.org/articles/webdevbit/2010/12/07/session_setflash_wit
h_cool_jquery_effects

Good luck,

K

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Cruisine
Sent: Friday, June 17, 2011 12:37 AM
To: CakePHP
Subject: Re: setFlash issue in 1.3?

@Krissy : thx for the answer...yeah,u r right...and it's logically
true.. so can u give me an example using javascript to update the
area?

On Jun 17, 9:17 am, "Krissy Masters" 
wrote:
> If your submitting the form ajax then odds are your not updating
> (refreshing) the whole page. Just the form or div so if your
session->flash
> is outside of this updated area then its not being updated. You would need
> to use javascript to update that.
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On
Behalf
>
> Of Cruisine
> Sent: Thursday, June 16, 2011 11:34 PM
> To: CakePHP
> Subject: Re: setFlash issue in 1.3?
>
> i have an setFlash issue as well..whenever i'm using $ajax-
> >submit() the setFlash message doesn't appear on my page? what's
> wrong ?
>
> On May 19, 2:11 am, Michael Gaiser  wrote:
> > This line no longer seems to output a message nor does any other use of
> > setFlash.
>
> > $this->Session->setFlash('Cookie created. It will expire
> > '.$this->Time->niceTime($cookie['expire']));
>
> > So when I was using 1.2 my code seemed to work out ok. Since migrating
to
> > 1.3, I have made sure that Session was defined in my component and
helper
> > arrays within my app_controller. Using setFlash used to display a
message
> in
> > the next page. Is this still the proper way to use it? Any help on this
> > would be greatly appreciated.
>
> > ~Michael
>
> --
> Our newest site for the community: CakePHP Video
Tutorialshttp://tv.cakephp.org
> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> others with their CakePHP related questions.
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: setFlash issue in 1.3?

2011-06-16 Thread Cruisine
@Krissy : thx for the answer...yeah,u r right...and it's logically
true.. so can u give me an example using javascript to update the
area?

On Jun 17, 9:17 am, "Krissy Masters" 
wrote:
> If your submitting the form ajax then odds are your not updating
> (refreshing) the whole page. Just the form or div so if your session->flash
> is outside of this updated area then its not being updated. You would need
> to use javascript to update that.
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
>
> Of Cruisine
> Sent: Thursday, June 16, 2011 11:34 PM
> To: CakePHP
> Subject: Re: setFlash issue in 1.3?
>
> i have an setFlash issue as well..whenever i'm using $ajax-
> >submit() the setFlash message doesn't appear on my page? what's
> wrong ?
>
> On May 19, 2:11 am, Michael Gaiser  wrote:
> > This line no longer seems to output a message nor does any other use of
> > setFlash.
>
> > $this->Session->setFlash('Cookie created. It will expire
> > '.$this->Time->niceTime($cookie['expire']));
>
> > So when I was using 1.2 my code seemed to work out ok. Since migrating to
> > 1.3, I have made sure that Session was defined in my component and helper
> > arrays within my app_controller. Using setFlash used to display a message
> in
> > the next page. Is this still the proper way to use it? Any help on this
> > would be greatly appreciated.
>
> > ~Michael
>
> --
> Our newest site for the community: CakePHP Video 
> Tutorialshttp://tv.cakephp.org
> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> others with their CakePHP related questions.
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


setFlash doesn't appears using $ajax->submit

2011-06-16 Thread Cruisine
hi guys,recently i've been using ajax submit to save the data into
database...but whenever i use $ajax->submit(), setFlash doesn't appear
on my page.i'm so curious what's wrong with the setFlash...and
it'll terrible since i can't show to the user whether the data have
already saved or not
need ur help soon..thanks...

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: setFlash issue in 1.3?

2011-06-16 Thread Krissy Masters
If your submitting the form ajax then odds are your not updating
(refreshing) the whole page. Just the form or div so if your session->flash
is outside of this updated area then its not being updated. You would need
to use javascript to update that.

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Cruisine
Sent: Thursday, June 16, 2011 11:34 PM
To: CakePHP
Subject: Re: setFlash issue in 1.3?

i have an setFlash issue as well..whenever i'm using $ajax-
>submit() the setFlash message doesn't appear on my page? what's
wrong ?

On May 19, 2:11 am, Michael Gaiser  wrote:
> This line no longer seems to output a message nor does any other use of
> setFlash.
>
> $this->Session->setFlash('Cookie created. It will expire
> '.$this->Time->niceTime($cookie['expire']));
>
> So when I was using 1.2 my code seemed to work out ok. Since migrating to
> 1.3, I have made sure that Session was defined in my component and helper
> arrays within my app_controller. Using setFlash used to display a message
in
> the next page. Is this still the proper way to use it? Any help on this
> would be greatly appreciated.
>
> ~Michael

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: setFlash issue in 1.3?

2011-06-16 Thread Cruisine
i have an setFlash issue as well..whenever i'm using $ajax-
>submit() the setFlash message doesn't appear on my page? what's
wrong ?

On May 19, 2:11 am, Michael Gaiser  wrote:
> This line no longer seems to output a message nor does any other use of
> setFlash.
>
> $this->Session->setFlash('Cookie created. It will expire
> '.$this->Time->niceTime($cookie['expire']));
>
> So when I was using 1.2 my code seemed to work out ok. Since migrating to
> 1.3, I have made sure that Session was defined in my component and helper
> arrays within my app_controller. Using setFlash used to display a message in
> the next page. Is this still the proper way to use it? Any help on this
> would be greatly appreciated.
>
> ~Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: setFlash issue in 1.3?

2011-06-16 Thread RománMussi
Hello,
check the following:

SessionHelper in 1.3
flash() no longer auto echos. You must add an echo $session->flash();
to your session->flash() calls. flash() was the only helper method
that auto outputted, and was changed to create consistency in helper
methods.

HTH
Regards
Román Mussi

On Jun 15, 10:49 am, john lyles  wrote:
> I have a similar problem and wondering if this is a problem with
> 1.3.10
>
> On May 18, 3:11 pm, Michael Gaiser  wrote:
>
>
>
>
>
>
>
> > This line no longer seems to output a message nor does any other use of
> > setFlash.
>
> > $this->Session->setFlash('Cookie created. It will expire
> > '.$this->Time->niceTime($cookie['expire']));
>
> > So when I was using 1.2 my code seemed to work out ok. Since migrating to
> > 1.3, I have made sure that Session was defined in my component and helper
> > arrays within my app_controller. Using setFlash used to display a message in
> > the next page. Is this still the proper way to use it? Any help on this
> > would be greatly appreciated.
>
> > ~Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: setFlash issue in 1.3?

2011-06-15 Thread john lyles
I have a similar problem and wondering if this is a problem with
1.3.10


On May 18, 3:11 pm, Michael Gaiser  wrote:
> This line no longer seems to output a message nor does any other use of
> setFlash.
>
> $this->Session->setFlash('Cookie created. It will expire
> '.$this->Time->niceTime($cookie['expire']));
>
> So when I was using 1.2 my code seemed to work out ok. Since migrating to
> 1.3, I have made sure that Session was defined in my component and helper
> arrays within my app_controller. Using setFlash used to display a message in
> the next page. Is this still the proper way to use it? Any help on this
> would be greatly appreciated.
>
> ~Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


setFlash issue in 1.3?

2011-05-18 Thread Michael Gaiser
This line no longer seems to output a message nor does any other use of
setFlash.

$this->Session->setFlash('Cookie created. It will expire
'.$this->Time->niceTime($cookie['expire']));


So when I was using 1.2 my code seemed to work out ok. Since migrating to
1.3, I have made sure that Session was defined in my component and helper
arrays within my app_controller. Using setFlash used to display a message in
the next page. Is this still the proper way to use it? Any help on this
would be greatly appreciated.


~Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


preguntas sobre setFlash

2011-03-30 Thread c.pfar...@gmail.com
Hola gente, resulta que tengo un sitio en el que por diferentes
circunstancias se hacen ciertos informes sobre procesos que se llevaron a
cabo como ¨guardado correctaemnte¨, ¨hubo un error¨ etc bueno todos los
errores los estoy poniendo de la forma siguiente:

$this->Session->setFlash(...);
$this->redirect(...);

El problema es que a veces ( y no se porque motivo) me quedan seteados
dichos errores en la sesión, entonces al entrar a otra acción o vista se me
muestra nuevamente el flash cuando en realidad no debería mostrarse, y el
problema es que no puedo hacer un unset de la session ya que puede que
efectivamente sea un error lo que este seteado... que forma hay de resolver
dicha cuestión?
gracias

*Christian*

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: setflash edit

2011-01-15 Thread lvdb
Hello Dr. Loboto,

Thank you, it works.

Leo


On 13 jan, 02:34, "Dr. Loboto"  wrote:
> You see page cached by browser when hit "previous" button there.
> Disable cache at all by $this->disableCache() in controller, or do not
> use "previous" button.
>
> On 13 янв, 02:14, lvdb  wrote:
>
>
>
> > Hello Amit,
>
> > Thank you for your reply.
> > I will try to explain it
>
> > First I am editing a record in the edit view. When I save the record
> > it redirects me to the index view and give a message "Job has been
> > updated".
> > Second step is I go to the detail view and check the details after
> > that I go back to the index view (with the button "previous" in the
> > browser).
> > But when I enter the index view it gives me again the message "Job has
> > been updated".
> > I looked in the source of the index view and this div has been
> > created:
>
> > Job has been updated
>
> > When I now refresh the page with F5 the div is gone.
>
> > I hope you understand it
>
> > Leo van den Berg
>
> > On 12 jan, 04:58, Amit Badkas  wrote:
>
> > > Hi,
>
> > > As I already mentioned "You don't need to delete flash message in session
> > > explicitly, $this->Session->flash() does it automagically.", the message
> > > doesn't appear after page refresh.
>
> > > In the first message you mentioned "But when I go after the edit to the
> > > details view and back to the index view it gives me the message 'your job
> > > has been updated'." and now you are asking "How can I refresh the page to
> > > remove the flash message from the page?". So, I am confused about what
> > > exactly you need. Please be specific about your problem.
>
> > > Amit Badkas
>
> > > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > > On Tue, Jan 11, 2011 at 11:42 PM, lvdb  wrote:
> > > > Hello Amit,
>
> > > > Thank you for your answer. When I refresh the view page the message is
> > > > gone.
> > > > It is not done automatically. How can I refresh the page?
>
> > > > Leo
>
> > > > On 10 jan, 07:31, Amit Badkas  wrote:
> > > > > Hi,
>
> > > > > Does the details page output flash message? You don't need to delete
> > > > flash
> > > > > message in session explicitly, $this->Session->flash() does it
> > > > > automagically.
>
> > > > > Amit Badkas
>
> > > > > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > > > > On Sat, Jan 8, 2011 at 1:13 AM, lvdb  
> > > > > wrote:
> > > > > > Hello,
>
> > > > > > I have made a flash message "your job has been updated". When I 
> > > > > > edit a
> > > > > > job and have been redirected to the index view the message appears
> > > > > > (and after 3 seconds it hides). This is working fine. But when I go
> > > > > > after the
> > > > > > edit to the details view and back to the index view it gives me the
> > > > > > message "your job has been updated".
> > > > > > Must I delete the session and how do I do that?
>
> > > > > > Thank you in advance for your answer.
>
> > > > > > Leo van den Berg
>
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > others
> > > > > > with their CakePHP related questions.
>
> > > > > > You received this message because you are subscribed to the Google
> > > > Groups
> > > > > > "CakePHP" group.
> > > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > cake-php+unsubscr...@googlegroups.com
> > > > For more options, visit this
> > > > group at
> > > > > >http://groups.google.com/group/cake-php?hl=en-Tekstuitoorspronkelijk
> > > > bericht niet weergeven -
>
> > > > > - Tekst uit oorspronkelijk bericht weergeven -
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google 
> > > > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.comFor
> > > >  more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en-Tekstuit oorspronkelijk 
> > > >bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setflash edit

2011-01-12 Thread Dr. Loboto
You see page cached by browser when hit "previous" button there.
Disable cache at all by $this->disableCache() in controller, or do not
use "previous" button.

On 13 янв, 02:14, lvdb  wrote:
> Hello Amit,
>
> Thank you for your reply.
> I will try to explain it
>
> First I am editing a record in the edit view. When I save the record
> it redirects me to the index view and give a message "Job has been
> updated".
> Second step is I go to the detail view and check the details after
> that I go back to the index view (with the button "previous" in the
> browser).
> But when I enter the index view it gives me again the message "Job has
> been updated".
> I looked in the source of the index view and this div has been
> created:
>
> Job has been updated
>
> When I now refresh the page with F5 the div is gone.
>
> I hope you understand it
>
> Leo van den Berg
>
> On 12 jan, 04:58, Amit Badkas  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > As I already mentioned "You don't need to delete flash message in session
> > explicitly, $this->Session->flash() does it automagically.", the message
> > doesn't appear after page refresh.
>
> > In the first message you mentioned "But when I go after the edit to the
> > details view and back to the index view it gives me the message 'your job
> > has been updated'." and now you are asking "How can I refresh the page to
> > remove the flash message from the page?". So, I am confused about what
> > exactly you need. Please be specific about your problem.
>
> > Amit Badkas
>
> > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > On Tue, Jan 11, 2011 at 11:42 PM, lvdb  wrote:
> > > Hello Amit,
>
> > > Thank you for your answer. When I refresh the view page the message is
> > > gone.
> > > It is not done automatically. How can I refresh the page?
>
> > > Leo
>
> > > On 10 jan, 07:31, Amit Badkas  wrote:
> > > > Hi,
>
> > > > Does the details page output flash message? You don't need to delete
> > > flash
> > > > message in session explicitly, $this->Session->flash() does it
> > > > automagically.
>
> > > > Amit Badkas
>
> > > > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > > > On Sat, Jan 8, 2011 at 1:13 AM, lvdb  wrote:
> > > > > Hello,
>
> > > > > I have made a flash message "your job has been updated". When I edit a
> > > > > job and have been redirected to the index view the message appears
> > > > > (and after 3 seconds it hides). This is working fine. But when I go
> > > > > after the
> > > > > edit to the details view and back to the index view it gives me the
> > > > > message "your job has been updated".
> > > > > Must I delete the session and how do I do that?
>
> > > > > Thank you in advance for your answer.
>
> > > > > Leo van den Berg
>
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > others
> > > > > with their CakePHP related questions.
>
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "CakePHP" group.
> > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > cake-php+unsubscr...@googlegroups.com
> > > For more options, visit this
> > > group at
> > > > >http://groups.google.com/group/cake-php?hl=en-Tekstuit oorspronkelijk
> > > bericht niet weergeven -
>
> > > > - Tekst uit oorspronkelijk bericht weergeven -
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> > > with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.comFor
> > >  more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en-Tekst uit oorspronkelijk 
> > >bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setflash edit

2011-01-12 Thread lvdb
Hello Amit,

Thank you for your reply.
I will try to explain it

First I am editing a record in the edit view. When I save the record
it redirects me to the index view and give a message "Job has been
updated".
Second step is I go to the detail view and check the details after
that I go back to the index view (with the button "previous" in the
browser).
But when I enter the index view it gives me again the message "Job has
been updated".
I looked in the source of the index view and this div has been
created:

Job has been updated

When I now refresh the page with F5 the div is gone.

I hope you understand it

Leo van den Berg





On 12 jan, 04:58, Amit Badkas  wrote:
> Hi,
>
> As I already mentioned "You don't need to delete flash message in session
> explicitly, $this->Session->flash() does it automagically.", the message
> doesn't appear after page refresh.
>
> In the first message you mentioned "But when I go after the edit to the
> details view and back to the index view it gives me the message 'your job
> has been updated'." and now you are asking "How can I refresh the page to
> remove the flash message from the page?". So, I am confused about what
> exactly you need. Please be specific about your problem.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
>
>
> On Tue, Jan 11, 2011 at 11:42 PM, lvdb  wrote:
> > Hello Amit,
>
> > Thank you for your answer. When I refresh the view page the message is
> > gone.
> > It is not done automatically. How can I refresh the page?
>
> > Leo
>
> > On 10 jan, 07:31, Amit Badkas  wrote:
> > > Hi,
>
> > > Does the details page output flash message? You don't need to delete
> > flash
> > > message in session explicitly, $this->Session->flash() does it
> > > automagically.
>
> > > Amit Badkas
>
> > > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > > On Sat, Jan 8, 2011 at 1:13 AM, lvdb  wrote:
> > > > Hello,
>
> > > > I have made a flash message "your job has been updated". When I edit a
> > > > job and have been redirected to the index view the message appears
> > > > (and after 3 seconds it hides). This is working fine. But when I go
> > > > after the
> > > > edit to the details view and back to the index view it gives me the
> > > > message "your job has been updated".
> > > > Must I delete the session and how do I do that?
>
> > > > Thank you in advance for your answer.
>
> > > > Leo van den Berg
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com
> > For more options, visit this
> > group at
> > > >http://groups.google.com/group/cake-php?hl=en-Tekst uit oorspronkelijk
> > bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk 
> >bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setflash edit

2011-01-11 Thread Amit Badkas
Hi,

As I already mentioned "You don't need to delete flash message in session
explicitly, $this->Session->flash() does it automagically.", the message
doesn't appear after page refresh.

In the first message you mentioned "But when I go after the edit to the
details view and back to the index view it gives me the message 'your job
has been updated'." and now you are asking "How can I refresh the page to
remove the flash message from the page?". So, I am confused about what
exactly you need. Please be specific about your problem.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Tue, Jan 11, 2011 at 11:42 PM, lvdb  wrote:

> Hello Amit,
>
> Thank you for your answer. When I refresh the view page the message is
> gone.
> It is not done automatically. How can I refresh the page?
>
> Leo
>
> On 10 jan, 07:31, Amit Badkas  wrote:
> > Hi,
> >
> > Does the details page output flash message? You don't need to delete
> flash
> > message in session explicitly, $this->Session->flash() does it
> > automagically.
> >
> > Amit Badkas
> >
> > PHP Applications for E-Biz:http://www.sanisoft.com
> >
> >
> >
> > On Sat, Jan 8, 2011 at 1:13 AM, lvdb  wrote:
> > > Hello,
> >
> > > I have made a flash message "your job has been updated". When I edit a
> > > job and have been redirected to the index view the message appears
> > > (and after 3 seconds it hides). This is working fine. But when I go
> > > after the
> > > edit to the details view and back to the index view it gives me the
> > > message "your job has been updated".
> > > Must I delete the session and how do I do that?
> >
> > > Thank you in advance for your answer.
> >
> > > Leo van den Berg
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk
> bericht niet weergeven -
> >
> > - Tekst uit oorspronkelijk bericht weergeven -
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setflash edit

2011-01-11 Thread lvdb
Hello Amit,

Thank you for your answer. When I refresh the view page the message is
gone.
It is not done automatically. How can I refresh the page?

Leo

On 10 jan, 07:31, Amit Badkas  wrote:
> Hi,
>
> Does the details page output flash message? You don't need to delete flash
> message in session explicitly, $this->Session->flash() does it
> automagically.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
>
>
> On Sat, Jan 8, 2011 at 1:13 AM, lvdb  wrote:
> > Hello,
>
> > I have made a flash message "your job has been updated". When I edit a
> > job and have been redirected to the index view the message appears
> > (and after 3 seconds it hides). This is working fine. But when I go
> > after the
> > edit to the details view and back to the index view it gives me the
> > message "your job has been updated".
> > Must I delete the session and how do I do that?
>
> > Thank you in advance for your answer.
>
> > Leo van den Berg
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk 
> >bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setflash edit

2011-01-09 Thread Amit Badkas
Hi,

Does the details page output flash message? You don't need to delete flash
message in session explicitly, $this->Session->flash() does it
automagically.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Sat, Jan 8, 2011 at 1:13 AM, lvdb  wrote:

> Hello,
>
> I have made a flash message "your job has been updated". When I edit a
> job and have been redirected to the index view the message appears
> (and after 3 seconds it hides). This is working fine. But when I go
> after the
> edit to the details view and back to the index view it gives me the
> message "your job has been updated".
> Must I delete the session and how do I do that?
>
> Thank you in advance for your answer.
>
> Leo van den Berg
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setflash edit

2011-01-07 Thread lvdb
Hello,

I have made a flash message "your job has been updated". When I edit a
job and have been redirected to the index view the message appears
(and after 3 seconds it hides). This is working fine. But when I go
after the
edit to the details view and back to the index view it gives me the
message "your job has been updated".
Must I delete the session and how do I do that?

Thank you in advance for your answer.

Leo van den Berg

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Setflash change background color

2011-01-04 Thread lvdb
Thanks for your answer.

Leo

On 29 dec 2010, 17:37, john lyles  wrote:
> You are not telling it to look in the right place. You are giving a
> location of .message but in fact it is located at div.message, the div
> in this case being div id="content". Remove this div and then .message
> would make sense. It also matters if you put your styles before or
> after you include the external css. If you put it after you load
> cake.generic.css then it should work. But if you put it before
> cake.generic.css it will not work. And it would be best just to change
> it inside the .css
>
> On Dec 29, 10:30 am, lvdb  wrote:
>
>
>
> > Hello,
>
> > I want to change the appearance of the default message (edit success).
> > I have put the following code in the standard layout:
>
> > 
>
> > .message
> > {
> >     position:absolute;
> >     top:0px;
> >     left:100px;
> >     width:300px;
> >     font-size:14px;
> >     background-color:green;
>
> >     }
> > 
>
> > It works but the background color is still red.  What can I do to make
> > the color green. I tried  also different colors
> > (#fff9d9 ) nothing works.
>
> > Regards,
>
> > Leo- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Setflash change background color

2010-12-29 Thread john lyles
You are not telling it to look in the right place. You are giving a
location of .message but in fact it is located at div.message, the div
in this case being div id="content". Remove this div and then .message
would make sense. It also matters if you put your styles before or
after you include the external css. If you put it after you load
cake.generic.css then it should work. But if you put it before
cake.generic.css it will not work. And it would be best just to change
it inside the .css





On Dec 29, 10:30 am, lvdb  wrote:
> Hello,
>
> I want to change the appearance of the default message (edit success).
> I have put the following code in the standard layout:
>
> 
>
> .message
> {
>     position:absolute;
>     top:0px;
>     left:100px;
>     width:300px;
>     font-size:14px;
>     background-color:green;
>
>     }
> 
>
> It works but the background color is still red.  What can I do to make
> the color green. I tried  also different colors
> (#fff9d9 ) nothing works.
>
> Regards,
>
> Leo

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Setflash change background color

2010-12-29 Thread lvdb
Hello,

I want to change the appearance of the default message (edit success).
I have put the following code in the standard layout:



.message
{
position:absolute;
top:0px;
left:100px;
width:300px;
font-size:14px;
background-color:green;

}


It works but the background color is still red.  What can I do to make
the color green. I tried  also different colors
(#fff9d9 ) nothing works.

Regards,

Leo

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash problem

2010-12-22 Thread euromark
if you think about it, a single "1" somewhere usually ALWAYS is some
echo of a boolean value
false => '' (empty string), true => '1'

echo $someBooleanReturnValue; // (here we go...)

On 22 Dez., 12:56, Stephen  wrote:
> I've been having this issue for some time! Ahah, excellent
>
> On 22 December 2010 07:09, sherzo  wrote:
>
>
>
>
>
>
>
>
>
>
>
> > Thank you guys! yes Im using 1.2 and after I removing "echo" I'm not
> > having that "1"!!! I spent hours last night to remove that 1
>
> > Thanks
> > Sherry
> > --
> > View this message in context:
> >http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp...
> > Sent from the CakePHP mailing list archive at Nabble.com.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> Kind Regards
>  Stephen @ NinjaCoderMonkey
>
>  www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash problem

2010-12-22 Thread Stephen
I've been having this issue for some time! Ahah, excellent

On 22 December 2010 07:09, sherzo  wrote:

>
> Thank you guys! yes Im using 1.2 and after I removing "echo" I'm not
> having that "1"!!! I spent hours last night to remove that 1
>
>
> Thanks
> Sherry
> --
> View this message in context:
> http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash problem

2010-12-21 Thread sherzo

Thank you guys! yes Im using 1.2 and after I removing "echo" I'm not
having that "1"!!! I spent hours last night to remove that 1


Thanks
Sherry
-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash problem

2010-12-21 Thread euromark
what version are u using?
sounds to me like you you use cake1.2 but this piece of code is
cake1.3 style

dont echo it in 1.2

$session->flash();

On 22 Dez., 02:02, Ryan Schmidt  wrote:
> On Dec 21, 2010, at 18:51, sherzo wrote:
>
> > I have the following lines in my controller:
> > $this->Session->setFlash('blabla');
> > $this->redirect(array('action'=>'unsuccessful'));
> > exit();
>
> > and this part in my view:
> > if ($session->check('Message.flash')) {
> >     echo $session->flash();
> > }
>
> > but the result will be :
> > blabla1
>
> > I have that 1 extra in my view!!!
>
> My layout has:
>
> echo $this->Session->flash();
>
> Not sure if that makes a difference (vs. your "echo $session->flash();").
>
> If not, then I suspect you have another echo somewhere else in your code 
> that's printing that 1.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash problem

2010-12-21 Thread Ryan Schmidt

On Dec 21, 2010, at 18:51, sherzo wrote:

> I have the following lines in my controller:
> $this->Session->setFlash('blabla');
> $this->redirect(array('action'=>'unsuccessful'));
> exit();
> 
> and this part in my view:
> if ($session->check('Message.flash')) {
> echo $session->flash();
> }
> 
> but the result will be :
> blabla1
> 
> I have that 1 extra in my view!!!


My layout has:

echo $this->Session->flash();

Not sure if that makes a difference (vs. your "echo $session->flash();").

If not, then I suspect you have another echo somewhere else in your code that's 
printing that 1.



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


$this->Session->setFlash problem

2010-12-21 Thread sherzo

Hi All

I have the following lines in my controller:
$this->Session->setFlash('blabla');
$this->redirect(array('action'=>'unsuccessful'));
exit();

and this part in my view:
if ($session->check('Message.flash')) {
 echo $session->flash();
}

but the result will be :
blabla1

I have that 1 extra in my view!!!
can anyone help me please!

Thanks
Sherry 
-- 
View this message in context: 
http://cakephp.19694.n2.nabble.com/this-Session-setFlash-problem-tp5856173p5856173.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Ahmed Abdulmoula
Thank you Jeremy


On Mon, Dec 20, 2010 at 1:14 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> How are you writing out the session message in the view? I t ought to be:
> echo $this->Session->flash();
>
> Jeremy Burns
> *Class Outfit*
> *
> *
> jeremybu...@classoutfit.com 
> http://www.classoutfit.com
>
> On 20 Dec 2010, at 10:11, Ahmed Abdulmoula wrote:
>
>
> I am using mine Layout
>
>
> On Mon, Dec 20, 2010 at 1:00 PM, Amit Badkas wrote:
>
>> Hi,
>>
>> The controller code seems to be fine. Are you using CakePHP's built-in
>> layout or your own?
>>
>> Amit Badkas
>>
>> PHP Applications for E-Biz: http://www.sanisoft.com
>>
>>
>>
>> On Mon, Dec 20, 2010 at 12:52 PM, Ahmed - CakePHP > > wrote:
>>
>>>
>>> This is the Controller code:
>>>
>>> >> class PostsController extends AppController {
>>>var $name = 'Posts';
>>>var $helpers = array('Session','Html','Form');
>>>var $components = array('Session');
>>>
>>>function index() {
>>>$this->set('posts', $this->Post->find('all', array('order'
>>> =>
>>> array('id DESC';
>>>}
>>>
>>>    function add() {
>>>if (!empty($this->data)) {
>>>$this->Post->create();
>>>if ($this->Post->save($this->data)) {
>>>$this->Session->setFlash('The post has been added
>>> successfully.');
>>>$this->reDirect(array('action' => 'index'));
>>>} else {
>>>$this->Session->setFlash('The post has not been
>>> added
>>> successfullt');
>>>}
>>>}
>>>}
>>> }
>>> ?>
>>>
>>>
>>> On Dec 20, 10:02 am, Amit Badkas  wrote:
>>> > Hi,
>>> >
>>> > Have you followed the blog tutorial exactly? If you can show me the
>>> code
>>> > written by you, that would be helpful to go ahead to solve the problem.
>>> >
>>> > Amit Badkas
>>> >
>>> > PHP Applications for E-Biz:http://www.sanisoft.com
>>> >
>>> > On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP <
>>> ahmed.amo...@gmail.com>wrote:
>>> >
>>> >
>>> >
>>> > > Any help here ?!?!?!
>>> >
>>> > > On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
>>> > > > You said:
>>> > > > "Make sure you have declared both the Session Component and the
>>> > > > Session Helper in your app_controller."
>>> >
>>> > > > How to do that ?!?!
>>> > > > What shill I do exactly Jeremy ?
>>> >
>>> > > > On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
>>> >
>>> > > >  wrote:
>>> > > > > Make sure you have declared both the Session Component and the
>>> Session
>>> > > Helper in your app_controller. setFlash only places the message into
>>> the
>>> > > session. To show it, use echo $this->Session->flash() in a view,
>>> element or
>>> > > layout.
>>> >
>>> > > > > Jeremy Burns
>>> > > > > Class Outfit
>>> >
>>> > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>>> >
>>> > > > > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
>>> >
>>> > > > > > Hello,
>>> >
>>> > > > > > I am very very very new on CakePHP.
>>> > > > > > I tried to do a blog using the CakePHP. I did it :).
>>> > > > > > but I found a problem:
>>> > > > > > when I want to use "$this->Session->setFlash("Write
>>> whatever");"
>>> >
>>> > > > > > it doesn't work.
>>> > > > > > I don't see the sentences that I write inside setFlash. They
>>> doesn't
>>> > > > > > occur when I run the code/functions.
>>> >
>>> > > > > >

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Jeremy Burns | Class Outfit
How are you writing out the session message in the view? I t ought to be: echo 
$this->Session->flash();

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 20 Dec 2010, at 10:11, Ahmed Abdulmoula wrote:

> 
> I am using mine Layout 
> 
> 
> On Mon, Dec 20, 2010 at 1:00 PM, Amit Badkas  wrote:
> Hi,
> 
> The controller code seems to be fine. Are you using CakePHP's built-in layout 
> or your own?
> 
> Amit Badkas
> 
> PHP Applications for E-Biz: http://www.sanisoft.com
> 
> 
> 
> On Mon, Dec 20, 2010 at 12:52 PM, Ahmed - CakePHP  
> wrote:
> 
> This is the Controller code:
> 
>  class PostsController extends AppController {
>var $name = 'Posts';
>var $helpers = array('Session','Html','Form');
>var $components = array('Session');
> 
>function index() {
>$this->set('posts', $this->Post->find('all', array('order' =>
> array('id DESC';
>}
> 
>function add() {
>if (!empty($this->data)) {
>$this->Post->create();
>if ($this->Post->save($this->data)) {
>$this->Session->setFlash('The post has been added 
> successfully.');
>$this->reDirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash('The post has not been added
> successfullt');
>}
>}
>}
> }
> ?>
> 
> 
> On Dec 20, 10:02 am, Amit Badkas  wrote:
> > Hi,
> >
> > Have you followed the blog tutorial exactly? If you can show me the code
> > written by you, that would be helpful to go ahead to solve the problem.
> >
> > Amit Badkas
> >
> > PHP Applications for E-Biz:http://www.sanisoft.com
> >
> > On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP 
> > wrote:
> >
> >
> >
> > > Any help here ?!?!?!
> >
> > > On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
> > > > You said:
> > > > "Make sure you have declared both the Session Component and the
> > > > Session Helper in your app_controller."
> >
> > > > How to do that ?!?!
> > > > What shill I do exactly Jeremy ?
> >
> > > > On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
> >
> > > >  wrote:
> > > > > Make sure you have declared both the Session Component and the Session
> > > Helper in your app_controller. setFlash only places the message into the
> > > session. To show it, use echo $this->Session->flash() in a view, element 
> > > or
> > > layout.
> >
> > > > > Jeremy Burns
> > > > > Class Outfit
> >
> > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > > > > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
> >
> > > > > > Hello,
> >
> > > > > > I am very very very new on CakePHP.
> > > > > > I tried to do a blog using the CakePHP. I did it :).
> > > > > > but I found a problem:
> > > > > > when I want to use "$this->Session->setFlash("Write whatever");"
> >
> > > > > > it doesn't work.
> > > > > > I don't see the sentences that I write inside setFlash. They doesn't
> > > > > > occur when I run the code/functions.
> >
> > > > > > I am using the local server "WAMP"
> >
> > > > > > Can you please tell me what is the problem ?
> >
> > > > > > Regards,
> > > > > > Ahmed
> >
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > others with their CakePHP related questions.
> >
> > > > > > You received this message because you are subscribed to the Google
> > > Groups "CakePHP" group.
> > > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > cake-php+unsubscr...@googlegroups.comFor
> > > > > >  more options, visit this group athttp://
> > > groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > &g

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Ahmed Abdulmoula
I am using mine Layout


On Mon, Dec 20, 2010 at 1:00 PM, Amit Badkas wrote:

> Hi,
>
> The controller code seems to be fine. Are you using CakePHP's built-in
> layout or your own?
>
> Amit Badkas
>
> PHP Applications for E-Biz: http://www.sanisoft.com
>
>
>
> On Mon, Dec 20, 2010 at 12:52 PM, Ahmed - CakePHP 
> wrote:
>
>>
>> This is the Controller code:
>>
>> > class PostsController extends AppController {
>>var $name = 'Posts';
>>var $helpers = array('Session','Html','Form');
>>var $components = array('Session');
>>
>>function index() {
>>$this->set('posts', $this->Post->find('all', array('order'
>> =>
>> array('id DESC';
>>}
>>
>>function add() {
>>if (!empty($this->data)) {
>>$this->Post->create();
>>if ($this->Post->save($this->data)) {
>>$this->Session->setFlash('The post has been added
>> successfully.');
>>$this->reDirect(array('action' => 'index'));
>>} else {
>>$this->Session->setFlash('The post has not been
>> added
>> successfullt');
>>}
>>}
>>}
>> }
>> ?>
>>
>>
>> On Dec 20, 10:02 am, Amit Badkas  wrote:
>> > Hi,
>> >
>> > Have you followed the blog tutorial exactly? If you can show me the code
>> > written by you, that would be helpful to go ahead to solve the problem.
>> >
>> > Amit Badkas
>> >
>> > PHP Applications for E-Biz:http://www.sanisoft.com
>> >
>> > On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP <
>> ahmed.amo...@gmail.com>wrote:
>> >
>> >
>> >
>> > > Any help here ?!?!?!
>> >
>> > > On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
>> > > > You said:
>> > > > "Make sure you have declared both the Session Component and the
>> > > > Session Helper in your app_controller."
>> >
>> > > > How to do that ?!?!
>> > > > What shill I do exactly Jeremy ?
>> >
>> > > > On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
>> >
>> > > >  wrote:
>> > > > > Make sure you have declared both the Session Component and the
>> Session
>> > > Helper in your app_controller. setFlash only places the message into
>> the
>> > > session. To show it, use echo $this->Session->flash() in a view,
>> element or
>> > > layout.
>> >
>> > > > > Jeremy Burns
>> > > > > Class Outfit
>> >
>> > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>> >
>> > > > > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
>> >
>> > > > > > Hello,
>> >
>> > > > > > I am very very very new on CakePHP.
>> > > > > > I tried to do a blog using the CakePHP. I did it :).
>> > > > > > but I found a problem:
>> > > > > > when I want to use "$this->Session->setFlash("Write whatever");"
>> >
>> > > > > > it doesn't work.
>> > > > > > I don't see the sentences that I write inside setFlash. They
>> doesn't
>> > > > > > occur when I run the code/functions.
>> >
>> > > > > > I am using the local server "WAMP"
>> >
>> > > > > > Can you please tell me what is the problem ?
>> >
>> > > > > > Regards,
>> > > > > > Ahmed
>> >
>> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
>> > > others with their CakePHP related questions.
>> >
>> > > > > > You received this message because you are subscribed to the
>> Google
>> > > Groups "CakePHP" group.
>> > > > > > To post to this group, send email to cake-php@googlegroups.com
>> > > > > > To unsubscribe from this group, send email to
>> > > > > > cake-php+unsubscr...@googlegroups.com
>> >For
>> more options, visit this group ath

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Amit Badkas
Hi,

The controller code seems to be fine. Are you using CakePHP's built-in
layout or your own?

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Mon, Dec 20, 2010 at 12:52 PM, Ahmed - CakePHP wrote:

>
> This is the Controller code:
>
>  class PostsController extends AppController {
>var $name = 'Posts';
>var $helpers = array('Session','Html','Form');
>var $components = array('Session');
>
>function index() {
>$this->set('posts', $this->Post->find('all', array('order'
> =>
> array('id DESC';
>}
>
>function add() {
>if (!empty($this->data)) {
>$this->Post->create();
>if ($this->Post->save($this->data)) {
>$this->Session->setFlash('The post has been added
> successfully.');
>$this->reDirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash('The post has not been
> added
> successfullt');
>}
>}
>}
> }
> ?>
>
>
> On Dec 20, 10:02 am, Amit Badkas  wrote:
> > Hi,
> >
> > Have you followed the blog tutorial exactly? If you can show me the code
> > written by you, that would be helpful to go ahead to solve the problem.
> >
> > Amit Badkas
> >
> > PHP Applications for E-Biz:http://www.sanisoft.com
> >
> > On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP <
> ahmed.amo...@gmail.com>wrote:
> >
> >
> >
> > > Any help here ?!?!?!
> >
> > > On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
> > > > You said:
> > > > "Make sure you have declared both the Session Component and the
> > > > Session Helper in your app_controller."
> >
> > > > How to do that ?!?!
> > > > What shill I do exactly Jeremy ?
> >
> > > > On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
> >
> > > >  wrote:
> > > > > Make sure you have declared both the Session Component and the
> Session
> > > Helper in your app_controller. setFlash only places the message into
> the
> > > session. To show it, use echo $this->Session->flash() in a view,
> element or
> > > layout.
> >
> > > > > Jeremy Burns
> > > > > Class Outfit
> >
> > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > > > > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
> >
> > > > > > Hello,
> >
> > > > > > I am very very very new on CakePHP.
> > > > > > I tried to do a blog using the CakePHP. I did it :).
> > > > > > but I found a problem:
> > > > > > when I want to use "$this->Session->setFlash("Write whatever");"
> >
> > > > > > it doesn't work.
> > > > > > I don't see the sentences that I write inside setFlash. They
> doesn't
> > > > > > occur when I run the code/functions.
> >
> > > > > > I am using the local server "WAMP"
> >
> > > > > > Can you please tell me what is the problem ?
> >
> > > > > > Regards,
> > > > > > Ahmed
> >
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > others with their CakePHP related questions.
> >
> > > > > > You received this message because you are subscribed to the
> Google
> > > Groups "CakePHP" group.
> > > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group athttp://
> > > groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() doesn't wotk with me on WAMP

2010-12-19 Thread Ahmed - CakePHP

This is the Controller code:

set('posts', $this->Post->find('all', array('order' =>
array('id DESC';
}

function add() {
if (!empty($this->data)) {
$this->Post->create();
if ($this->Post->save($this->data)) {
$this->Session->setFlash('The post has been added 
successfully.');
$this->reDirect(array('action' => 'index'));
} else {
$this->Session->setFlash('The post has not been added
successfullt');
}
}
}
}
?>


On Dec 20, 10:02 am, Amit Badkas  wrote:
> Hi,
>
> Have you followed the blog tutorial exactly? If you can show me the code
> written by you, that would be helpful to go ahead to solve the problem.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
> On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP 
> wrote:
>
>
>
> > Any help here ?!?!?!
>
> > On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
> > > You said:
> > > "Make sure you have declared both the Session Component and the
> > > Session Helper in your app_controller."
>
> > > How to do that ?!?!
> > > What shill I do exactly Jeremy ?
>
> > > On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
>
> > >  wrote:
> > > > Make sure you have declared both the Session Component and the Session
> > Helper in your app_controller. setFlash only places the message into the
> > session. To show it, use echo $this->Session->flash() in a view, element or
> > layout.
>
> > > > Jeremy Burns
> > > > Class Outfit
>
> > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > > > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
>
> > > > > Hello,
>
> > > > > I am very very very new on CakePHP.
> > > > > I tried to do a blog using the CakePHP. I did it :).
> > > > > but I found a problem:
> > > > > when I want to use "$this->Session->setFlash("Write whatever");"
>
> > > > > it doesn't work.
> > > > > I don't see the sentences that I write inside setFlash. They doesn't
> > > > > occur when I run the code/functions.
>
> > > > > I am using the local server "WAMP"
>
> > > > > Can you please tell me what is the problem ?
>
> > > > > Regards,
> > > > > Ahmed
>
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others with their CakePHP related questions.
>
> > > > > You received this message because you are subscribed to the Google
> > Groups "CakePHP" group.
> > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > cake-php+unsubscr...@googlegroups.comFor
> > > > >  more options, visit this group athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() doesn't wotk with me on WAMP

2010-12-19 Thread Amit Badkas
Hi,

Have you followed the blog tutorial exactly? If you can show me the code
written by you, that would be helpful to go ahead to solve the problem.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP wrote:

>
> Any help here ?!?!?!
>
>
> On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
> > You said:
> > "Make sure you have declared both the Session Component and the
> > Session Helper in your app_controller."
> >
> > How to do that ?!?!
> > What shill I do exactly Jeremy ?
> >
> > On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
> >
> >  wrote:
> > > Make sure you have declared both the Session Component and the Session
> Helper in your app_controller. setFlash only places the message into the
> session. To show it, use echo $this->Session->flash() in a view, element or
> layout.
> >
> > > Jeremy Burns
> > > Class Outfit
> >
> > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
> >
> > > > Hello,
> >
> > > > I am very very very new on CakePHP.
> > > > I tried to do a blog using the CakePHP. I did it :).
> > > > but I found a problem:
> > > > when I want to use "$this->Session->setFlash("Write whatever");"
> >
> > > > it doesn't work.
> > > > I don't see the sentences that I write inside setFlash. They doesn't
> > > > occur when I run the code/functions.
> >
> > > > I am using the local server "WAMP"
> >
> > > > Can you please tell me what is the problem ?
> >
> > > > Regards,
> > > > Ahmed
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> others with their CakePHP related questions.
> >
> > > > You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.comFor
> > > >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() doesn't wotk with me on WAMP

2010-12-19 Thread Ahmed - CakePHP

Any help here ?!?!?!


On Dec 19, 10:07 am, Ahmed - CakePHP  wrote:
> You said:
> "Make sure you have declared both the Session Component and the
> Session Helper in your app_controller."
>
> How to do that ?!?!
> What shill I do exactly Jeremy ?
>
> On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
>
>  wrote:
> > Make sure you have declared both the Session Component and the Session 
> > Helper in your app_controller. setFlash only places the message into the 
> > session. To show it, use echo $this->Session->flash() in a view, element or 
> > layout.
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
>
> > > Hello,
>
> > > I am very very very new on CakePHP.
> > > I tried to do a blog using the CakePHP. I did it :).
> > > but I found a problem:
> > > when I want to use "$this->Session->setFlash("Write whatever");"
>
> > > it doesn't work.
> > > I don't see the sentences that I write inside setFlash. They doesn't
> > > occur when I run the code/functions.
>
> > > I am using the local server "WAMP"
>
> > > Can you please tell me what is the problem ?
>
> > > Regards,
> > > Ahmed
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > > with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups 
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() doesn't wotk with me on WAMP

2010-12-18 Thread Ahmed - CakePHP

You said:
"Make sure you have declared both the Session Component and the
Session Helper in your app_controller."

How to do that ?!?!
What shill I do exactly Jeremy ?


On Dec 19, 12:27 am, Jeremy Burns | Class Outfit
 wrote:
> Make sure you have declared both the Session Component and the Session Helper 
> in your app_controller. setFlash only places the message into the session. To 
> show it, use echo $this->Session->flash() in a view, element or layout.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:
>
>
>
> > Hello,
>
> > I am very very very new on CakePHP.
> > I tried to do a blog using the CakePHP. I did it :).
> > but I found a problem:
> > when I want to use "$this->Session->setFlash("Write whatever");"
>
> > it doesn't work.
> > I don't see the sentences that I write inside setFlash. They doesn't
> > occur when I run the code/functions.
>
> > I am using the local server "WAMP"
>
> > Can you please tell me what is the problem ?
>
> > Regards,
> > Ahmed
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() doesn't wotk with me on WAMP

2010-12-18 Thread Jeremy Burns | Class Outfit
Make sure you have declared both the Session Component and the Session Helper 
in your app_controller. setFlash only places the message into the session. To 
show it, use echo $this->Session->flash() in a view, element or layout.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote:

> 
> Hello,
> 
> I am very very very new on CakePHP.
> I tried to do a blog using the CakePHP. I did it :).
> but I found a problem:
> when I want to use "$this->Session->setFlash("Write whatever");"
> 
> it doesn't work.
> I don't see the sentences that I write inside setFlash. They doesn't
> occur when I run the code/functions.
> 
> I am using the local server "WAMP"
> 
> Can you please tell me what is the problem ?
> 
> 
> Regards,
> Ahmed
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setFlash() doesn't wotk with me on WAMP

2010-12-18 Thread Ahmed - CakePHP

Hello,

I am very very very new on CakePHP.
I tried to do a blog using the CakePHP. I did it :).
but I found a problem:
when I want to use "$this->Session->setFlash("Write whatever");"

it doesn't work.
I don't see the sentences that I write inside setFlash. They doesn't
occur when I run the code/functions.

I am using the local server "WAMP"

Can you please tell me what is the problem ?


Regards,
Ahmed

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash

2010-12-15 Thread Tilen Majerle
em...then you can do what Amit said...you can't do in other way :D
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2010/12/15 lvdb 

> Hello Tillen,
>
> Version: 1.3.5
>
> Regards,
>
> Leo
>
> On 15 dec, 00:50, Tilen Majerle  wrote:
> > which version are u using?...
> > --
> > Tilen Majerlehttp://majerle.eu
> >
> > 2010/12/14 lvdb 
> >
> >
> >
> > > Hello,
> >
> > > I'am new to Cakephp. I have been doing the blog tutorial. In this
> > > tutorial there is a setFlash message after
> > > adding a new record. Is it possible to hide this message after 3
> > > seconds?
> >
> > > thank ou in advance for your answer.
> >
> > > Regards,
> >
> > > Leo
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk
> bericht niet weergeven -
> >
> > - Tekst uit oorspronkelijk bericht weergeven -
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash

2010-12-15 Thread lvdb
Hello Tillen,

Version: 1.3.5

Regards,

Leo

On 15 dec, 00:50, Tilen Majerle  wrote:
> which version are u using?...
> --
> Tilen Majerlehttp://majerle.eu
>
> 2010/12/14 lvdb 
>
>
>
> > Hello,
>
> > I'am new to Cakephp. I have been doing the blog tutorial. In this
> > tutorial there is a setFlash message after
> > adding a new record. Is it possible to hide this message after 3
> > seconds?
>
> > thank ou in advance for your answer.
>
> > Regards,
>
> > Leo
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en- Tekst uit oorspronkelijk 
> >bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash

2010-12-14 Thread Amit Badkas
Hi,

Assuming that the flash message DIV has class 'message', you can write
something like following jQuery code

window.setTimeout('$(".message").fadeOut("slow")', 3000);

Hope this helps.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Wed, Dec 15, 2010 at 1:17 AM, lvdb  wrote:

> Hello,
>
> I'am new to Cakephp. I have been doing the blog tutorial. In this
> tutorial there is a setFlash message after
> adding a new record. Is it possible to hide this message after 3
> seconds?
>
> thank ou in advance for your answer.
>
> Regards,
>
> Leo
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash

2010-12-14 Thread Tilen Majerle
which version are u using?...
--
Tilen Majerle
http://majerle.eu



2010/12/14 lvdb 

> Hello,
>
> I'am new to Cakephp. I have been doing the blog tutorial. In this
> tutorial there is a setFlash message after
> adding a new record. Is it possible to hide this message after 3
> seconds?
>
> thank ou in advance for your answer.
>
> Regards,
>
> Leo
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setFlash

2010-12-14 Thread lvdb
Hello,

I'am new to Cakephp. I have been doing the blog tutorial. In this
tutorial there is a setFlash message after
adding a new record. Is it possible to hide this message after 3
seconds?

thank ou in advance for your answer.

Regards,

Leo

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Clear my setFlash

2010-12-06 Thread Stephen
You're working with #flashMessage I assume.

For regular javascript:
http://teamtutorials.com/web-development-tutorials/hide-and-show-a-div-using-javascript

For jQuery reference: http://api.jquery.com/hide/

For prototype reference: http://www.prototypejs.org/api/element/hide

so if you were using jQuery, $('#flashMessage').hide(); would do the trick
etc.

Hope this helps

On 6 December 2010 09:55, Master Ram  wrote:

> Hi..
>
> in my application. i have one Onchange option i used. using
> javascript. in that application i have validation for some fields.
> without entering any fields when i clicking save option. i am getting
> setFlash error message. without changing any thing i am operating
> Onchange operations but the error message still showing.
>
> my requirement is after i changing onchange option i have to clear my
> SetFlash option.
>
>
> how to clear setFlash() using javascript. in cakePHP
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Clear my setFlash

2010-12-06 Thread Master Ram
Hi..

in my application. i have one Onchange option i used. using
javascript. in that application i have validation for some fields.
without entering any fields when i clicking save option. i am getting
setFlash error message. without changing any thing i am operating
Onchange operations but the error message still showing.

my requirement is after i changing onchange option i have to clear my
SetFlash option.


how to clear setFlash() using javascript. in cakePHP

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash

2010-09-27 Thread Taffarel de Lima
você tem que setar o Helper Session no seu controller para que funcione o
metodo setFlash()

var $helpers = array('Session');

2010/9/26 Gilvan Jr. 

> Olá pessoal, aguem saberia me dizer o motivo:
>
> Notice (8): Undefined property: UsersController::$Session [APP
> \controllers\users_controller.php, line 50]
> Code | Context
> UsersController::edit() - APP\controllers\users_controller.php, line
> 50
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
> [main] - APP\webroot\index.php, line 83
>
> Fatal error: Call to a member function setFlash() on a non-object in D:
> \servidor\xampp\htdocs\cacex\app\controllers\users_controller.php on
> line 50
>
> Acontece nas actions, add, edit e delete.
>
> segue o meu código do controller:
>
>  class UsersController extends AppController {
>
>var $name = 'Users';
>
>function area_restrita(){
>
>}
>
>function login(){
>
>}
>
>function logout(){
>$this->redirect($this->Auth->logout()); // Efetuamos logout
>}
>
>function index() {
>$this->User->recursive = 0;
>$this->set('users', $this->paginate());
>}
>
>function view($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Invalid user', true));
>$this->redirect(array('action' => 'index'));
>}
>$this->set('user', $this->User->read(null, $id));
>}
>
>function add() {
>if (!empty($this->data)) {
>$this->User->create();
>if ($this->User->save($this->data)) {
>$this->Session->setFlash(__('The user has
> been saved', true));
>$this->redirect(array('action' => 'index'));
>    } else {
>$this->Session->setFlash(__('The user could
> not be saved. Please,
> try again.', true));
>}
>}
>}
>
>function edit($id = null) {
>if (!$id && empty($this->data)) {
>$this->Session->setFlash(__('Invalid user', true));
>$this->redirect(array('action' => 'index'));
>}
>if (!empty($this->data)) {
>if ($this->User->save($this->data)) {
>$this->Session->setFlash(__('The user has
> been saved', true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('The user could
> not be saved. Please,
> try again.', true));
>}
>}
>if (empty($this->data)) {
>$this->data = $this->User->read(null, $id);
>}
>}
>
>function delete($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Invalid id for user',
> true));
>$this->redirect(array('action'=>'index'));
>}
>if ($this->User->delete($id)) {
>$this->Session->setFlash(__('User deleted', true));
>$this->redirect(array('action'=>'index'));
>}
>$this->Session->setFlash(__('User was not deleted', true));
>$this->redirect(array('action' => 'index'));
>}
> }
> ?>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setFlash

2010-09-27 Thread Gilvan Jr.
Olá pessoal, aguem saberia me dizer o motivo:

Notice (8): Undefined property: UsersController::$Session [APP
\controllers\users_controller.php, line 50]
Code | Context
UsersController::edit() - APP\controllers\users_controller.php, line
50
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83

Fatal error: Call to a member function setFlash() on a non-object in D:
\servidor\xampp\htdocs\cacex\app\controllers\users_controller.php on
line 50

Acontece nas actions, add, edit e delete.

segue o meu código do controller:

redirect($this->Auth->logout()); // Efetuamos logout
}

function index() {
$this->User->recursive = 0;
$this->set('users', $this->paginate());
}

function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid user', true));
$this->redirect(array('action' => 'index'));
}
$this->set('user', $this->User->read(null, $id));
}

function add() {
if (!empty($this->data)) {
$this->User->create();
if ($this->User->save($this->data)) {
$this->Session->setFlash(__('The user has been 
saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The user could not 
be saved. Please,
try again.', true));
}
}
}

function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Invalid user', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->User->save($this->data)) {
$this->Session->setFlash(__('The user has been 
saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The user could not 
be saved. Please,
try again.', true));
    }
}
if (empty($this->data)) {
$this->data = $this->User->read(null, $id);
}
}

function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for user', 
true));
    $this->redirect(array('action'=>'index'));
}
if ($this->User->delete($id)) {
$this->Session->setFlash(__('User deleted', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('User was not deleted', true));
$this->redirect(array('action' => 'index'));
}
}
?>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash and key

2010-09-22 Thread Jeremy Burns | Class Outfit
I read the code for the Session helper, and this behaviour is correct. The div 
does inherit its id from the key, so you can't place css against the id of the 
div in a generic way (unless you want to add a style for each potential id). I 
have made the styles completely class based.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 23 Sep 2010, at 03:53, Jeremy Burns wrote:

> According to the guide, if I do this:
> 
> $this->Session->setFlash('A message.', 'default', array('class' =>
> 'warning'), 'reset_password');
> 
> ...and this in a view:
> 
> echo $this->Session->flash('reset_password');
> 
> ...I ought to get this:
> 
> A message.
> 
> ...but I am actually getting this:
> 
> A message.
> 
> In other words, instead of reading the message in the session key
> 'reset_password' it is applying the key to the id of the div. This
> makes applying CSS a bit tricky.
> 
> I can see the Session['Message']['reset_password'] key in the debug
> toolbar, so it is being set and it is not being cleared after flash
> has rendered it (like a normal setFlash message would be).
> 
> Am I doing something wrong?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setFlash and key

2010-09-22 Thread Jeremy Burns
According to the guide, if I do this:

$this->Session->setFlash('A message.', 'default', array('class' =>
'warning'), 'reset_password');

...and this in a view:

echo $this->Session->flash('reset_password');

...I ought to get this:

A message.

...but I am actually getting this:

A message.

In other words, instead of reading the message in the session key
'reset_password' it is applying the key to the id of the div. This
makes applying CSS a bit tricky.

I can see the Session['Message']['reset_password'] key in the debug
toolbar, so it is being set and it is not being cleared after flash
has rendered it (like a normal setFlash message would be).

Am I doing something wrong?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Custom setflash messages in cakephp 1.3

2010-08-18 Thread Mike Karthauser

On Wed, August 18, 2010 4:23 pm, Andras Kende wrote:
> Try this:

> controller:
>
> $this->Session->setFlash('Edited successfully', 'custom_flash',
> array('class' => 'success'));
>
>
> views/elements/custom_flash.ctp
>
> >
>   
> 
>   
> 
>
>
> css:
>
> .success {
> background-color: red;
> }


you could also use the default flash element which can handle being given
a class

eg:
 $this->Session->setFlash('Edited successfully', 'default', array('class'
=> 'success'));


> On Aug 18, 2010, at 4:37 AM, Petter Andreas Strøm wrote:
>
>> Im trying to create custom designs for setFlash messages. I've seen
>> sevral tutuorials for this, like
>> http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp
>> , but none of them seems to work for me. I've installed cake 1.3 and
>> it seems like it's looking for a element view instead of a layout
>> which i specify in the second argument in the setFlash. Anybody know
>> why? Is there any place to set where to look for the layouts for such
>> messages?
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>


-- 
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mi...@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel:  07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Custom setflash messages in cakephp 1.3

2010-08-18 Thread Andras Kende
Try this:


controller:

$this->Session->setFlash('Edited successfully', 'custom_flash', array('class' 
=> 'success'));


views/elements/custom_flash.ctp

>
  

  



css:

.success { 
background-color: red;
}



Andras Kende
http://www.kende.com



On Aug 18, 2010, at 4:37 AM, Petter Andreas Strøm wrote:

> Im trying to create custom designs for setFlash messages. I've seen
> sevral tutuorials for this, like
> http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp
> , but none of them seems to work for me. I've installed cake 1.3 and
> it seems like it's looking for a element view instead of a layout
> which i specify in the second argument in the setFlash. Anybody know
> why? Is there any place to set where to look for the layouts for such
> messages?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Custom setflash messages in cakephp 1.3

2010-08-18 Thread Petter Andreas Strøm
Im trying to create custom designs for setFlash messages. I've seen
sevral tutuorials for this, like
http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp
, but none of them seems to work for me. I've installed cake 1.3 and
it seems like it's looking for a element view instead of a layout
which i specify in the second argument in the setFlash. Anybody know
why? Is there any place to set where to look for the layouts for such
messages?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: add logged user infos in the setFlash message after login

2010-07-30 Thread Melody Nelson
thanks for your messages

I've tried but $user is always empty in my login message

function login(){
$txtmsg = "Bienvenue ";
$user = $this->Session->read('Auth.User.first_name'); // $user is
empty
//$user = $this->Auth->user('first_name'); // $user is empty
$flashmsg = $txtmsg.$user;
$this->Session->setFlash($flashmsg, 'growl',
array('type'=>'important'));
}

if I debug $_SESSION, I see the infos but the array [Message] is
before the array [Auth], could it be the source of my problem ?

Array
(
[Config] => Array
(
[userAgent] => e3e6252595657764bf058df0bc2e9178
[time] => 1280533844
[timeout] => 100
)

[Message] => Array
(
[flash] => Array
(
[message] => Bienvenue
[element] => growl
[params] => Array
(
[type] => important
)

)

)

[Auth] => Array
(
[User] => Array
(
[id] => 2
[username] => melodyn
[first_name] => Melody
[last_name] => Nelson
[email] =>
[disabled] => 0
[created] => 2010-07-11 23:06:49
[updated] => 2010-07-29 17:30:41
)

)

)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: add logged user infos in the setFlash message after login

2010-07-30 Thread Anthony
Also, instead of grabbing from the session variable directly you
should use one of the cake specific functions...

$user = $_SESSION['Auth']['User']['first_name'];

should be:

$this->Session->read('Auth.User.first_name');

or (I prefer this way as someone can't mess with this data like they
can the session)

$this->Auth->user('first_name');

On Jul 28, 5:22 pm, Melody Nelson  wrote:
> hi (and sorry for my english),
>
> I'm using cake 1.3
>
> I don't find how I can add infos of the logged user in the setFlash
> message after the login
>
> I found how to do it in views but I want to do it in the controller to
> use it a growl message
>
> function login() {
>         $txt = "bla bla bla ";
>         //$user = $this->Session->read('Auth.User.first_name');
>         //$user = $this->Auth->user('first_name');
>         $user = $_SESSION['Auth']['User']['first_name'];
>         $this->Session->setFlash($txt.$user, 'growl',
> array('type'=>'important'));
>
> }
>
> thanks for your help

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: add logged user infos in the setFlash message after login

2010-07-30 Thread Anthony
Set your message as a variable instead of concating them inside the
functions parameter list:

Example:
$text = 'Thank you for logging in: ';
$flashmsg = $txt . $user;
$this->Session->setFlash($flashmsg, 'growl',
array('type'=>'important'));

or

$flashmsg =  'Thank you for logging in: ' . $user;
$this->Session->setFlash($flashmsg, 'growl',
array('type'=>'important'));

I've ran into troubles before while trying to concat strings into a
single functions parameter and have found it best to get the entire
message into a variable before using it as a parameter.

On Jul 28, 5:22 pm, Melody Nelson  wrote:
> hi (and sorry for my english),
>
> I'm using cake 1.3
>
> I don't find how I can add infos of the logged user in the setFlash
> message after the login
>
> I found how to do it in views but I want to do it in the controller to
> use it a growl message
>
> function login() {
>         $txt = "bla bla bla ";
>         //$user = $this->Session->read('Auth.User.first_name');
>         //$user = $this->Auth->user('first_name');
>         $user = $_SESSION['Auth']['User']['first_name'];
>         $this->Session->setFlash($txt.$user, 'growl',
> array('type'=>'important'));
>
> }
>
> thanks for your help

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


add logged user infos in the setFlash message after login

2010-07-29 Thread Melody Nelson
hi (and sorry for my english),

I'm using cake 1.3

I don't find how I can add infos of the logged user in the setFlash
message after the login

I found how to do it in views but I want to do it in the controller to
use it a growl message

function login() {
$txt = "bla bla bla ";
//$user = $this->Session->read('Auth.User.first_name');
//$user = $this->Auth->user('first_name');
$user = $_SESSION['Auth']['User']['first_name'];
$this->Session->setFlash($txt.$user, 'growl',
array('type'=>'important'));
}

thanks for your help

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash not displaying

2010-07-16 Thread StephenE

I am using 1.3.  Your suggestion worked.  Thanks!

>From the perspective of a newbie, the CakePHP 1.3 manual needs better
documentation on the setFlash() method.  They need an example of how
to implement it that actually works.


On Jul 16, 10:25 am, Jeremy Burns | Class Outfit
 wrote:
> Which version of Cake are you using?
>
> There's no need to check for the presence of a message; ->flash() takes care 
> of that for you.
>
> On 1.3:
> echo $this->Session->flash();
>
> On 1.2:
> $this->Session->flash();
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 16 Jul 2010, at 05:58, StephenE wrote:
>
>
>
> > Hello, newbie here.  I cannot get setFlash() to display a message on
> > my view page.
>
> > In the controller:
>
> > $this->Session->setFlash('Please enter the correct number.',
> > 'register', array('class' => 'error-message'));
>
> > In the view page register.ctp:
>
> > check('Message.flash')) { $session->flash();}?>
>
> > This seems so simple.  What am I doing wrong?  Thanks for the help!
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash not displaying

2010-07-16 Thread Jeremy Burns | Class Outfit
Which version of Cake are you using?

There's no need to check for the presence of a message; ->flash() takes care of 
that for you.

On 1.3:
echo $this->Session->flash();

On 1.2:
$this->Session->flash();

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 16 Jul 2010, at 05:58, StephenE wrote:

> 
> Hello, newbie here.  I cannot get setFlash() to display a message on
> my view page.
> 
> In the controller:
> 
> $this->Session->setFlash('Please enter the correct number.',
> 'register', array('class' => 'error-message'));
> 
> In the view page register.ctp:
> 
> check('Message.flash')) { $session->flash();}?>
> 
> This seems so simple.  What am I doing wrong?  Thanks for the help!
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setFlash not displaying

2010-07-16 Thread StephenE

Hello, newbie here.  I cannot get setFlash() to display a message on
my view page.

In the controller:

$this->Session->setFlash('Please enter the correct number.',
'register', array('class' => 'error-message'));

In the view page register.ctp:

check('Message.flash')) { $session->flash();}?>

This seems so simple.  What am I doing wrong?  Thanks for the help!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Session->setFlash error

2010-07-09 Thread matzeh...@googlemail.com
Isn´t the ->flash a methode of 1.3 ? Do you use 1.2 core?

As I know in 1.2 you have to ->setflash and a redirect...

On 9 Jul., 21:51, gautam lakum  wrote:
> I am getting this error in my default.ctp layout.
>
> Notice (8): Undefined variable: session [APP\views\layouts
> \default.ctp, line 74]
> Code | Context
>
> Fatal error: Call to a member function flash() on a non-object in C:
> \wamp\www\rentcar1\app\views\layouts\default.ctp on line 74
>
> This is the layout html I have written.
>
> 
> flash(); ?>
>
> Please help. I am not getting what is happening there?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Session->setFlash error

2010-07-09 Thread gautam lakum
Thanks jeremy, it is working now.

On Jul 9, 1:28 pm, Jeremy Burns | Class Outfit
 wrote:
> If you are on 1.3, don't forget to add the Session helper and Session 
> component to your app_controller.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 9 Jul 2010, at 20:51, gautam lakum wrote:
>
>
>
> > I am getting this error in my default.ctp layout.
>
> > Notice (8): Undefined variable: session [APP\views\layouts
> > \default.ctp, line 74]
> > Code | Context
>
> > Fatal error: Call to a member function flash() on a non-object in C:
> > \wamp\www\rentcar1\app\views\layouts\default.ctp on line 74
>
> > This is the layout html I have written.
>
> > 
> > flash(); ?>
>
> > Please help. I am not getting what is happening there?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Session->setFlash error

2010-07-09 Thread Jeremy Burns | Class Outfit
If you are on 1.3, don't forget to add the Session helper and Session component 
to your app_controller.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 9 Jul 2010, at 20:51, gautam lakum wrote:

> I am getting this error in my default.ctp layout.
> 
> 
> Notice (8): Undefined variable: session [APP\views\layouts
> \default.ctp, line 74]
> Code | Context
> 
> Fatal error: Call to a member function flash() on a non-object in C:
> \wamp\www\rentcar1\app\views\layouts\default.ctp on line 74
> 
> This is the layout html I have written.
> 
> 
> flash(); ?>
> 
> 
> Please help. I am not getting what is happening there?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Session->setFlash error

2010-07-09 Thread gautam lakum
I am getting this error in my default.ctp layout.


Notice (8): Undefined variable: session [APP\views\layouts
\default.ctp, line 74]
Code | Context

Fatal error: Call to a member function flash() on a non-object in C:
\wamp\www\rentcar1\app\views\layouts\default.ctp on line 74

This is the layout html I have written.


flash(); ?>


Please help. I am not getting what is happening there?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with Session->setFlash

2010-05-21 Thread Jeremy Burns
What error are you getting? Can you post the code where you call it? Have you 
included both the Session helper and component in your controller (or 
app_controller)?

Jeremy Burns
jeremybu...@me.com


On 21 May 2010, at 10:48, sami_bk wrote:

> Hi Jeremy,
> 
> Thanks for your reply.
> It did not work with me , is there any other alternative to
> setFlash() ?
> 
> Greetings.
> On May 20, 7:16 pm, Jeremy Burns  wrote:
>> Seems like overkill to me. Just use $this->Session->setFlash('Here is my 
>> message');  Then do echo $this->Session->flash(); - this not only displays 
>> your message but also clears it out of the cache.
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> On 20 May 2010, at 18:16, sami_bk wrote:
>> 
>> 
>> 
>>> Hi all,
>> 
>>> I am new to CakePHP and i am building a small app.
>>> i use Session->setFlash('message') to display notifications to the
>>> users .
>>> The notification is displayed in the default layout and i delete the
>>> flash messega from the session using this code
>>> 
>>> if ($session->check('Message.flash')) {
>>>$message = $session->read('Message.flash') ;
>>>if($message['message'] != '') {
>>>if(is_array($message['message'])) {
>>>$text = "" ;
>>>foreach ($message['message'] as $mes) {
>>>$text = $mes ."" ;
>>>}
>>>}
>>>else $text = $message['message'];
>>> 
>>> 
>>> 
>>>flash() ?>
>>>}
>>> }
>>> 
>>> My problem is that notification are displayed randomly , ie : it seems
>>> that the flash message is not deleted from the session.
>>> PS : using another layout for ajax calls i also delete the flash
>>> message in this layout.
>> 
>>> Thanks in advance for your help
>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
>>> with their CakePHP related questions.
>> 
>>> You received this message because you are subscribed to the Google Groups 
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>>> athttp://groups.google.com/group/cake-php?hl=en
>> 
>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
>> with their CakePHP related questions.
>> 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> athttp://groups.google.com/group/cake-php?hl=en
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with Session->setFlash

2010-05-21 Thread sami_bk
Hi Jeremy,

Thanks for your reply.
It did not work with me , is there any other alternative to
setFlash() ?

Greetings.
On May 20, 7:16 pm, Jeremy Burns  wrote:
> Seems like overkill to me. Just use $this->Session->setFlash('Here is my 
> message');  Then do echo $this->Session->flash(); - this not only displays 
> your message but also clears it out of the cache.
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 20 May 2010, at 18:16, sami_bk wrote:
>
>
>
> > Hi all,
>
> > I am new to CakePHP and i am building a small app.
> > i use Session->setFlash('message') to display notifications to the
> > users .
> > The notification is displayed in the default layout and i delete the
> > flash messega from the session using this code
> > 
> > if ($session->check('Message.flash')) {
> >    $message = $session->read('Message.flash') ;
> >    if($message['message'] != '') {
> >        if(is_array($message['message'])) {
> >            $text = "" ;
> >            foreach ($message['message'] as $mes) {
> >                $text = $mes ."" ;
> >            }
> >        }
> >        else $text = $message['message'];
> > 
> >     
> > 
> >        flash() ?>
> >    }
> > }
> > 
> > My problem is that notification are displayed randomly , ie : it seems
> > that the flash message is not deleted from the session.
> > PS : using another layout for ajax calls i also delete the flash
> > message in this layout.
>
> > Thanks in advance for your help
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with Session->setFlash

2010-05-20 Thread Jeremy Burns
Seems like overkill to me. Just use $this->Session->setFlash('Here is my 
message');  Then do echo $this->Session->flash(); - this not only displays your 
message but also clears it out of the cache.

Jeremy Burns
jeremybu...@me.com


On 20 May 2010, at 18:16, sami_bk wrote:

> Hi all,
> 
> I am new to CakePHP and i am building a small app.
> i use Session->setFlash('message') to display notifications to the
> users .
> The notification is displayed in the default layout and i delete the
> flash messega from the session using this code
> 
> if ($session->check('Message.flash')) {
>$message = $session->read('Message.flash') ;
>if($message['message'] != '') {
>if(is_array($message['message'])) {
>$text = "" ;
>foreach ($message['message'] as $mes) {
>$text = $mes ."" ;
>}
>}
>else $text = $message['message'];
> 
> 
> 
>flash() ?>
>}
> }
> 
> My problem is that notification are displayed randomly , ie : it seems
> that the flash message is not deleted from the session.
> PS : using another layout for ajax calls i also delete the flash
> message in this layout.
> 
> Thanks in advance for your help
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Problem with Session->setFlash

2010-05-20 Thread sami_bk
Hi all,

I am new to CakePHP and i am building a small app.
i use Session->setFlash('message') to display notifications to the
users .
The notification is displayed in the default layout and i delete the
flash messega from the session using this code

if ($session->check('Message.flash')) {
$message = $session->read('Message.flash') ;
if($message['message'] != '') {
if(is_array($message['message'])) {
$text = "" ;
foreach ($message['message'] as $mes) {
$text = $mes ."" ;
}
}
else $text = $message['message'];

 

flash() ?>
}
}

My problem is that notification are displayed randomly , ie : it seems
that the flash message is not deleted from the session.
PS : using another layout for ajax calls i also delete the flash
message in this layout.

Thanks in advance for your help

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: cakephp 1.3 $this->Session->setFlash

2010-03-18 Thread Johannes Goll
I have changed the layout code to

  
flash(); 
   echo $content_for_layout;
?>  
  

and it worked perfectly. Thanks Jeremy .

Johannes

2010/3/18 Jeremy Burns :
> You need to do:
>
> echo $session->flash(); now.
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 18 Mar 2010, at 13:06, Johannes Goll wrote:
>
>> Hi,
>>
>> I am migrating from 1.2 to cakephp 1.3 and am trying to
>> switch to the new $this->Session->setFlash functionality that
>> uses elements:
>>
>> Projects Controller:
>> function edit($id = null) {
>> ...
>> $this->Session->setFlash('The Project has been saved','message');
>> $this->redirect(array('action'=>'index'));
>> ...
>> }
>>
>> Layout:
>> 
>> >
>> $session->flash();
>>
>> echo $content_for_layout;
>> ?>
>> 
>>
>> Element;
>>
>> 
>>       >          echo $message;
>>       ?>
>> 
>>
>> No message is shown on the Projects index page after executing the
>> edit action of the controller.
>> But when I do a die($message) inside the element, the message is displayed.
>>
>> What am I doing wrong here?
>>
>> Thanks,
>> Johannes
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en



-- 
Johannes Goll
211 Curry Ford Lane
Gaithersburg, Maryland 20878

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: cakephp 1.3 $this->Session->setFlash

2010-03-18 Thread Jeremy Burns
You need to do:

echo $session->flash(); now.

Jeremy Burns
jeremybu...@me.com

On 18 Mar 2010, at 13:06, Johannes Goll wrote:

> Hi,
> 
> I am migrating from 1.2 to cakephp 1.3 and am trying to
> switch to the new $this->Session->setFlash functionality that
> uses elements:
> 
> Projects Controller:
> function edit($id = null) {
> ...
> $this->Session->setFlash('The Project has been saved','message');
> $this->redirect(array('action'=>'index'));
> ...
> }
> 
> Layout:
> 
>  
> $session->flash();
>   
> echo $content_for_layout;
> ?>
> 
> 
> Element;
> 
>
> echo $message;
>   ?>  
> 
> 
> No message is shown on the Projects index page after executing the
> edit action of the controller.
> But when I do a die($message) inside the element, the message is displayed.
> 
> What am I doing wrong here?
> 
> Thanks,
> Johannes
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


cakephp 1.3 $this->Session->setFlash

2010-03-18 Thread Johannes Goll
Hi,

I am migrating from 1.2 to cakephp 1.3 and am trying to
switch to the new $this->Session->setFlash functionality that
uses elements:

Projects Controller:
function edit($id = null) {
...
$this->Session->setFlash('The Project has been saved','message');
$this->redirect(array('action'=>'index'));
...
}

Layout:
  
 flash();

 echo $content_for_layout;
?>  
  

Element;

 
  


No message is shown on the Projects index page after executing the
edit action of the controller.
But when I do a die($message) inside the element, the message is displayed.

What am I doing wrong here?

Thanks,
Johannes

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() appending a "1"

2010-01-07 Thread Kerr
euromark -- I had done that, but for some reason had totally blanked
on the issue.  It was likely due to the fact that I'd been up for 20
hours coding. :/

On Jan 7, 7:52 am, euromark  wrote:
> well, its always a good idea to jump into the section in the cake core
> file
> before you bang your head to any solid objects in the room :)
>
> On 7 Jan., 14:40, Kerr  wrote:
>
> > Thanks for the prompt replies, guys!  I am using $this->Session->setFlash() 
> > in my controller after a successful form submission, then
>
> > redirecting, where I echo $session->flash().  I removed the echo, and
> > all is good!  I can't believe I hadn't thought of that before, as I
> > spent an inordinate amount of time banging my head against the wall.
>
> > Hah, I guess I'll have to keep the echo in mind when migrating to
> > 1.3!  I'm only using $session->flash() in a single place in
> > default.ctp, so no big issue there.
>
> > CakePHP rawks!
>
> > On Jan 7, 2:09 am, euromark  wrote:
>
> > > the problem: you echo too much (twice)
>
> > > remove the echo in front of your method
> > > it is a "void" function - at least in 1.2
>
> > > since cakephp 1.3 it actually returns the value and therefore needs
> > > the echo in front of it!
>
> > > On 7 Jan., 06:44, Jeremy Burns  wrote:
>
> > > > How are you setting and displaying the flash value? Consider both an
> > > > instruction, so if you do something like if($this->Session->flash());
> > > > you'll get both the message and a 1 to indicate success. To set the
> > > > value, use $this->Session->setFlash();. To display it, use $this-
>
> > > > >Session->flash();.
>
> > > > On Jan 7, 5:40 am, Kerr  wrote:
>
> > > > > Hi all, I'm experiencing a really weird issue where the 
> > > > > $session->setFlash() method appends a single "1" character directly 
> > > > > after the
>
> > > > > generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
> > > > > I've looked all through the source in SessionComponent, CakeSession
> > > > > and SessionHelper and don't see anywhere where this could be
> > > > > happening. Has anyone else experienced a similar issue?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() appending a "1"

2010-01-07 Thread dilip bakotiya
Use this

$session->flash();

instead of
echo $session->flash();


Thanks
Dilip Bakotiya

On Thu, Jan 7, 2010 at 11:14 AM, Jeremy Burns  wrote:

> How are you setting and displaying the flash value? Consider both an
> instruction, so if you do something like if($this->Session->flash());
> you'll get both the message and a 1 to indicate success. To set the
> value, use $this->Session->setFlash();. To display it, use $this-
> >Session->flash();.
>
> On Jan 7, 5:40 am, Kerr  wrote:
> > Hi all, I'm experiencing a really weird issue where the
> $session->setFlash() method appends a single "1" character directly after
> the
> >
> > generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
> > I've looked all through the source in SessionComponent, CakeSession
> > and SessionHelper and don't see anywhere where this could be
> > happening. Has anyone else experienced a similar issue?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() appending a "1"

2010-01-07 Thread euromark
well, its always a good idea to jump into the section in the cake core
file
before you bang your head to any solid objects in the room :)


On 7 Jan., 14:40, Kerr  wrote:
> Thanks for the prompt replies, guys!  I am using $this->Session->setFlash() 
> in my controller after a successful form submission, then
>
> redirecting, where I echo $session->flash().  I removed the echo, and
> all is good!  I can't believe I hadn't thought of that before, as I
> spent an inordinate amount of time banging my head against the wall.
>
> Hah, I guess I'll have to keep the echo in mind when migrating to
> 1.3!  I'm only using $session->flash() in a single place in
> default.ctp, so no big issue there.
>
> CakePHP rawks!
>
> On Jan 7, 2:09 am, euromark  wrote:
>
> > the problem: you echo too much (twice)
>
> > remove the echo in front of your method
> > it is a "void" function - at least in 1.2
>
> > since cakephp 1.3 it actually returns the value and therefore needs
> > the echo in front of it!
>
> > On 7 Jan., 06:44, Jeremy Burns  wrote:
>
> > > How are you setting and displaying the flash value? Consider both an
> > > instruction, so if you do something like if($this->Session->flash());
> > > you'll get both the message and a 1 to indicate success. To set the
> > > value, use $this->Session->setFlash();. To display it, use $this-
>
> > > >Session->flash();.
>
> > > On Jan 7, 5:40 am, Kerr  wrote:
>
> > > > Hi all, I'm experiencing a really weird issue where the 
> > > > $session->setFlash() method appends a single "1" character directly 
> > > > after the
>
> > > > generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
> > > > I've looked all through the source in SessionComponent, CakeSession
> > > > and SessionHelper and don't see anywhere where this could be
> > > > happening. Has anyone else experienced a similar issue?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() appending a "1"

2010-01-07 Thread Kerr
Thanks for the prompt replies, guys!  I am using $this->Session-
>setFlash() in my controller after a successful form submission, then
redirecting, where I echo $session->flash().  I removed the echo, and
all is good!  I can't believe I hadn't thought of that before, as I
spent an inordinate amount of time banging my head against the wall.

Hah, I guess I'll have to keep the echo in mind when migrating to
1.3!  I'm only using $session->flash() in a single place in
default.ctp, so no big issue there.

CakePHP rawks!

On Jan 7, 2:09 am, euromark  wrote:
> the problem: you echo too much (twice)
>
> remove the echo in front of your method
> it is a "void" function - at least in 1.2
>
> since cakephp 1.3 it actually returns the value and therefore needs
> the echo in front of it!
>
> On 7 Jan., 06:44, Jeremy Burns  wrote:
>
> > How are you setting and displaying the flash value? Consider both an
> > instruction, so if you do something like if($this->Session->flash());
> > you'll get both the message and a 1 to indicate success. To set the
> > value, use $this->Session->setFlash();. To display it, use $this-
>
> > >Session->flash();.
>
> > On Jan 7, 5:40 am, Kerr  wrote:
>
> > > Hi all, I'm experiencing a really weird issue where the 
> > > $session->setFlash() method appends a single "1" character directly after 
> > > the
>
> > > generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
> > > I've looked all through the source in SessionComponent, CakeSession
> > > and SessionHelper and don't see anywhere where this could be
> > > happening. Has anyone else experienced a similar issue?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() appending a "1"

2010-01-07 Thread euromark
the problem: you echo too much (twice)

remove the echo in front of your method
it is a "void" function - at least in 1.2

since cakephp 1.3 it actually returns the value and therefore needs
the echo in front of it!

On 7 Jan., 06:44, Jeremy Burns  wrote:
> How are you setting and displaying the flash value? Consider both an
> instruction, so if you do something like if($this->Session->flash());
> you'll get both the message and a 1 to indicate success. To set the
> value, use $this->Session->setFlash();. To display it, use $this-
>
> >Session->flash();.
>
> On Jan 7, 5:40 am, Kerr  wrote:
>
> > Hi all, I'm experiencing a really weird issue where the 
> > $session->setFlash() method appends a single "1" character directly after 
> > the
>
> > generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
> > I've looked all through the source in SessionComponent, CakeSession
> > and SessionHelper and don't see anywhere where this could be
> > happening. Has anyone else experienced a similar issue?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setFlash() appending a "1"

2010-01-06 Thread Jeremy Burns
How are you setting and displaying the flash value? Consider both an
instruction, so if you do something like if($this->Session->flash());
you'll get both the message and a 1 to indicate success. To set the
value, use $this->Session->setFlash();. To display it, use $this-
>Session->flash();.

On Jan 7, 5:40 am, Kerr  wrote:
> Hi all, I'm experiencing a really weird issue where the $session->setFlash() 
> method appends a single "1" character directly after the
>
> generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
> I've looked all through the source in SessionComponent, CakeSession
> and SessionHelper and don't see anywhere where this could be
> happening. Has anyone else experienced a similar issue?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


setFlash() appending a "1"

2010-01-06 Thread Kerr
Hi all, I'm experiencing a really weird issue where the $session-
>setFlash() method appends a single "1" character directly after the
generated  tag.  I'm using an unmolested copy of CakePHP 1.2.5.
I've looked all through the source in SessionComponent, CakeSession
and SessionHelper and don't see anywhere where this could be
happening. Has anyone else experienced a similar issue?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash();

2010-01-03 Thread j0n4s.h4rtm...@googlemail.com
I use this to make it lots shorter:
$this->Session->setFlash(___('Success Message'), 'flashes/success');

In app/views/layouts/flashes I have



P.s. in app/config/boostrap.php I have

function ___($string) {
return __($string, true);
}

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


RE: $this->Session->setFlash();

2010-01-01 Thread Dave
Thanks,

I found it in the cookbook right after I sent the message but thanks for
your time!

Happy New Year.

Dave 

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Jeremy Burns
Sent: January-02-10 12:50 AM
To: CakePHP
Subject: Re: $this->Session->setFlash();

Hi Dave

Here's how you can do it:

$this->Session->setFlash(__('Your message.', true), true, array ('class' =>
'yourClass'));

On Jan 2, 2:35 am, "Dave"  wrote:
> I was wondering is there a way to add a class to the session from the 
> controller?
>
> The setflash as far as i can see is used for alerting user after a 
> save attempt so
>
> $this->Session->setFlash(__('Information Updated.', true));
>
> or
>
> $this->Session->setFlash(__('Error! Please try again.', true));
>
> So the idea would be for the success message add a class so the 
> message text is green if failed text is red.
>
> Any way this can be done?
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com To
unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group 
cake-php+at http://groups.google.com/group/cake-php?hl=en
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.123/2595 - Release Date: 01/01/10
05:50:00

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this->Session->setFlash();

2010-01-01 Thread Jeremy Burns
Hi Dave

Here's how you can do it:

$this->Session->setFlash(__('Your message.', true), true, array
('class' => 'yourClass'));

On Jan 2, 2:35 am, "Dave"  wrote:
> I was wondering is there a way to add a class to the session from the
> controller?
>
> The setflash as far as i can see is used for alerting user after a save
> attempt so
>
> $this->Session->setFlash(__('Information Updated.', true));
>
> or
>
> $this->Session->setFlash(__('Error! Please try again.', true));
>
> So the idea would be for the success message add a class so the message text
> is green if failed text is red.
>
> Any way this can be done?
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


$this->Session->setFlash();

2010-01-01 Thread Dave
I was wondering is there a way to add a class to the session from the
controller?
 
The setflash as far as i can see is used for alerting user after a save
attempt so 
 
$this->Session->setFlash(__('Information Updated.', true));
 
or
 
$this->Session->setFlash(__('Error! Please try again.', true));
 
So the idea would be for the success message add a class so the message text
is green if failed text is red.
 
Any way this can be done?
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Session setFlash is not working on Firefox 3.5.3

2009-11-20 Thread Octavian
Reinstalled FF, works perfectly.

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.




Re: Session setFlash is not working on Firefox 3.5.3

2009-11-06 Thread nurvzy

@John: You are mistaken. First, if that were the case, flashes
wouldn't work in all the other browser which the OP clearly stated it
does, and secondly, the entire point of flash is to pass a message to
the user through a redirect.  I use them all the time and they work
perfectly well through redirects.

To the OP, it works fine in Firefox 3.5.4 for me, Cent OS server, PHP
5.2.9.   Is it just Firefox 3.5.3?  Have you tried installing the
latest version of firefox in a VM (or somewhere) to repeat the result?

Nick

On Nov 5, 3:33 am, John Andersen  wrote:
> $this->redirect closes the existing session and thus your flash
> message is not passed on!
>
> See the Controller api 
> athttp://api.cakephp.org/view_source/controller/#line-536
>
> Enjoy,
>    John
>
> On Nov 5, 12:12 pm, Octavian  wrote:
>
> > Same configuration & same problems too...
>
> > On 9 okt, 23:56, Franco Bonazza  wrote:
>
> > > Sorry, Cake is 1.2.5, server is Apache 2.2 running on windows, and PHP
> > > is 5.2.
>
> > > Don't know if it's relevant.
>
> > > On 9 oct, 17:12, Franco Bonazza  wrote:
>
> > > > Hello,
>
> > > > Here's my problem
>
> > > > Something this simple:
>
> > > > // controller
>
> > > > Class ExsController extends AppController{
> > > > public function list(){
> > > >         $this->Session->setFlash('Hello');
> > > >         $this->redirect('/exs/new',null,true); // or redirect + die()}
>
> > > > public function new(){}
>
> > > > }
>
> > > > // view layout
>
> > > > flash() ?>
>
> > > > Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
> > > > safari and chrome.
> > > > Session is working, if I write something manually I can see it in
> > > > firefox. I can even see that at some point the message was put in
> > > > session because if I print the session I see the empty message array.
> > > > If I take out the redirect it shows the message in that page even in
> > > > firefox, somehow it gets wiped. As if the script would have continued
> > > > after the redirect... but only in firefox, wich just flips me out. It
> > > > can't be catching a template, I can't imagine that... Anyone has a
> > > > clue about what's happening here?
>
> > > > This happened in a big project but I reduced to something as simple as
> > > > what I pasted and the problem persists.
>
> > > > I hope someone at least tries this and tells me it works for them,
> > > > just to know if I have some weird configuration on browser or server,
> > > > or this really doesn't work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session setFlash is not working on Firefox 3.5.3

2009-10-09 Thread Franco Bonazza

Sorry, Cake is 1.2.5, server is Apache 2.2 running on windows, and PHP
is 5.2.

Don't know if it's relevant.

On 9 oct, 17:12, Franco Bonazza  wrote:
> Hello,
>
> Here's my problem
>
> Something this simple:
>
> // controller
>
> Class ExsController extends AppController{
> public function list(){
>         $this->Session->setFlash('Hello');
>         $this->redirect('/exs/new',null,true); // or redirect + die()}
>
> public function new(){}
>
> }
>
> // view layout
>
> flash() ?>
>
> Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
> safari and chrome.
> Session is working, if I write something manually I can see it in
> firefox. I can even see that at some point the message was put in
> session because if I print the session I see the empty message array.
> If I take out the redirect it shows the message in that page even in
> firefox, somehow it gets wiped. As if the script would have continued
> after the redirect... but only in firefox, wich just flips me out. It
> can't be catching a template, I can't imagine that... Anyone has a
> clue about what's happening here?
>
> This happened in a big project but I reduced to something as simple as
> what I pasted and the problem persists.
>
> I hope someone at least tries this and tells me it works for them,
> just to know if I have some weird configuration on browser or server,
> or this really doesn't work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Session setFlash is not working on Firefox 3.5.3

2009-10-09 Thread Franco Bonazza

Hello,

Here's my problem

Something this simple:

// controller

Class ExsController extends AppController{
public function list(){
$this->Session->setFlash('Hello');
$this->redirect('/exs/new',null,true); // or redirect + die()
}
public function new(){}
}

// view layout

flash() ?>

Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
safari and chrome.
Session is working, if I write something manually I can see it in
firefox. I can even see that at some point the message was put in
session because if I print the session I see the empty message array.
If I take out the redirect it shows the message in that page even in
firefox, somehow it gets wiped. As if the script would have continued
after the redirect... but only in firefox, wich just flips me out. It
can't be catching a template, I can't imagine that... Anyone has a
clue about what's happening here?

This happened in a big project but I reduced to something as simple as
what I pasted and the problem persists.

I hope someone at least tries this and tells me it works for them,
just to know if I have some weird configuration on browser or server,
or this really doesn't work.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Session->setFlash() params not working ??

2009-09-08 Thread Spence

Hi All,

I am trying to change the class attribute for my flash message by
writing this in my controller:

$this->Session->setFlash($errMsg, 'default', array('class' =>
'errormsg'));

AND I GET THE DEFAULT IN MY VIEW:



My view is not cached because changing the message itself works or
using a key param works as well.
Any ideas what's wrong or how I may debug this?

Thanks,
Spence





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: related to Session->setFlash

2009-08-27 Thread cbhan

Sorry for the late reply.Yes, you are right, if you are doing it in
views/layouts/default.ctp

On Aug 21, 6:53 am, kdubya  wrote:
> On Aug 19, 9:01 am, zaboo  wrote:
>
> > Don't echo $this->Session->setFlash()
>
> > On Aug 19, 8:27 am, Chander Bhan  wrote:
>
> > > I always get the digit 1 in the next line of the message sent through
> > > Session->setFlash from controller, need help
>
> I don't understand this answer. I have been having the same problem
> (the number 1 being displayed on the line after the flash message).
> Here is the code snippet from my controller:
>
>   function edit($id = null) {
>     $this->set('schema', $this->Item->_schema);
>     if (!$id && empty($this->data)) {
>       $this->Session->setFlash(__('Invalid Item', true));
>       $this->redirect(array('action'=>'index'));
>     }
>
> And here is the code from the view:
>
> flash();?>
>
> Are you saying that in the view the code should be:
>
> flash();?>
>
> Is that correct?
>
> Thanks,
> Ken
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: related to Session->setFlash

2009-08-21 Thread Dr. Loboto

Yes.

On Aug 21, 8:53 am, kdubya  wrote:
> On Aug 19, 9:01 am, zaboo  wrote:
>
> > Don't echo $this->Session->setFlash()
>
> > On Aug 19, 8:27 am, Chander Bhan  wrote:
>
> > > I always get the digit 1 in the next line of the message sent through
> > > Session->setFlash from controller, need help
>
> I don't understand this answer. I have been having the same problem
> (the number 1 being displayed on the line after the flash message).
> Here is the code snippet from my controller:
>
>   function edit($id = null) {
>     $this->set('schema', $this->Item->_schema);
>     if (!$id && empty($this->data)) {
>       $this->Session->setFlash(__('Invalid Item', true));
>       $this->redirect(array('action'=>'index'));
>     }
>
> And here is the code from the view:
>
> flash();?>
>
> Are you saying that in the view the code should be:
>
> flash();?>
>
> Is that correct?
>
> Thanks,
> Ken
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: related to Session->setFlash

2009-08-20 Thread kdubya

On Aug 19, 9:01 am, zaboo  wrote:
> Don't echo $this->Session->setFlash()
>
> On Aug 19, 8:27 am, Chander Bhan  wrote:
>
> > I always get the digit 1 in the next line of the message sent through
> > Session->setFlash from controller, need help

I don't understand this answer. I have been having the same problem
(the number 1 being displayed on the line after the flash message).
Here is the code snippet from my controller:

  function edit($id = null) {
$this->set('schema', $this->Item->_schema);
if (!$id && empty($this->data)) {
  $this->Session->setFlash(__('Invalid Item', true));
  $this->redirect(array('action'=>'index'));
}

And here is the code from the view:

flash();?>

Are you saying that in the view the code should be:

flash();?>

Is that correct?

Thanks,
Ken


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: related to Session->setFlash

2009-08-19 Thread cbhan

thanks a lot for  helping.

On Aug 19, 6:01 pm, zaboo  wrote:
> Don't echo $this->Session->setFlash()
>
> On Aug 19, 8:27 am, Chander Bhan  wrote:
>
> > I always get the digit 1 in the next line of the message sent through
> > Session->setFlash from controller, need help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



  1   2   3   >