[TYPO3-formidable] RE : majixRepaint problem with row deleting inlister
Domi Garms
djgarms at gmail.com
Thu Sep 2 15:15:36 CEST 2010
Hello Stephane,
my repaint is in the renderlet:BUTTON of my lister:
<elements>
<renderlet:LISTER name="favoritlister">
<datasource use="favorites" />
.
.
.
.
<column type="renderlet:BUTTON" label="deletenew" name="btnNewDelete"
sort="false">
<onclick runat="ajax" params="rowData::uid"
cache="false">
<userobj>
<php><![CDATA[
$aParams =
$this->oMajixEvent->getParams();
$where =
'uid='.$aParams["uid"];
$GLOBALS["TYPO3_DB"]->exec_UPDATEquery('tx_dmfaupairs_favorites',$where,
array('deleted'=>1));
return
$this->aORenderlets["favoritlister "]->majixRepaint();
]]></php>
</userobj>
</onclick>
</column>
So I think the coding shoult be fine, but something I miss but I dont find
it...thanks for your effort for helping me.
Have a nice day
Domi
2010/9/2 Stéphane FILLION <s.fillion at ameos.com>
>
> Hi Domi,
>
> If you are in a codebehind you must do :
> return $this->oForm->aORenderlets["favoritlister "]->majixRepaint();
>
> oForm is the object create with the configuration of your xml.
>
> Regards,
> Stéphane
>
>
> -------- Message d'origine--------
> De: typo3-project-formidable-bounces at lists.typo3.org de la part de Domi
> Garms
> Date: jeu. 02/09/2010 02:52
> À: TYPO3 project list for the FORMidable extension
> Objet : Re: [TYPO3-formidable] majixRepaint problem with row deleting
> inlister
>
> Hi Stephane,
>
> thanks for your reply. My datasource looks like this:
>
> <datasource:DB name="favorites">
> <sql>
> <userobj>
> <php><![CDATA[
> return '
> SELECT
>
>
> tx_dmfaupairs_favorites.uid,tx_dmfaupairs_favorites.tstamp,tx_dmfaupairs_favorites.user,tx_dmfaupairs_favorites.favorite,fe_users.last_name,fe_users.first_name
> FROM
> tx_dmfaupairs_favorites INNER JOIN fe_users
> ON tx_dmfaupairs_favorites.favorite=fe_users.uid
> WHERE
>
>
> user='.$GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['TSFE']->fe_user->user['uid'],tx_dmfaupairs_favorites)
> ;
> ]]></php>
> </userobj>
> </sql>
> </datasource:DB>
>
> My problem is, that the database update works, but the ajax repaint of the
> lister doesnt. The name of my lister is
> <renderlet:LISTER name="favoritlister">
> and I repaint it with
> return $this->aORenderlets["favoritlister "]->majixRepaint();
> in my ajay event.
>
> Thanks for your help,
>
> Domi
>
>
>
>
>
>
>
> 2010/9/1 Stéphane FILLION <s.fillion at ameos.com>
>
> > Hello Domi,
> >
> > I works :
> >
> > <datasource:DB name="fe_users">
> > <sql><![CDATA[
> > SELECT fe_users.* FROM fe_users WHERE 1=1
> > ]]></sql>
> > </datasource:DB>
> >
> > <renderlet:LISTER name="mylist">
> > <datasource use="fe_users" />
> > <columns>
> > <column name="username" type="renderlet:TEXT" listHeader="User
> name"
> > />
> > <column name="crdate" type="renderlet:DATE" listHeader="User
> CR
> > date">
> > <data>
> > <datetime format="%d %B %Y" locale="fr_FR" />
> > </data>
> > </column>
> > <column type="CHECKSINGLE" name="deleted" listHeader="deleted" />
> > <column type="renderlet:BUTTON" label="delete" name="btnDelete"
> > sort="false">
> > <onclick runat="ajax" params="rowData::uid" cache="false">
> > <userobj>
> > <php><![CDATA[
> > $aParams =
> $this->oMajixEvent->getParams();
> > $where = 'uid='.$aParams["uid"];
> >
> >
> > $GLOBALS["TYPO3_DB"]->exec_UPDATEquery('fe_users',$where,
> > array('deleted'=>1));
> >
> > return $this->aORenderlets["mylist
> > "]->majixRepaint();
> > ]]></php>
> > </userobj>
> > </onclick>
> > </column>
> > </columns>
> > </renderlet:LISTER>
> >
> > I don't understand why your snippet don't work.
> > Can you give me your datasource too ?
> >
> >
> > Otherwise,
> > In your codeBehind, the parameters is passed in the arguments on your
> > function :
> >
> > function delete_favorit_click($aParams) {
> > $where = 'uid='.$aParams["uid"];
> >
> >
> >
> $GLOBALS["TYPO3_DB"]->exec_DELETEquery('tx_dmfaupairs_favorites',$where);
> >
> > return
> $this->oForm->aORenderlets["favoritlister"]->majixRepaint();
> > }
> >
> > Regards,
> > Stéphane
> >
> > -----Message d'origine-----
> > De : typo3-project-formidable-bounces at lists.typo3.org [mailto:
> > typo3-project-formidable-bounces at lists.typo3.org] De la part de Domi
> Garms
> > Envoyé : lundi 23 août 2010 08:17
> > À : TYPO3 project list for the FORMidable extension
> > Objet : [TYPO3-formidable] majixRepaint problem with row deleting in
> lister
> >
> > Hello Formidables,
> >
> > I try to delete a row in a lister with codebehind and an onclick ajax
> > event. The row gets deleted in the DB-table, but majixRepaint is not
> > working.
> >
> > My Lister:
> > <renderlet:LISTER name="favoritlister">
> > <datasource use="favorites" />
> >
> > <ifEmpty message="You dont have any favorites
> yet!"
> > />
> > <columns>
> > <column name="uid" type="renderlet:TEXT"
> />
> > <column name="tstamp"
> type="renderlet:DATE"
> > >
> > <data>
> > <dateTime
> format="%d.%m.%Y"
> > />
> > </data>
> >
> > </column>
> > <column name="user" type="renderlet:TEXT"
> />
> > <column name="last_name"
> > type="renderlet:LINK" />
> > <column name="first_name"
> > type="renderlet:TEXT" />
> > <column name="favorite"
> > type="renderlet:TEXT" />
> > <column type="renderlet:BUTTON"
> > label="delete" name="btnDelete"
> > sort="false">
> > <onclick
> > runat="ajax"
> > params="rowData::uid"
> > cache="false"
> >
> > exec="coding.delete_favorit_click()"
> > />
> > </column>
> > </columns>
> > </renderlet:LISTER>
> >
> > And codebehind.php
> > class codebehind {
> > function delete_favorit_click() {
> > // requesting parameters from the event
> > $aParams = $this->oForm->oMajixEvent->getParams();
> > $where = 'uid='.$aParams["uid"];
> >
> >
> >
> $GLOBALS["TYPO3_DB"]->exec_DELETEquery('tx_dmfaupairs_favorites',$where);
> >
> > return
> > $this->oForm->aORenderlets["favoritlister"]->majixRepaint();
> >
> > }
> > }
> >
> > Does somebody sees my errorcode? I did this on the snippet of
> > http://formidable.typo3.ug/tutorials/editing-in-list-with-modalbox.html
> >
> > Thanks for any help
> >
> > Greetings Dominic
> > _______________________________________________
> > TYPO3-project-formidable mailing list
> > TYPO3-project-formidable at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
> >
> > _______________________________________________
> > TYPO3-project-formidable mailing list
> > TYPO3-project-formidable at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
> >
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
>
>
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
>
More information about the TYPO3-project-formidable
mailing list