Two issues:
1) the current page displays response.flash, not session.flash.
session.flash is copied into response.flash upon redirection therefore
it should used only before calling redirect.
2) Even if you use response.flash, it must be set before
{{=response.flash}} in layout. The best way to to set it is in the
controller, not in the view.
Massimo
On Nov 14, 4:01 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> I have some menus (that go to pages) [ Home Profile Pre-Application ].
> In the pre-application i put:
>
> {{if form.record:}}
> db out put
> {{else:}}
> {{session.flash=T('Please Save your profile first!')}}
> {{pass}}
>
> When I click on Profile that works fine. I then go to Pre-Application
> and since there is not data in the DB yet it should "flash" the
> message right? In my case, the Pre-application page is blank (which
> it should be at this point with the if statement above), but there is
> no "flash" message. Then if I click on Home or Profile the "flash"
> message then appears. How do I get it to show as needed when loading
> the Pre-App page?
>
> thx,
>
> -wj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---