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

Izzie Greys izzie.greys at gmail.com
Mon Mar 30 14:04:19 CEST 2009


Thank you so much Dietmar :-))
Thanks to you I found the solution. I just replace mylister by editing-box
because my button wasn't in the lister, but in an editing box.

The code to use :
$this->oForm->aORenderlets["
editing-box"]->aChilds["btn-save"]->hasThrown("click")
and not :
$this->oForm->aORenderlets["btn-save"]->_hasThrown("click")

Thanks again for the help ^^ It works perfectly now !!

Bye

Izzie

2009/3/30 Dietmar Staab <news at das-rad-ruft.de>

> Hi Izzy,
>
> sorry - the error message would be another if the function name has
> changed.
> But because the object is missing, I assume you've to give the complete
> name
> of the object
>
> something like
>
> $this->oForm->aORenderlets["mylister"]->aChilds["btn-save"]->hasThrown("click")
>
> or
>
> $this->oForm->aORenderlets["mylister.btn-save"]->hasThrown("click")
>
> I haven't tested which one works - if it doesn't help someone else may have
> an
> idea.
>
> regards,
>  dietmar
>
> At Monday, 30. March 2009 Izzie Greys wrote:
> > Hi Dietmar,
> >
> > Thanks for the tip, I tried, but it's not the problem.
> > The problem is on line
> > "$this->oForm->aORenderlets["btn-save"]->_hasThrown("click")".
> > If I delete it I haven't the error anymore.
> >
> > The code of the button save is :
> >
> > <renderlet:SUBMIT name="btn-save"
> >
> > > label="Save"></renderlet:SUBMIT>
> >
> > Why this line don't work  ? Anyone have an idea ? Thanks in advance.
> >
> > See you,
> > Izzie
> >
> >
> > 2009/3/26 Dietmar Staab <news at das-rad-ruft.de>
> >
> > > 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.ph
> > >p(
> > >
> > > >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>
> > > > ------------------------------------------
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
>
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>


More information about the TYPO3-project-formidable mailing list