Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Make display inline radioButtonList on Yii Framework

By Default Yii display radioButtonList not inline like this :
$form->radioButtonList($model, 'gender', array('M' => 'Male', 'F' => 'Female'))

Change Code like this
$form->radioButtonList($model, 'gender', array('M' => 'Male', 'F' => 'Female'), array( 'labelOptions' => array('style' => 'display:inline'), 'separator' => ' '))
And Voila ... ! Thank's

Cascade delete parent child relation on Yii

Hello All, Sometimes we want to delete parent table on parent child relation on Yii, First we must set relation, Parent Model :
public function relations() { return array( 'Childs' => array(self::HAS_MANY, 'ChildModel', 'parent_id'), ); }
Child Model :
public function relations() { return array( 'Parent' => array(self::BELONGS_TO, 'ParentModel', 'parent_id'), ); }
On delete parent, at function below (parent model) :
public function beforeDelete(){ foreach($this->Childs as $c) $c->delete() return parent::beforeDelete(); }
That's all. Hope this post can help you.

Change Landing Page Yii Framework

In certain conditions, we want the first page of our application do directly into actual applications, but we want to explain in detail the application.
To do that we can redirect the application to a specific page by changing main.php at the directory config.


'defaultController' ='controller/action',

Example :
  
return array(
      ...
      'defaultController'=>home/index,
      ... 
 


);


Thx

Ubuntu 10.10 Can not Select Framework on Netbeans 6.9.1

When we create new Project and want to select Framework like 'Java Server Faces' or other there is a check box that can not be check :(.
This Problem because Java Platform (java-6-open-jdk) is not Compatible with Ubuntu 10.10.
The solution is try using 'java-6-sun' on Synaptic known as 'sun-java6-jdk'
Edit netbeans.conf and change
netbeans_jdkhome="/usr/lib/jvm/java-6-sun"

Netbeans 6.9 Release

Do you like Netbean?
Now Netbeans 6.9 can be download download page.
My Tips is download only what application do you want to develop, on my case only PHP. This will give you more speed on first run IDE.

Install Netbeans on Mandriva Linux

If you want install Netbeans on Mandriva Linux, try following commad on Terminal. Don't forget that you must login as root (su).
 # urpmi netbeans.

Netbeans 6.7 has been launch

Download Netbeans 6.7 in this link

What's New:
NetBeans IDE 6.7 is a significant update to NetBeans IDE 6.5 and includes the following changes:

* Maven support for the creation of plugins and web services as well as support for POM and J2EE
* Kenai integration enables the creation and editing of Kenai hosted projects from within the IDE
* PHP improvements include Selenium support and SQL code completion
* C++ support for profiling, Qt library, code refactoring and macro expansion
* Web API Gateway plug-in enables consumption of Web APIs in applications
* Java ME support for CDC projects in the bundled Java ME SDK 3.0

Netbeans 6.1 IDE Problem on Opensuse 11

If you run Netbeans 6.1 on Opensuse 11, you will get the IDE is blank. This happen because you are using compiz desktop effect. You must disable this feature via 'Simple CompizConfig Setting Manager'.
To do this you go to 'Control Center' under 'Look and Feel' click 'Simple CompizConfig Setting Manager' and uncheck 'Enable desktop effects'.
Now you Netbeans will display IDE correctly.

Featured Post

Install gammu on centos 7

To install Gammu on CentOS 7, follow these steps: 1. Update the system: Bash sudo yum update 2. Install dependencies: Bash sudo yum install...