[TYPO3-project-formidable] Pass datasource fields through box childs in LISTER
Adrian Föder
adrian at foeder.de
Sun Mar 22 13:36:41 CET 2009
Hi there @ all,
I am standing in front of a problem and I don't know if it is a "missing
feature" or of my approach is completely wrong...
The thing is the following: I would like the frontend user being enabled
to edit recordsets of his own. The base should be a LISTER that lists
each recordset, and the visualisation should be a row with each dataset
containing some columns that identify the RS and an edit button.
Clicking that edit button a box should scroll down with "all" fields of
that recordset for making the user edit the rest of those entries.
It's a simple, usual need of edit user's recordsets.
so I created (sorry for pasting so many code):
<control>
<datasources>
<datasource:DB name="dsUMadverts">
<sql>
<userobj>
<php><![CDATA[
return 'SELECT * from tx_umadverts_advert WHERE owner =
"'.$GLOBALS['TSFE']->fe_user->user['uid'].'"';
]]></php>
</userobj>
</sql>
</datasource:DB>
</datasources>
</control>
<elements>
<renderlet:LISTER name="lstAdverts">
<datasource use="dsUMadverts" />
<template
path="typo3conf/ext/umadverts/pi1/formidable/tplAdverthandling.html"
subpart="###advertlist###"
alternateRows="###ROW###" />
<columns>
<column type="renderlet:TEXT" name="title" style="display:block;" />
<column type="renderlet:TEXT" name="tradebranch" />
<column type="renderlet:BUTTON" name="btnEdit" label="Bearbeiten">
<onclick runat="client">
<userobj><php><![CDATA[/*<?php*/
return
$this->aORenderlets["lstAdverts"]->aOColumns["editArea"]->majixFx(
"toggleBlind",
array("duration" => 0.5)
);
/*?>*/]]></php></userobj>
</onclick>
</column>
<column type="renderlet:BOX" name="editArea" mode="div"
class="editBox-dropdown" activeListable="true" style="display: none;">
<childs>
<renderlet:TEXT name="title" label="The label 1" />
<renderlet:TEXT name="loc_country" label="The label 2" />
<renderlet:TEXT name="loc_countryzone" label="The label 3" />
<renderlet:TEXT name="loc_freetext" label="...and-so-on..." />
</childs>
</column>
</columns>
</renderlet:LISTER>
</elements>
The dropdown then clicking the button works, don't worry; the problem is
that the renderlet:TEXT-fields inside the renderlet:box inside the
<column> isn't filled with data from the datasource.
I think as soon as "leaving" the direct <column>-context and inserting a
renderlet:box and <child>-Elements, the lister won't assign the database
values down there.
Am I right an/or is there any workaround you know of?
Thanks and best regards,
adrian
More information about the TYPO3-project-formidable
mailing list