2nd preview for P4A 3

This week I’ve been damn busy, we got so many feedback after the first P4A 3 preview release that I fixed some things and worked on some others.

Three important issues:

  • with the full ajax implementation to boost the user experience we found a bug when you’ve to download a file within a mask, this has been solved creating some new methods to work with
  • the README file was updated writing info about PDO, which was a FAQ in these days
  • due to the high requests, P4A_Sheet was re-created from scratch with a P4A 3 design in mind

I think we all need a new preview to work on the most updated software, here you have the changelog:

– a bug with “preview” button within P4A_Field file upload was solved
– a bug with file download was fixed
– P4A::inAjaxCall() method was rewritten
– P4A_Redirect_To_File() global function was added
– a bug with images preview on ie/opera was solved
– README was updated
– P4A_Output_File() global function was added, it has to be used when you want to creare a file at run-time and make users download it
– Chainability support was added for P4A_Simple_Toolbar, P4A_Navigation_Toolbar, P4A_Full_Toolbar and P4A_Actions_Toolbar
– P4A_Tab_Pane padding was changed a bit
– P4A_Sheet was re-created

Now you can Download P4A 2.99.1, please help us with translations and report us all the bugs you find! Thank you so much!

25 thoughts on “2nd preview for P4A 3

  1. BES

    Some random feature suggestions:

    Add a rows-per-page box to p4a_table (which does a setPageLimit), like the go-to-page box.

    Add useful descriptive comments to functions so they show up in docs, including examples of parameters.

    Add a sample application which uses all of the features of each class as a demo, and for validating P4A on platforms. The app doesn’t have to do anything, just have examples of what the features do and how they are called. I’ve been thinking about doing something like this as a memory aid, but just haven’t gotten to it.

    Have a session timeout feature that gives a n-minute warning and does a graceful exit, e.g., does callbacks to save open records, and logs out, leaving a system message (that stays open until clicked) on the login page.

  2. Fabrizio Balliano Post author

    1- we already have a feature request about that

    2- we know doc is a problem but hey, we’re 2 programmer we can’t do miracles

    3- I had the same idea some days ago, hope I’ll have time to do that

    4- a bit more difficult, can you please post a feature request in our sourceforge trackers?

  3. Fabrizio Balliano Post author

    @Daniel: link fixed, thank you! your first comment was tagged as spam, can you please repost the links to the images? anyway p4a3 table is really different from p4a2 cause it’s been simplified, what problem are you experiencing?

  4. Marco.Aesis

    Thank’s Thank’s Thank’s for P4a_sheet
    Grazie Grazie Grazie. Una bella sorpresa il
    ritorno del P4a_sheet.
    Ciao Marco. Ps. avete fatto 1 stupendo lavoro.

  5. BES

    On self-documenting code for PHP Documentor, I realize it is a huge effort, but adding more information there is probably of more value than adding documentation to the web site. If we sent you text, would you add it to the codebase? E.g., for p4a_db_source->setWhere: “Adds/replaces a WHERE clause to the query. $where is the SQL expression for the WHERE clause. The SQL expression must be compatible with all databases you are supporting. Pass null to remove the WHERE clause.” Not sure if that explanation is correct, but it shows what I’m suggesting. A concern is that we don’t want the codebase to get bloated with comments. Hey, maybe it would be possible to have links in the doc (per method, variable, etc.) that went to a community-supported doc library, like the PHP manual has community contributed comments. I use P4A docs constantly, as I do the on-line PHP and MySQL manuals. Thanks for listening!

  6. Fabrizio Balliano Post author

    @BES: sure, please keep in mind this idea and let’s just postpone it, just due to some organization tasks we’ve to complete before we can accept new contribs to the code.

  7. BES

    In 2.99.1, p4a_sheet is incomplete. It does not have anchorText. (I tried to run a simple mask that had p4a_sheet and it failed.)

  8. BES

    I’d love to see P4A 3 include a CAPTCHA field where an image with random characters is generated and the user has to read it and type in the characters. A validation method would compare the characters used to generate the image with the characters the user typed in.

  9. Fabrizio Balliano Post author

    @BES: p4a_sheet was re-created not re-added :-P thus it’s different, anchortext it’s not useful anymore because we don’t have to specify references in the methods declaration, thus you can simply use anchor to anchor a string (hope it works, have not tried)

    about the captcha, it’s a website feature more than an application feature thus i won’t put it on my near todo list, i’m sorry…

  10. Mohamad Rosni

    p4a-2.99.1, under win env ,firefox web browser.
    -a bug with “preview” button within P4A_Field file upload
    -a bug with file download

  11. Zoran Sinnema

    Hi Fabrizio,

    I’ve been testing postgresql and it seems that everything is fine.

    I have also a question, I would really like to have for example checkbox as a type for table columns. Is it possible that you can set the same types for table columns as you can do for form fields?


  12. Fabrizio Balliano Post author

    @Mohamad Rosni: sorry I can’t understand your comment :-(

    @Zoran Sinnema: great great, I’m happy about that! hummm you can’t have checkboxes inside a table but you can set the table_col as a boolean, it will render “yes” and “no” strings inside the col. than you’ll intercept the “afterClick” on $table->cols, find which column has been clicked and, if it’s the boolean one, reverse the boolean value… it’s 5 lines of code, much more difficult to explain than to write :-)

  13. Mohamad Rosni

    p4a-2.99.1, under win env ,firefox web browser.
    -a bug with “preview” button within P4A_Field file upload
    -a bug with file download

    Hi Fabrizio,
    For your info, I did test “preview” and “download” button within P4A_Field file upload BUT its not working.


  14. Fabrizio Balliano Post author

    @Mohamad Rosni: can you please describe me what happens when you click on preview and download? thank you and… maybe one of the bugs (about preview) was already solved in SVN but it’s a complex explanation

  15. Mohamad Rosni

    I did test p4A sample applications products_catalogue. During the creation of new product record, I manage to upload image file and display as Thumbnail nicely. The new product record was save successfully. The problem is when I press button preview for the field “Little photo” and “Big photo”, new empty mask with print and quit icon was open without the uploaded image. Just the filename been display. For the download button, new empty mask was open and no file download happen.

  16. Fabrizio Balliano Post author

    @Mohamad Rosni: ok thank you for the clarification, the first should already be solved in SVN, I’ll check the second again cause it seemed to be working for me. let’s go thru the next preview release :-)

  17. Zoran Sinnema

    Hi Fabrizio,

    Is it already possible to set the table col as a boolean. In the documentation of P4A_Table_Col I can only find (text|image|action)


  18. Zoran Sinnema


    may be it’s a good idea to have a little thumbnail for the checked status and instead of showing a checkbox in the table show the thumbnail (for example the nice V of the table toolbar).

    What do you think?


  19. Zoran Sinnema

    Hi Fabrizio,

    Got you about the boolean field, but I was using an integer with 0=false, 1=true

    Anyway I think the image for checked is also a nice one. May be you honor it….


  20. Fabrizio Balliano Post author

    @Zoran Sinnema: we don’t have a checkbox in a table now, anyway we already output “yes” or “no” and that’s translated in every language thus I prefer that to an image. bye :-)

  21. Pingback: 3rd preview for P4A 3 @ Fabrizio Balliano's blog

Leave a Reply

Your email address will not be published. Required fields are marked *