View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - How to create a ComboBox - ProjeQtOr
 
 

How to create a ComboBox

More
30 Nov 2012 17:02 #1 by a.mikael
Hi,

how to create à ComboBox in Projectoria ?

I have my class Milestone who extends to SqlElement and my field "clarety".

I have create in the table "milestone" on my DB the field "clarety" who is a "tinyint" and i have add this line in the class Milestone :
public $test

So, in projectoria when i open a milestone my field clarety is created but is a textfield.



How to change this textfield in combobox ?

Thanks
Attachments:

Please Log in or Create an account to join the conversation.

More
30 Nov 2012 18:30 #2 by babynus
Project'Or RIA framework is "explicit", non desciptive. :evil:

To get a combobox, you need :
- name the field "idClarety"
- define idClarety in db, with format int(12).
- define table clarety, with at least "id" int(12) and "name" varchar(100)
- define class Clarety.php, mapping clarety table.

All the rest is automatic :woohoo:

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
03 Dec 2012 11:10 #3 by a.mikael
Now, i see the combo Clarety but is empty :S

I Have create table clarety
I have add idClarety in Milestone with index
I have add
public $idClarety;
in Milestone.php
I have add class Clarety.php in model\ :
<?php 
/* ============================================================================
 * Client is the owner of a project.
 */ 
class Clarety extends SqlElement {

  // extends SqlElement, so has $id
  public $id;    // redefine $id to specify its visiblez place 
  public $name;
  
  private static $_databaseTableName = 'clarety';
  //public $_isNameTranslatable = true;
   /** ==========================================================================
   * Constructor
   * @param $id the id of the object in the database (null if not stored yet)
   * @return void
   */ 
  function __construct($id = NULL) {
    parent::__construct($id);
  }

  
   /** ==========================================================================
   * Destructor
   * @return void
   */ 
  function __destruct() {
    parent::__destruct();
  }

// ============================================================================**********
// GET STATIC DATA FUNCTIONS
// ============================================================================**********
 
}
?>

Please Log in or Create an account to join the conversation.

More
03 Dec 2012 11:36 #4 by babynus
Just fill in Clarety table with some data ... ;)

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
03 Dec 2012 11:38 #5 by a.mikael
No, i have add two lines :

1 - YES
2 - NO

Please Log in or Create an account to join the conversation.

More
03 Dec 2012 11:46 #6 by babynus
Check log file for errors.
private static $_databaseTableName = 'clarety';
Remove this line, no use if table name=class name
//public $_isNameTranslatable = true;
Uncomment this line, YES/ NO will be translated.

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.047 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.