Re: [symfony-users] link_to_remote help. please take a look.

2010-09-02 Thread Andro Fumero
I'm actually using symfony 1.4 version. can some one help? i'm really stuck 
with 
this problem.

Any help would be appreciated.





____
From: Andro Fumero 
To: symfony-users@googlegroups.com
Sent: Thu, September 2, 2010 5:20:02 AM
Subject: Re: [symfony-users] link_to_remote help. please take a look.


thanks for the info.
correct if I'm wrong with this one. In my case, indexSuccess was not being 
called by other ajax request. what was being called is the partial 


 
 
from indexSuccess.php.

from indexSuccess.php ajax to -> action returns renderPartial. does this make 
any sense?
I also tried to return a variable. but it still not updated.

I'm actually new using this ajax thing. please bare with me.





From: Gareth McCumskey 
To: symfony-users@googlegroups.com
Sent: Thu, September 2, 2010 5:08:06 AM
Subject: Re: [symfony-users] link_to_remote help. please take a look.

One small thing to simplify, in your action change the line:

if($request->getParameter('prodid') && 
is_null($request->getParameter('prodid')) 
== false)

To look like:

if($request->getParameter('prodid', -1) !== -1)

The second parameter if getParameter() is the default value if the parameter 
does not exist.

Also, is the indexSuccess.php being called as a result of another AJAX request? 
If so, ensure that script=>true is set on any AJAX request that may result in 
indexSuccess.php being called as well.


On Thu, Sep 2, 2010 at 10:33 AM, Andro Fumero  wrote:

hello everyone,
> 
>my script is not able to update div content using link to remote. below is my 
>code. please tell me if i miss something.
> 
>indexSuccess.php [
>
> 
> 
> 
>
>
>   array(  
>  'update'  => 'mycart',
>  'url' => 
>'companyproduct/Addtocart?prodid='.$companyproduct->getId(),
>  'return' => 'true',
>  'script' => true,
>  ), array('class'  => 'ajax_link',
>  )) ?>
>   
>
>]
> 
>ACTIONS: 
>executeAddtocart(sfWebRequest $request)[
>  if($request->isXmlHttpRequest()) {
>   if($request->getParameter('prodid') && 
>is_null($request->getParameter('prodid')) == false)
>   {
>$this->getUser()->addToCart($request->getParameter('prodid'));
>return $this->renderPartial('companyproduct/cart');
>   }
>   $this->setLayout(false);
>  }
>]
>When I check the firebug POST HTML. the return is already updated.
>result: YourCartItems(5)
> 
>but in my IndexSuccess.php is still YourCartItems(4). I still need to refresh 
>it  in order to view the updated one.
> 
>Thank you all.
>
-- 
>If you want to report a vulnerability issue on symfony, please send it to 
>security at symfony-project.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-users@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
>


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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] link_to_remote help. please take a look.

2010-09-02 Thread Andro Fumero
thanks for the info.
correct if I'm wrong with this one. In my case, indexSuccess was not being 
called by other ajax request. what was being called is the partial 


 
 
from indexSuccess.php.

from indexSuccess.php ajax to -> action returns renderPartial. does this make 
any sense?
I also tried to return a variable. but it still not updated.

I'm actually new using this ajax thing. please bare with me.





From: Gareth McCumskey 
To: symfony-users@googlegroups.com
Sent: Thu, September 2, 2010 5:08:06 AM
Subject: Re: [symfony-users] link_to_remote help. please take a look.

One small thing to simplify, in your action change the line:

if($request->getParameter('prodid') && 
is_null($request->getParameter('prodid')) 
== false)

To look like:

if($request->getParameter('prodid', -1) !== -1)

The second parameter if getParameter() is the default value if the parameter 
does not exist.

Also, is the indexSuccess.php being called as a result of another AJAX request? 
If so, ensure that script=>true is set on any AJAX request that may result in 
indexSuccess.php being called as well.


On Thu, Sep 2, 2010 at 10:33 AM, Andro Fumero  wrote:

hello everyone,
> 
>my script is not able to update div content using link to remote. below is my 
>code. please tell me if i miss something.
> 
>indexSuccess.php [
>
> 
> 
> 
>
>
>   array(  
>  'update'  => 'mycart',
>  'url' => 
>'companyproduct/Addtocart?prodid='.$companyproduct->getId(),
>  'return' => 'true',
>  'script' => true,
>  ), array('class'  => 'ajax_link',
>  )) ?>
>   
>
>]
> 
>ACTIONS: 
>executeAddtocart(sfWebRequest $request)[
>  if($request->isXmlHttpRequest()) {
>   if($request->getParameter('prodid') && 
>is_null($request->getParameter('prodid')) == false)
>   {
>$this->getUser()->addToCart($request->getParameter('prodid'));
>return $this->renderPartial('companyproduct/cart');
>   }
>   $this->setLayout(false);
>  }
>]
>When I check the firebug POST HTML. the return is already updated.
>result: YourCartItems(5)
> 
>but in my IndexSuccess.php is still YourCartItems(4). I still need to refresh 
>it  in order to view the updated one.
> 
>Thank you all.
>
-- 
>If you want to report a vulnerability issue on symfony, please send it to 
>security at symfony-project.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-users@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
>


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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] link_to_remote help. please take a look.

2010-09-02 Thread Andro Fumero
hello everyone,
 
my script is not able to update div content using link to remote. below is my 
code. please tell me if i miss something.
 
indexSuccess.php [
    
     
     
 
    
    
      'mycart',
              'url' => 
'companyproduct/Addtocart?prodid='.$companyproduct->getId(),
              'return' => 'true',
  'script' => true,
              ), array('class'  => 'ajax_link',
              )) ?>
   
    
]
 
ACTIONS: 
executeAddtocart(sfWebRequest $request)[
      if($request->isXmlHttpRequest()) {
       if($request->getParameter('prodid') && 
is_null($request->getParameter('prodid')) == false)
       {
            $this->getUser()->addToCart($request->getParameter('prodid'));
            return $this->renderPartial('companyproduct/cart');
           }
           $this->setLayout(false);
      }
]
When I check the firebug POST HTML. the return is already updated.
result: YourCartItems(5)
 
but in my IndexSuccess.php is still YourCartItems(4). I still need to refresh 
it  in order to view the updated one.
 
Thank you all.


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] ajax dropdown sfWidgetFormDoctrineChoice

2010-08-27 Thread Andro Fumero
hello everyone,

Can anyone provide samples how to put some event during click on selected 
dropdowns?
like onclick='' and so on using ajax or any.

samples, tutorials, link, information would be a greate help.

Thanks Guyz
Andro



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] sfWidgetFormDoctrineChoice problem

2010-08-25 Thread Andro Fumero
Hi there,


Does anyone tried to limit the result of dropdown to only 1? or atleast just 
keep the dropdown hidden with selected value?

I already set the id of the following dropdown, and i dont need to show other 
choices anymore.

 public function executeNew(sfWebRequest $request)
  {
  $detail = new Companyproductdetail();
 $detail->setCompany_Info_Id($request->getParameter('com_id'));
  $this->form = new companyproductdetailForm($detail);
  }
The selected Id should now be the only one to show..

any help would be great.

Thanks


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Problems when creating database

2010-08-24 Thread Andro Fumero
check your user name and password. it is found in config/databases.yml





From: Marcio Pozzato 
To: Symfony Group 
Sent: Tue, August 24, 2010 11:44:24 AM
Subject: [symfony-users] Problems when creating database

Please,
I can't create database through 'mysqladmin create jobeet -uroot -p',
included at the Day 3 - Tutorial Symfony.
MySql returns the following error message: connect to server at
'localhost' failed error: 'Access denied for user 'root'@'localhost'
'
what means?
Thanks for a lot.
Marcio Pozzato

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] sfWidgetFormDoctrineChoice problem

2010-08-24 Thread Andro Fumero
Hi there,

Does anyone tried to limit the result of dropdown to only 1? or atleast just 
keep the dropdown hidden with selected value?

I already set the id of the following dropdown, and i dont need to show other 
choices anymore.

 public function executeNew(sfWebRequest $request)
  {
  $detail = new Companyproductdetail();
 $detail->setCompany_Info_Id($request->getParameter('com_id'));
  $this->form = new companyproductdetailForm($detail);
  }
The selected Id should now be the only one to show..

any help would be great.

Thanks



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Country City problem

2010-08-18 Thread Andro Fumero
That was quick adriane. It helps me a lot.

Thanks





From: Gustavo Adrian 
To: symfony-users@googlegroups.com
Sent: Wed, August 18, 2010 8:39:16 AM
Subject: Re: [symfony-users] Country City problem

This could help:

http://www.symfony-project.org/plugins/sfDependentSelectPlugin




On Wed, Aug 18, 2010 at 7:18 AM, Andro Fumero  wrote:

Good day,
>
>Does any one tried to make a drop down Countries, and when its clicked, it 
>will 
>display the list of cities based on the selected Country.
>
>I have read about steps in how to do this, but doesnt have a sample code. 
>I dont know where to start about this one coz im still new. I dont even know 
>where to put the onchange event in the drop down from 
>sfwidgetformdoctrinechoice.
>
>Any link, samples, tutorials would be great.
>
>Thanks
>
>-- 
>If you want to report a vulnerability issue on symfony, please send it to 
>security at symfony-project.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-users@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
>
-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Country City problem

2010-08-18 Thread Andro Fumero
Good day,

Does any one tried to make a drop down Countries, and when its clicked, it will 
display the list of cities based on the selected Country.

I have read about steps in how to do this, but doesnt have a sample code. 
I dont know where to start about this one coz im still new. I dont even know 
where to put the onchange event in the drop down from 
sfwidgetformdoctrinechoice.

Any link, samples, tutorials would be great.

Thanks



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Country City problem

2010-08-12 Thread Andro Fumero
Good day,

Does any one tried to make a drop down Countries, and when its clicked, it will 
display the list of cities based on the selected Country.

I don't care if its from Database or Jscript. I just want to get this done 
because I'm stuck with this problem. have no clue where to start.

Any help would be great. Bless you.

Thanks


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Array Problems

2010-07-28 Thread Andro Fumero
and thank you also rodrigo. ^_^





From: Rodrigo Ruiz Fuentes 
To: symfony-users@googlegroups.com
Sent: Wed, July 28, 2010 11:54:21 AM
Subject: Re: [symfony-users] Array Problems

 On 28/07/10 11:08, Andro Fumero wrote: 
hello,
>
>can someone help me how to display the array below like 
>
>ex. "so...@yahoo.com and some2.yahoo.com"
>
>Array ( [0] => Array ( [id] => 1 [email] => so...@yahoo.com ) 
>   [1] => Array ( [id] => 17 [email] => so...@yahoo.com )
> )
>
>Thanks
>
>
Try:



-- 
Rodrigo Ruiz Fuentes
-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Array Problems

2010-07-28 Thread Andro Fumero
Thank you George, thank you Filipe for giving me some of your time in helping 
me 
with this one.

I Got this now solved.

God bless you all





From: Filipe Costa 
To: symfony-users@googlegroups.com
Sent: Wed, July 28, 2010 11:22:09 AM
Subject: Re: [symfony-users] Array Problems


$ex = "";foreach($array as $element){
if(strlen($ex>0){
 $ex .=" and ";
 } 
$ex .= $element['email'];
}

something like this


On Wed, Jul 28, 2010 at 4:08 PM, Andro Fumero  wrote:

hello,
>
>can someone help me how to display the array below like 
>
>ex. "so...@yahoo.com and some2.yahoo.com"
>
>Array ( [0] => Array ( [id] => 1 [email] 
>=> 
>so...@yahoo.com ) 
>
>   [1] => Array ( [id] => 17 [email] 
> => 
>so...@yahoo.com )
> )
>
>Thanks
>
>
-- 
>If you want to report a vulnerability issue on symfony, please send it to 
>security at symfony-project.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-users@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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Array Problems

2010-07-28 Thread Andro Fumero
hello,

can someone help me how to display the array below like 

ex. "so...@yahoo.com and some2.yahoo.com"

Array ( [0] => Array ( [id] => 1 [email] => 
so...@yahoo.com ) 

   [1] => Array ( [id] => 17 [email] => 
so...@yahoo.com )
 )

Thanks



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Simple Display Problem

2010-07-27 Thread Andro Fumero
Hi guys,

Please bare with me with my simple problem,i'm just new in symfony, but i 
haven't solved this one for the whole day.

 protected function processForm(sfWebRequest $request, sfForm $form)
  {
$form->bind($request->getParameter($form->getName()), 
$request->getFiles($form->getName()));
if ($form->isValid())
{
//HERE IS THE DISPLAY
//I JUST WANT TO DISPLAY THE EMAIL THAT USER SAVE BUT ITS EMPTY AS 
ALWAYS
$this->getUser()->setFlash('notice', sprintf('Here is your email 
(%s).', 
$request->getParameter('email')));

$member = $form->save();
$this->redirect('member/edit?id='.$member->getId());
}

Thanks


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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: can someone take a look--sfWidgetFormDoctrineChoice problem

2010-06-17 Thread Andro Fumero
wow  svet it work well..  thank you so much for your help and explaining. god 
bless. this will help other starters too..

have a nice day.
Andrew




From: Svetoslav Shterev 
To: symfony users 
Sent: Thu, June 17, 2010 7:46:29 AM
Subject: [symfony-users] Re: can someone take a 
look--sfWidgetFormDoctrineChoice problem

You'll need to pass 'key_method' if you want to change which key it
should be saving(Although, doctrine is set up to take the primary key,
which is what you should be using it for, really)

The display depends on either the 'method' option(which method to use
for display), by default __toString().

so, you would either set __toString() to show the "Category"
column(getCategory()) -> which has more implications than this
widget(other parts use __toString() as well)
or, pass 'method' => 'getCategory'

example:

'boxhere'    => new sfWidgetFormDoctrineChoice(array('model' =>
'category','query' => @Category::retrieveCategory(),'add_empty' =>
false,'method' => 'getCategory', 'key_method' => 'getCategoryId'))

On Jun 16, 6:41 pm, Andro Fumero  wrote:
> hello there,
>
> I'm a newbie here and need help, I'm stack with this problem.
>
> table: Category
> columns: id,categoryid,category,description,active
>
> when I created a form:
>
>     $this->setWidgets(array(
>       'boxhere'    => new sfWidgetFormDoctrineChoice(array('model' => 
> 'category','query' => @Category::retrieveCategory(),'add_empty' => false,))
> );
>
> I need to display "category" column and selected value of "categoryid"..
> but why is it displaying as description? and selected value is id?
> when my query is "select categoryid,category only"?
>
> Thanks.
> Andrew

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] can someone take a look--sfWidgetFormDoctrineChoice problem

2010-06-16 Thread Andro Fumero
hello there,

I'm a newbie here and need help, I'm stack with this problem.

table: Category
columns: id,categoryid,category,description,active

when I created a form:

$this->setWidgets(array(
  'boxhere'=> new sfWidgetFormDoctrineChoice(array('model' => 
'category','query' => @Category::retrieveCategory(),'add_empty' => false,))
);

I need to display "category" column and selected value of "categoryid"..
but why is it displaying as description? and selected value is id?
when my query is "select categoryid,category only"?

Thanks.
Andrew


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] getRelatedModelName displays other column

2010-04-30 Thread Andro Fumero
hi,
im still studying symfony. dont know if i have the right question. anyway

i have two tables user and profile and is connected.

in the editusers and addusers why does it display the description column 
instead of the profileid.?



'profileid' => new sfWidgetFormDoctrineChoice(array('model' => 
$this->getRelatedModelName('Profile'), 'add_empty' => false)),



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] sfWidgetFormDoctrineChoice problem

2010-04-27 Thread Andro Fumero

This is from users BaseForm.

'profileid' => new sfWidgetFormDoctrineChoice(array('model' => 
$this->getRelatedModelName('Profile'), 'add_empty' => false)),

its displaying the Description column of my profile table.

how can i display the profile column in my Profile table ?

Can any one.?

Thanks  in Advance



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] Security user problem[New to Symfony] sfBasicSecurityUser

2010-04-19 Thread Andro Fumero
hello users-helpers,

Im already done with setting up security:

all:
  is_secure: true
  credentials: [admin]

can someone give me a hint where to start in creating security of the page. I 
don't want to use any plugins which i already read of few like 
sfDoctrineGuardPlugin , i want to understand the concept about this one before 
moving on.

 public function executeUser(sfWebRequest $request)
  {
$q = Doctrine_Query::create()  
->select('u.username, u.profileid,u.realname')
->from('User as u')
->leftJoin('u.Profile p')
->where('u.username = ?', $request->getParameter('username'))
->andWhere('u.pword = ?', $request->getParameter('pword'));
$this->users = $q->execute();
}

what will i need to do next since I already had the result of the following 
query?
when do i start using 
   $user->setAuthenticated(true);
and how does it become global?

can some one make me understand. im very fresh and very frustrated in 
understanding this.

Thank you in advance.
God bless helping symfony-users.


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] schema query problem-- 2 tables only generated from mysql- please help

2010-04-16 Thread Andro Fumero
Thank you so much. i don't know that symfony is this sensitive. 





From: Tom Haskins-Vaughan 
To: symfony-users@googlegroups.com
Sent: Fri, April 16, 2010 2:57:41 PM
Subject: Re: [symfony-users] schema query problem-- 2 tables only generated  
from mysql- please help

Try:

...
  ->leftJoin('p.User u')
...

Tom

On Fri, Apr 16, 2010 at 2:46 PM, Andro Fumero  wrote:
> Schema.yml Im just new to Symfony. please help.--- wasted whole day
> fixing this.
> -
> Profile:
>   connection: doctrine
>   tableName: profile
>   columns:
> id:
>   type: integer(4)
>   fixed: false
>   unsigned: false
>   primary: false
>   notnull: true
>   autoincrement: true
> profileid:
>   type: string(50)
>   fixed: false
>   unsigned: false
>   primary: true
>   autoincrement: false
>   relations:
> User:
>   local: profileid
>   foreign: profileid
>   type: many
> User:
>   connection: doctrine
>   tableName: user
>   columns:
> id:
>   type: integer(4)
>   fixed: false
>   unsigned: false
>   primary: false
>   notnull: true
>   autoincrement: true
> userid:
>   type: string(50)
>   fixed: false
>   unsigned: false
>   primary: true
>   autoincrement: false
> profileid:
>   type: string(50)
>   fixed: false
>   unsigned: false
>   primary: false
>   notnull: true
>   autoincrement: false
>   relations:
> Profile:
>   local: profileid
>   foreign: profileid
>   type: one
> query--
> $q = Doctrine_Query::create()
> ->select('u.userid,u.profileid')
> ->from('Profile p')
> ->leftJoin('p.user')
> ->where('u.profileid=?', 'profile-01');
> Gives me out error (try using aliases but it doesnt work "foreignAlias:
> user")
>
> Unknown relation alias user
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.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-users@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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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] schema query problem-- 2 tables only generated from mysql- please help

2010-04-16 Thread Andro Fumero
Schema.yml Im just new to Symfony. please help.--- wasted whole day 
fixing this.
-
Profile:
  connection: doctrine
  tableName: profile
  columns:
id:
  type: integer(4)
  fixed: false
  unsigned: false
  primary: false
  notnull: true
  autoincrement: true
profileid:
  type: string(50)
  fixed: false
  unsigned: false
  primary: true
  autoincrement: false
  relations:
User:
  local: profileid
  foreign: profileid
  type: many
User:
  connection: doctrine
  tableName: user
  columns:
id:
  type: integer(4)
  fixed: false
  unsigned: false
  primary: false
  notnull: true
  autoincrement: true
userid:
  type: string(50)
  fixed: false
  unsigned: false
  primary: true
  autoincrement: false
profileid:
  type: string(50)
  fixed: false
  unsigned: false
  primary: false
  notnull: true
  autoincrement: false
  relations:
Profile:
  local: profileid
  foreign: profileid
  type: one
query--
$q = Doctrine_Query::create() 
->select('u.userid,u.profileid')
->from('Profile p')
->leftJoin('p.user')
->where('u.profileid=?', 'profile-01');
Gives me out error (try using aliases but it doesnt work "foreignAlias: user")

Unknown relation alias user


  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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-users@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: CheckBox at Server Side

2010-01-29 Thread Andro
$values = $request->getParameter($this->form->getName()) gets an array
with all values of form.
And $values['name_of_your_checkbox'] will get the value if checkbox is
checked...

On 29 Jan., 03:30, mandyllanes  wrote:
> Hi,
>
> I have a field checkbox in my form. In de sfAction class I want know
> if that field is checked. if my checkbox field is checked i do any
> thing, but is not i do another things. How am I can do?
>
> Many 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] Re: How to access attributes of a class

2010-01-29 Thread Andro
Using getter/setter is the better coding style.. but if the attributes
are public you can access them directly, too.

On 29 Jan., 11:16, ruigoncalves  wrote:
> Hi there!
>
> How can I access the attributes of a class? By the name of the
> attribute or I have to use the appropriate getter/setter?
>
> Thanks in advance,
> Best regards!

-- 
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: Making sure a login id only has one session at any moment

2010-01-28 Thread Andro
isAuthenticated and setAuthenticated sets only LOCAL Cookies. So if he
logins from another computer this functions doesn't check this, but if
ANOTHER User is logged in at the SAME computer, so you can delete his
e.g. credentials first before adding the new ones...

On 28 Jan., 04:21, "yth"  wrote:
> Dear all,
>
> When a user logins, the controller calls the following function in the
> myUser.class. The problem is, if he doesn't logout but then logins in
> another computer/browser, the old session does not get killed. I tried to
> use setAuthenticated(false) on users who have already authenticated, hoping
> that his old session will get killed before he gets a new one. But it
> doesn't work.
>
> Many thanks to you all.
>
> // Viewable inhttp://pastebin.com/f765fff66
>
> public function login($loginId,$pwd){
>
>         $member=MemberPeer::getByLoginIdAndPassword($loginId,$pwd);
>
>         if(!is_null($member)) {
>
>            if($this->isAuthenticated())
>                    $this->setAuthenticated(false);  // I would like to
> logout the user if he/she already has a session, but it doesn't work
>
>             $this->setAuthenticated(true);
>             $member->setLastLoginAt(time());
>             $member->save();
>             $this->setAttribute('member_id', $member->getMemberId());
>
>             return true;
>         }
>         return false;
>
> }

-- 
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: Using an action to generate an image as an image tag src attribute

2010-01-28 Thread Andro
I didn't find a better solution and did it the same way...

On 28 Jan., 09:06, Gareth McCumskey  wrote:
> Hi guys,
>
> I am probably missing something obvious but is it possible for me to
> pass in an img tags src attribute the url to an action that will then
> output a dynamically generated image?
>
> Example: Instead of a direct link to an image like
>
> 
>
> I want to do :
>
> 
>
> I know about changing headers and so on on the action side of things
> to push out a binary element as opposed to a regular symfony view.
> Just wondering what I might need to change routing-wise (if at all) to
> get this to work. Maybe I shouldn't even be using the image_tag helper
> at all?
>
> 
>
> --
> Gareth McCumskeyhttp://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.