[TYPO3-project-formidable] renderlet:LISTER form in rows
Manuel Rego Casasnovas
mrego at igalia.com
Fri Nov 9 12:11:58 CET 2007
Hi Jerome,
Jerome Schneider escribió:
> I'm not sure I understand;
> params are not up-to-date when server-event is called ?
>
Sorry but my english is bad. I'm going to use an example to explain it
better.
> Manuel Rego Casasnovas a écrit :
>
>> Hello,
>>
>> I'm using a renderlet:LISTER with a datasource:PHPARRAY.
>> Moreover in some columns I'm using the property "activelistable", and
>> with this property I get a form in each row of my lister. I have a
>> button to submit this form, and in this button I have a callback to one
>> function to save the row.
>> The problem is that in my method the params haven't the values from the
>> form, have old values.
>>
>> How I can get the input values to update database?
>> I've noticed that if I print POST vars I get the input values, however I
>> don't know if it's the better option.
>>
>> It is possible do something like this?
>>
>> The XML configuration:
>> <renderlet:LISTER name="my_list">
>> <datasource use="my_datasource" />
>> <columns>
>> <column name="uid" type="renderlet:TEXT" label="uid" />
>> <column name="one" type="renderlet:TEXT" label="one"
>> activelistable="true" />
>> <column name="two" type="renderlet:TEXT" label="two"
>> activelistable="true" />
>> <column name="edit" type="renderlet:BUTTON" label="edit">
>> <onclick runat="server" params="uid,one,two"
>> submit="full">
>> <userobj>
>> <extension>this</extension>
>> <method>_editColumn</method>
>> </userobj>
>> </onclick>
>> </column>
>> </columns>
>> </renderlet:LISTER>
>>
I have a lister with the next values:
| uid | one | two | edit |
| 2 | 10 | 12 | edit |
| 5 | 9 | 8 | edit |
| 6 | 11 | 4 | edit |
In this lister the columns one and two are INPUT text and the column
edit is a button.
I modify the contente for the first row (uid: 2) and I put:
- column one: 5
- column two: 5
Then I click the button edit for this row.
And in my function "_editColumn" I get the next params:
- $aParams['uid'] = 2
- $aParams['one'] = 10
- $aParams['two'] = 12
I hope I've explained it better.
Thanks,
Rego
--
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com
More information about the TYPO3-project-formidable
mailing list