As a programmer, there are no real problems but challenges...ones that we need to overcome. This means that there is a solution for all challenges that one may face. For all the challenges that I have faced, I will share them and their solutions.
Monday, March 2, 2009
Informatin Management System created by Me using the P4A framework!!!
login screen of the ims
view of the inside.
its user friendly - quiet easy to add and edit contact. It even allows the user to upload a photo of the contact
Great design! Question: how would one display a 0ne-to-many relationship ona single page? I have a product table that has a one-to-many relationship with an images table i.e. a given image can have 0 or more images. I'd like to display the images in a p4a_fieldset for a given product clicked on in a table above. Any ideas how this would work?
thats not hard to do. you would have to intercept the row of the product item in the table and then get the id of that item, then use a query to find all images for the product. upon finding any, you could set the fieldset to display it or show a message or default image for products that do not have an image.
Hi Jerome i am a christian and web,mobile,desktop application i found in your blog about this p4a great tuto man.but can you do me a favor because try to implement the rich textarea attribut by calling the setType methode but seems does not work
here is my contact class code
class Contact extends P4A_Simple_Edit_Mask{
public function __construct() { $p4a=p4a::singleton(); parent::__construct($p4a->contact);
3 comments:
Great design! Question: how would one display a 0ne-to-many relationship ona single page? I have a product table that has a one-to-many relationship with an images table i.e. a given image can have 0 or more images. I'd like to display the images in a p4a_fieldset for a given product clicked on in a table above. Any ideas how this would work?
thats not hard to do. you would have to intercept the row of the product item in the table and then get the id of that item, then use a query to find all images for the product. upon finding any, you could set the fieldset to display it or show a message or default image for products that do not have an image.
Hi Jerome i am a christian and web,mobile,desktop application i found in your blog about this p4a great tuto man.but can you do me a favor because try to implement the rich textarea attribut by calling the setType methode but seems does not work
here is my contact class code
class Contact extends P4A_Simple_Edit_Mask{
public function __construct() {
$p4a=p4a::singleton();
parent::__construct($p4a->contact);
$this->table
->setVisibleCols(array("contact_id","email"));
// $this->build("P4A_Field","fiels");
//$this->fields->email
// ->setLabel("Email")
// ->setType("rich_textarea");
$this->setFieldsProperties();
$this->fields->picture
->setLabel("picture")
->setType("file")
->enableUpload(true);
$this->display("menu", $p4a->menu)
->setFocus($this->fields->email);
}
private function setFieldsProperties()
{
//$this->build("P4A_Field","fiels");
$this->fields->email
->setType("rich_textarea");
}
}
Evarist
Post a Comment