Lieberland

Stuff I find interesting

  • Home
  • About

9

Dec

Blogs about Symfony

Posted by admin  Published in Symfony, Tech, Web Programming

Here is (the beginnings of) blogs about Symfony:

http://symfonyandy.wordpress.com/

(not maintained in a while but it saved my butt once already)

http://anywindowwithahammer.wordpress.com/

no comment

9

Dec

Getting the column width within a form in Symfony

Posted by admin  Published in Symfony, Tech, Web Programming

I am using jeditable which uses the jquery library to do inline editing of text on a page. However there was no way to set the maximum length of the field. I wanted to set the max length dynamically so if we changed the database definition and the model in Symfony we would not have to adjust the code.

First of all the docs on jeditable are here: http://www.appelsiini.net/projects/jeditable
look at the modification mentioned about maxlength

If you have a single line of a result set, in this case $action you do:
$column_def = $action->getTable()->getColumnDefinition('action_desc');
to get the action_desc column definition.

Then do:
$column_def['length'] gives you the length of the column.

If you need it on a table basis instead of individual row (which frankly makes a lot more sense) do:

$column_def = new sfDoctrineColumn('action_desc',Doctrine_Core::getTable('Action'));
$this->desc_field_length = $column_def->getSize();

no comment

Search

About

This is sitename and some description about your self here...

Categories

  • Android Programming (2)
  • Arduino (1)
  • CA Trip (16)
  • Cooking (1)
  • Coupons (3)
  • Eclipse IDE (1)
  • Fayson Lakes (2)
  • General (1)
  • iPod (3)
  • iPod / iPhone Web Development (1)
  • Javascript and jQuery (1)
  • Laptop Repair (1)
  • Linux (1)
  • Motorcycles (2)
  • music (1)
  • Ping Pong Scoreboard (2)
  • SEO (1)
  • Symfony (2)
  • Tech (7)
  • Travel (20)
  • Uncategorized (28)
  • Web Programming (14)
  • wordpress (2)

Archives

  • March 2012 (1)
  • January 2012 (1)
  • December 2011 (2)
  • November 2011 (1)
  • October 2011 (1)
  • September 2011 (2)
  • August 2011 (1)
  • June 2011 (1)
  • March 2011 (16)
  • February 2011 (3)
  • January 2011 (3)
  • December 2010 (3)
  • October 2010 (8)
  • September 2010 (7)
  • January 2010 (1)
  • November 2009 (1)
  • April 2009 (1)
  • March 2009 (5)
  • January 2009 (3)
  • December 2008 (2)
  • November 2008 (8)
  • October 2008 (1)
  • June 2008 (1)
  • March 2008 (1)
  • September 2007 (1)
  • July 2007 (4)

Blogroll

Pages

  • About

Meta

  • Log in
  • Main Entries Rss
  • Comments Rss
May 2012
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
28293031  
2010 Liebwerks, LLC. WordPress.