[TYPO3-project-formidable] Sandbox problem (formidable version 2.0.327)

Dietmar Staab news at das-rad-ruft.de
Thu Mar 26 20:42:25 CET 2009


Hi,

at http://formidable.typo3.ug/pastebin/snippet/101.html is an example, but

the function name hasThrown is with no underscore prefix

regards,
 Dietmar

At Wednesday, 25. March 2009 Izzie Greys wrote:
> Hello everybody,
>
> I used to work with the version 1.0183 of Formidable.
> I have installed the last version this morning (Branch 2.0.327).
>
> I have an error and I don't know why (it worked with the version 1.0183).
> It's something simple (I reduced my code the most possible for being
> easiest to understand), I have one lister which show the username (in table
> fe_users), and I can create a new one, and edit or delete them.
>
> The problem is because of the sandbox. The error is : "*Fatal error*: Call
> to a member function _hasThrown() on a non-object in
> *C:\......\typo3conf\ext\ameos_formidable\api\class.tx_ameosformidable.php(
>1073)
>
> : eval()'d code* on line *10"
>
> *
> Can you tell me what is wrong with what I have done. Something has change
> in the new version of formidable ?
>
> The code of my page is :*
>
> -------------------------------------------------------
> *<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <formidable version="2.0.304">
>
>     <meta>
>         <name>users</name>
>         <form formid="users"/>
>         <debug>false</debug>
>         <displaylabels>true</displaylabels>
>     </meta>
>
>     <control>
>         <datahandler:DB>
>             <tablename>fe_users</tablename>
>             <keyname>uid</keyname>
>         </datahandler:DB>
>
>         <renderer:STANDARD/>
>
>         <datasources>
>             <datasource:DB name="fe_users">
>                 <sql><![CDATA[
>                     SELECT
>                         uid, username
>                     FROM
>                         fe_users
>                 ]]></sql>
>             </datasource:DB>
>         </datasources>
>
>         <sandbox>
>             <userobj>
>                 <php><![CDATA[/*<?*/
>                     function shouldDisplayForm() {
>                         return (
>
> $this->oForm->aORenderlets["btn-new"]->_hasThrown("click") ||
>
> $this->oForm->aORenderlets["btn-save"]->_hasThrown("click") ||
>                             $this->oForm->oDataHandler->_edition()
>                         );
>                     }
>                     function shouldDisplayList() {
>                         return !$this->shouldDisplayForm();
>                     }
>                 /*?>*/]]></php>
>             </userobj>
>         </sandbox>
>     </control>
>
>     <elements>
>         <renderlet:SUBMIT name="btn-new" label="New"
> mode="clear"></renderlet:SUBMIT>
>         <!-- LISTER begin -->
>         <renderlet:LISTER name="mylister">
>             <process>
>                 <userobj>
>                     <php><![CDATA[/*<?*/
>                         return $this->oSandBox->shouldDisplayList();
>                     /*?>*/]]></php>
>                 </userobj>
>             </process>
>             <datasource use="fe_users" />
>             <columns>
>                 <column name="username" type="renderlet:TEXT"
> listHeader="Username" label="Username" sort="true"/>
>                 <column type="renderlet:IMAGE" name="btn-edit"
> listHeader="" sort="false">
>                     <path>EXT:ameos_formidable/res/images/edit.gif</path>
>                     <onclick runat="client">
>                         <userobj>
>                             <php><![CDATA[/*<?*/
>                                 $aRow = $this->oDataHandler->getListData();
>                                 return
> $this->majixRequestEdition($aRow["uid"]);
>                             /*?>*/]]></php>
>                         </userobj>
>                     </onclick>
>                 </column>
>                 <column type="renderlet:IMAGE" name="btn-del" listHeader=""
> class="delete" sort="false">
>                    
> <path>EXT:ameos_formidable/res/images/garbage.gif</path> <onclick
> runat="server" params="uid" confirm="Delete?" when="after-init-renderlets"
> >
>                     </onclick>
>                 </column>
>             </columns>
>         </renderlet:LISTER>
>         <!-- LISTER end -->
>
>         <!-- the EDIT/CREATE FORM container -->
>         <renderlet:BOX name="edition-box">
>             <process>
>                 <userobj>
>                     <php><![CDATA[/*<?*/
>                         return $this->oSandBox->shouldDisplayForm();
>                     /*?>*/]]></php>
>                 </userobj>
>             </process>
>             <childs>
>                 <renderlet:TEXT name="username"
> label="Username"></renderlet:TEXT>
>                 <renderlet:SUBMIT name="btn-save"
> label="Save"></renderlet:SUBMIT>
>                 <renderlet:SUBMIT name="btn-close" label="Close"
> mode="clear"></renderlet:SUBMIT>
>             </childs>
>         </renderlet:BOX>
>
>     </elements>
> </formidable>
> ------------------------------------------
>
> I'm a little bit confuse. Any help would be greatly appreciated :-)
>
> See you.
>
> Izzie
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidab
>le




More information about the TYPO3-project-formidable mailing list