[symfony-users] Re: Doctrine: execute vs fetchArray

2009-11-28 Thread Adrien Mogenet
Thanks :-)

I'll keep my lovely objects !

Adrien

On 28 nov, 01:17, Alexandre SALOME alexandre.sal...@gmail.com wrote:
 Yes, it's faster with a simple array hydrating... You don't instanciate your
 objects, just map their configuration.

 Objects are useful for executing some business logic (sometimes, very
 complex). Array can be useful for templates, for example.

 Depends of your case, but don't be afraid of objects ;) make some
 time/memory measures in your use case, and select the best solution.

 Alexandre

 2009/11/28 Adrien Mogenet adrien.moge...@gmail.com



  Yes I knew that, but HYDRATE_ARRAY parameters is faster and acts
  differently than when we HYDRATE_OBJECT !

  That was my real question... ;-)

  On 27 nov, 23:40, Michael Boyd mikeboyd...@googlemail.com wrote:
   The source of fetchArray() is:

       public function fetchArray($params = array())
       {
           return $this-execute($params, Doctrine_Core::HYDRATE_ARRAY);
       }

   So they are exactly the same :)

   On Nov 27, 8:34 pm, Adrien Mogenet adrien.moge...@gmail.com wrote:

Hi all,

I'm a Propel user, but I'm switching to Doctrine...

I don't know if I should use execute() or fetchArray() to retrieve my
data.

execute() : I get an array of Object, and I like dealing with
Objects !

fetchArray() : I read that it's better (less memory consuming ?) but I
don't really enjoy managing arrays (and arrays of arrays when I get
relationship). Moreover, when they're given to my view, it's
considered as sfOutputEscaperArrayDecorator so I have to perform -

getRawValue().

Is it really awful to call execute() method in Doctrine ?

--
Adrien

  --

  You received this message because you are subscribed to the Google Groups
  symfony users group.
  To post to this group, send email to symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.

 --
 Alexandre Salomé -- alexandre.sal...@gmail.com

--

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




[symfony-users] yaml and mvc

2009-11-28 Thread mini_alexander
I must write something about YAML in Symfony. To which group should I
classify YAML: model, view or controller ? I think about view or
controller or maybe both ?

--

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




[symfony-users] Re: config/error/erro.html.php cannot be shown

2009-11-28 Thread isyairazu
Yes Lawrence,
I will do your way.
Thank you for your response!

--

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




Re: [symfony-users] yaml and mvc

2009-11-28 Thread Lee Bolding
YAML is a representation of a simple data structure used mostly for 
configuration purposes. I wouldn't class it as part of MVC at all - the same as 
I wouldn't XML or JSON.

However, as it's a representation of data, the closest fit would be a model

On 28 Nov 2009, at 09:14, mini_alexander wrote:

 I must write something about YAML in Symfony. To which group should I
 classify YAML: model, view or controller ? I think about view or
 controller or maybe both ?
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/symfony-users?hl=en.
 
 

--

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




[symfony-users] Re: sfWidgetFormJQueryDate as default in auto generated code

2009-11-28 Thread Massimiliano Arione
On 27 Nov, 14:18, kev kbs...@gmail.com wrote:
 Hey Massimiliano,

 i'd be more than happy to try your solution, but to be honest you page
 is not that clear and definitely not symfony oriented. Maybe you could
 describe what exactly is needed, where to put it and what file to
 update for your solution to work in a symfony project!

 Thanks anyway.

As stated in the top of the page, you just need the javascripts and
stylesheet (you can save it from the links).
I hope you're able to use symfony helpers to do it, otherwise you
should read official documentation.

--

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




[symfony-users] generate:project directory exists?

2009-11-28 Thread Mech7
D:\wamp\www\sf_test\lib\vendor\symfony\data\binsymfony
generate:project jobeet

A symfony project already exists in this directory (D:\wamp\www\sf_test
\lib\ve
ndor\symfony\data\bin).

I am trying the jobeet tutorial.. I am using 1.4 rc2 but when i run
generate project it doesn't work can anybody tell me why ?

--

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




Re: [symfony-users] yaml and mvc

2009-11-28 Thread gato chlr
In symfony, it is a tool that help us to generate our model classes, so, if
it is needed , i put YAML inside the model section. In the model section you
can explain in the apendix a bit about YAML and then explain the purpose of
its use. Of course, don't forget that there is another ways to define you
model in with Symfony.

2009/11/28 Lee Bolding l...@leesbian.net

 YAML is a representation of a simple data structure used mostly for
 configuration purposes. I wouldn't class it as part of MVC at all - the same
 as I wouldn't XML or JSON.

 However, as it's a representation of data, the closest fit would be a model

 On 28 Nov 2009, at 09:14, mini_alexander wrote:

  I must write something about YAML in Symfony. To which group should I
  classify YAML: model, view or controller ? I think about view or
  controller or maybe both ?
 
  --
 
  You received this message because you are subscribed to the Google Groups
 symfony users group.
  To post to this group, send email to symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.
 
 

 --

 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.




--

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




Re: [symfony-users] generate:project directory exists?

2009-11-28 Thread Gábor Fási
You need to run generate:project in the folder where it'll reside, not
in symfony/data/bin

According to your paths, go to d:\wamp\www\sf_test, and run
php lib\vendor\symfony\data\bin\symfony generate:project jobeet

Later on you can use `php symfony`, this is the only time you'll need
to use that long path.

On Sat, Nov 28, 2009 at 05:34, Mech7 chris.de@gmail.com wrote:
 D:\wamp\www\sf_test\lib\vendor\symfony\data\binsymfony
 generate:project jobeet

 A symfony project already exists in this directory (D:\wamp\www\sf_test
 \lib\ve
 ndor\symfony\data\bin).

 I am trying the jobeet tutorial.. I am using 1.4 rc2 but when i run
 generate project it doesn't work can anybody tell me why ?

 --

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




--

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




Re: [symfony-users] generate:project directory exists?

2009-11-28 Thread Stéphane
You can also put in your environment path the path where reside the symfony
bins (the directory where resides symfony and symfony.bat and other files,
can't remember path).
So you'll be able to run symfony generate:project $ everywhere you will
want to.

Note, you won't be able to run symfony generate:app $ (or module) in a
not-symfony-project directory (a directory where you haven't ran  symfony
generate:project $ before, explicitly).


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Sat, Nov 28, 2009 at 4:44 PM, Gábor Fási maerl...@gmail.com wrote:

 You need to run generate:project in the folder where it'll reside, not
 in symfony/data/bin

 According to your paths, go to d:\wamp\www\sf_test, and run
 php lib\vendor\symfony\data\bin\symfony generate:project jobeet

 Later on you can use `php symfony`, this is the only time you'll need
 to use that long path.

 On Sat, Nov 28, 2009 at 05:34, Mech7 chris.de@gmail.com wrote:
  D:\wamp\www\sf_test\lib\vendor\symfony\data\binsymfony
  generate:project jobeet
 
  A symfony project already exists in this directory (D:\wamp\www\sf_test
  \lib\ve
  ndor\symfony\data\bin).
 
  I am trying the jobeet tutorial.. I am using 1.4 rc2 but when i run
  generate project it doesn't work can anybody tell me why ?
 
  --
 
  You received this message because you are subscribed to the Google Groups
 symfony users group.
  To post to this group, send email to symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.
 
 
 

 --

 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.




--

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




[symfony-users] Re: yaml and mvc

2009-11-28 Thread mini_alexander
But we can also configure Symfony using YAML and include javascript
etc. - so model rather not. I think I will create special section for
YAML - section with name 'Configuration'. Good idea ?


On 28 Lis, 16:23, gato chlr dany...@gmail.com wrote:
 In symfony, it is a tool that help us to generate our model classes, so, if
 it is needed , i put YAML inside the model section. In the model section you
 can explain in the apendix a bit about YAML and then explain the purpose of
 its use. Of course, don't forget that there is another ways to define you
 model in with Symfony.

 2009/11/28 Lee Bolding l...@leesbian.net



  YAML is a representation of a simple data structure used mostly for
  configuration purposes. I wouldn't class it as part of MVC at all - the same
  as I wouldn't XML or JSON.

  However, as it's a representation of data, the closest fit would be a model

  On 28 Nov 2009, at 09:14, mini_alexander wrote:

   I must write something about YAML in Symfony. To which group should I
   classify YAML: model, view or controller ? I think about view or
   controller or maybe both ?

   --

   You received this message because you are subscribed to the Google Groups
  symfony users group.
   To post to this group, send email to symfony-us...@googlegroups.com.
   To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog 
  legroups.com
  .
   For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.

  --

  You received this message because you are subscribed to the Google Groups
  symfony users group.
  To post to this group, send email to symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog 
  legroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.

--

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




Re: [symfony-users] Re: yaml and mvc

2009-11-28 Thread Stéphane
I would prefer saying uses of YAML in Symfony (or how symfony makes use of
yaml -adding why -talking of benefits in a KISS approach ? -vs strictness of
semantic and syntax of xmi/xml/emf for example)?
And explains that it is a supported representation of data used for :
configuring framework system-wide, project-wide, app-wide, module-wide, and
so on,
used for describing data-model to generate ORM classes and other forms,
validators, migrations, and so on; that it is not validated against a
meta-model for semantics (this have to be done by code using a yaml file),
rather for syntax (yaml is a syntax to express semantic, semantic that is
outside of the scope of yaml, imho), and so on.

Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Sat, Nov 28, 2009 at 5:11 PM, mini_alexander aoohra...@gmail.com wrote:

 But we can also configure Symfony using YAML and include javascript
 etc. - so model rather not. I think I will create special section for
 YAML - section with name 'Configuration'. Good idea ?


 On 28 Lis, 16:23, gato chlr dany...@gmail.com wrote:
  In symfony, it is a tool that help us to generate our model classes, so,
 if
  it is needed , i put YAML inside the model section. In the model section
 you
  can explain in the apendix a bit about YAML and then explain the purpose
 of
  its use. Of course, don't forget that there is another ways to define you
  model in with Symfony.
 
  2009/11/28 Lee Bolding l...@leesbian.net
 
 
 
   YAML is a representation of a simple data structure used mostly for
   configuration purposes. I wouldn't class it as part of MVC at all - the
 same
   as I wouldn't XML or JSON.
 
   However, as it's a representation of data, the closest fit would be a
 model
 
   On 28 Nov 2009, at 09:14, mini_alexander wrote:
 
I must write something about YAML in Symfony. To which group should I
classify YAML: model, view or controller ? I think about view or
controller or maybe both ?
 
--
 
You received this message because you are subscribed to the Google
 Groups
   symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 symfony-users%2bunsubscr...@goog legroups.com
   .
For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en.
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   symfony users group.
   To post to this group, send email to symfony-us...@googlegroups.com.
   To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 symfony-users%2bunsubscr...@goog legroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en.

 --

 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.




--

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




[symfony-users] Re: sfDoctrine2Plugin, generating models from class metadata instead of YAML mapping?

2009-11-28 Thread Marijn
For anybody interested, this is possible by using the
configureDoctrineConnection hook in your ProjectConfiguration class.

See the following gist for an example: http://gist.github.com/244558

On Oct 18, 12:03 am, Marijn marijn.huizendv...@gmail.com wrote:
 Hi,

 Is it possible to generate the database from the phpdoc metadata
 mapping with sfDoctrine2Plugin instead of the default YAML mapping?
 Since I have already been playing a lot with doctrine 2 I don't really
 feel like converting all my models to YAML.

 Kind regards,

 Marijn

--

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




[symfony-users] symfony upgrade from 1.2 to 1.3 fails

2009-11-28 Thread micon
i wanted to upgrade a 1.2 project to 1.3
i followed the upgrade howto exactly

i receive the following error message:
500 | Internal Server Error | sfParseException
Configuration file /var/www/felderweb/nr1-devel/lib/vendor/
symfony-1.3.0RC2/lib/config/config/filters.yml specifies category
common with missing class key.

any hint from anyone?

--

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




[symfony-users] Re: symfony upgrade from 1.2 to 1.3 fails

2009-11-28 Thread micon
RESOLVED
got the svn version of 1.3 and everthing works fine !

On 28 Nov., 17:14, micon haigermo...@web.de wrote:
 i wanted to upgrade a 1.2 project to 1.3
 i followed the upgrade howto exactly

 i receive the following error message:
 500 | Internal Server Error | sfParseException
 Configuration file /var/www/felderweb/nr1-devel/lib/vendor/
 symfony-1.3.0RC2/lib/config/config/filters.yml specifies category
 common with missing class key.

 any hint from anyone?

--

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




[symfony-users] Re: sfValidatorDate in sf1.3/14 ?

2009-11-28 Thread goofy
No error i always get the today date …

Ex : type 27/11/09 - 2009-11-28 ( i try in two different module with
differents forms)

On 28 nov, 01:33, Alexandre SALOME alexandre.sal...@gmail.com wrote:
 What's the outputed error ?

 2009/11/27 goofy goofy.m...@gmail.com



  Hi,

  after migration 1.2 to 1.3, ny sfvalidatordate dont work anymore and i
  cant find solution : I just want to type dd/mm/yy and get it in mysql
  format :

  new sfValidatorDate(array(
         'date_format' = '/^(\d{2})\/(\d{2})\/(\d{2})/',
         'date_output'='Y-m-d',
  'with_time' = false, 'required' = true)),

  --

  You received this message because you are subscribed to the Google Groups
  symfony users group.
  To post to this group, send email to symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.

 --
 Alexandre Salomé -- alexandre.sal...@gmail.com

--

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




[symfony-users] issue about selecting objects in an inheritance context

2009-11-28 Thread Patrick NDJIENTCHEU
Hi symfony people,
I have an issue that is quite annoying.
My environment is symfony 1.2 and propel.
I have a model where I have implemented inheritance using the single-table
strategy. So, here is an excerpt of my model:
*Ad* (id, posted_date, description)
then *RealEstateAd*(location, price, transaction_type) and *JobAd*(position,
requirements, company) which inherit both from *Ad*.

I would like to display all ads, but I would like to display a RealEstateAd
differently from a JobAd. To achieve this, I've used a partial for a
RealEstaeAd and a partial for a JobAd.
So, in the action, I did this:
*$c = new Criteria();*
*$this-allAds = AdPeer::doSelect($c);*

In the template, I did:

*?php foreach ( $allAds as $ad):?*
*?php*
*
*
*if ($add instanceof RealEstateAdd){*
*include_partial('shortViewRealEstateAd', array(add = $ad));*
*}*
*if ($add instanceof JobAd) {*
*include_partial('shortViewJobAd', array(ad = $ad));*
*}*
*?*
*hr/*
*?php endforeach; ?*

The problem is that class of an object in the $allAds array is
sfOutputEscaperObjectDecorator.
So, nothing is displayed at all.
*
*
How could I deal with this issue? is there a way to get an array with
objects which are actually of the class RealEstateAd or JobAd? How is the
hydrating process carried out here?


Many thanks for your help.

-- 
---
NDJIENTCHEU NGANDJUI Patrick
Software Engineer

-
To live is to choose. But to choose well, you must know who you are and
what you stand for, where you want to go and why you want to get there.
Kofi Annan

--

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




[symfony-users] How to add additional info to cache key for some (not all) actions?

2009-11-28 Thread Mateusz Papiernik
Hi!

Is there any possibility in Symfony (1.2 at that point) to alter cache
key generation algorithm for actions, or supply own cache_key just
like it is possible with partials and components?

I've read how to enable cache with PHP code for particular actions,
and not with static cache.yml, using additional filter. The addCache
method however needs module name, action name and parameters supplied
normally in cache.yml - I'm not sure if I can add something else
there.

I need to make distinct cache entries for a view depending on _which_
user is logged in, and not only if an user is authenticated or not.
With components and partials, I simply supply user_id as an additional
parameter (or include it in sf_cache_key). I have no clue how to
achieve the same thing with actions.

Another case are actions which render different templates depending on
the request type - whether it is typical request, or XMLHttpRequest.
Am I able to make two distinct copies of such an action, or should I
make two distinct actions to enable caching in that situation? Caching
the view now causes trouble, because the XMLHttpRequest AJAX version
returns the wrong template, which was cached before with normal
request to the same action (even though the URLs are different).

I'd be very grateful for any suggestions how to approach actions
caching with need of additional information for cache keys.


Best regards,
Mateusz

--

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




[symfony-users] forms and validation

2009-11-28 Thread Paul Witschger
OK, newbie question here.

I used doctrine to build my forms. I then used the non-base class to 
customize my forms since I don't need every single field in the form 
(all I'm doing is unsetting the fields I don't want). In the 
BaseContactForm class, it is setting all the fields as well as 
$this-setValidators(). But it doesn't seem as if the validators are 
doing anything. One field in specific is the email field.

In the setValidators function, it is set as:
'email'  = new sfValidatorEmail(array('max_length' = 255, 
'required' = false))

I figured that since it is calling sfValidatorEmail, it would validate 
the input as being in email format, but it isn't.

Am I missing something? What do I have to do in my action to check 
against the validators?

Thanks

--

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




[symfony-users] sfWidgetFormTextareaTinyMCE class

2009-11-28 Thread Antony
Hello,

I'm banging my head against the wall after trying to make this work..

Here is the setting:

I have a form email like and I wanted to add TinyMCE for the main
body. I installed the sfFormExtraPlugin, and TinyMCE in my js/ folder.
Then I opened my emailForm.class.php and added:

  public function configure()
  {
 $this-setWidgets(array( 'body' = new sfWidgetFormTextareaTinyMCE
(
  array(
'width' = 550,
'height' = 350,
'config' = 'theme: simple',
),
  array(
   'class' = 'tiny_mce'
)
  )
));
  }

But then, when I render the Template containing the basic $form-render
() function it just outputs a basic textarea rows=4 cols=30
name=theemail[body] id=theemail_body/textarea

I can't make it render the TinyMCE enabled version.

TibyMCE is not the issue because if I add it manually by putting:
script type=text/javascript
tinyMCE.init({
mode: exact,
elements: theemail_body,
theme: simple
});
/script
it works..

It seems that the declaration of the new sfWidgetFormTextareaTinyMCE
() is ignored.

Any idea about how I could test the fact that the declaration is taken
into account or not and why?

Just so you know, if I mispell the new sfWidgetFormTextareaTinyMCE
() there is no error either..
Also, Eclipse seems to recognizes the class (telling me it extends the
sfWidgetFormTextarea) which would indicate that it is know by the
code..

very weirs..

Thanks




--

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




Re: [symfony-users] forms and validation

2009-11-28 Thread Gareth McCumskey
In your action, when you bind the submitted form to your form class then the
validators kick in. So process kinda is:

- Action checks if form submitted, and it has not, so create instance of
form class with defaults and let view display form.
- User interacts with form (and your client-side javascript validation if
any) and submits succesfully.
- Action checks if form submitted, it has, so bind the post parameters to an
instance of the form class and validators will kick in to check.
- If error on bind, return to view that displays errors otherwise if no
validation errors continue processing...

For more info, look at the forms book:
http://www.symfony-project.org/forms/1_2/en/


On Sun, Nov 29, 2009 at 5:04 AM, Paul Witschger tigerseyet...@gmail.comwrote:

 OK, newbie question here.

 I used doctrine to build my forms. I then used the non-base class to
 customize my forms since I don't need every single field in the form
 (all I'm doing is unsetting the fields I don't want). In the
 BaseContactForm class, it is setting all the fields as well as
 $this-setValidators(). But it doesn't seem as if the validators are
 doing anything. One field in specific is the email field.

 In the setValidators function, it is set as:
 'email'  = new sfValidatorEmail(array('max_length' = 255,
 'required' = false))

 I figured that since it is calling sfValidatorEmail, it would validate
 the input as being in email format, but it isn't.

 Am I missing something? What do I have to do in my action to check
 against the validators?

 Thanks

 --

 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.





-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

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