[TYPO3-german] formhandler: gemappten Wert für weiteren PreProcessor verwenden
Johannes C. Schulz - EnzephaloN IT-Solutions
info at enzephalon.de
Mon Oct 24 18:09:18 CEST 2011
Sorry - falscher Alarm!
Alles funktioniert so super.
Riesen Dank!
Johannes
-----Ursprüngliche Nachricht-----
Von: typo3-german-bounces at lists.typo3.org
[mailto:typo3-german-bounces at lists.typo3.org] Im Auftrag von Reinhard
Führicht
Gesendet: Montag, 24. Oktober 2011 16:43
An: typo3-german at lists.typo3.org
Betreff: [TYPO3-german] Re: formhandler: gemappten Wert für weiteren
PreProcessor verwenden
Hallo Johannes,
Am 24.10.2011 16:23, schrieb Johannes C. Schulz - EnzephaloN IT-Solutions:
> Hallo Reinhard
> Danke für Deine Antwort. Ich habe es sofort versucht auszuprobieren,
> doch leider ohne Erfolg. Deswegen hier nochmal die PreProcessors so
> wie sie in meinem TS stehen:
>
> 1{
> class = Tx_Formhandler_PreProcessor_LoadDB
> config{
> select {
> table = tx_enzhotellist_domain_model_hotellist
> where = COA
> where {
> 10 = TEXT
> 10.value = uid=
> 20 = USER
> 20.userFunc = user_enzhotellist->getEnzhotellistUID
> }
> }
> # add PreProcessed enzhotellist-items to markers
> 1{
> mtitle.mapping = name
> mpricedescription.mapping = pricedescription
> mtype.mapping = type
> }
> }
> }
> 2{
> class = Tx_Formhandler_PreProcessor_LoadDB
> config{
> select{
> table = tx_enzhotellist_domain_model_type
> where = COA
> where {
> 10 = TEXT
> 10.value = uid=
> 20 = TEXT
> 20{
> data = GP:[formhandler]|type
> sanitize = 1
> }
> }
> }
> # add PreProcessed enzhotellist_type-items to markers
> 1{
> mtypename.mapping = typename
> }
> }
> }
>
> Der erste PreProcessor arbeitet korrekt, der zweite lädt leider immer
> noch nichts in die "Variable" mtypename.
> Kannst Du mir nochmal helfen?
>
> Viele Grüße
> Johannes
>
> Hallo Johannes,
>
> Am 24.10.2011 11:42, schrieb Johannes C. Schulz - EnzephaloN IT-Solutions:
>> Hallo typo3-Gemeinde
>>
>>
>>
>> Folgendes Problem:
>> mit einem Preprocessor von formhandler hole ich erfolgreich Werte aus
>> der DB. Davon ist einer (mtype) eine uid einer anderen Tabelle,
>> welche ich mit einem weiteren PreProcessor benutzen möchte.
>>
>> [..]
>>
>> 2{
>> class = Tx_Formhandler_PreProcessor_LoadDB
>> config{
>> select{
>> table = tx_enzhotellist_domain_model_type
>> where = COA
>> where {
>> 10 = TEXT
>> 10.value = uid=
>> 20 = TEXT
>> 20.value = mtype.value
>> }
>> }
>> # add PreProcessed enzhotellist_type-items to markers
>> 1{
>> mtypename.mapping = typename
>> }
>> }
>> }
>>
>> [..]
>>
>>
>>
>> Kann mir jemand verraten, wie ich das machen kann? So wie hier
>> geschrieben funktioniert es leider nicht.
>>
>>
>>
>> Viele Grüße
>>
>> Johannes
>>
>
> where = COA
> where {
> 10 = TEXT
> 10.value = uid=
> 20 = TEXT
> 20 {
> data = GP:[prefix]|mtype
> sanitize = 1
> }
> }
>
> Durch "sanitize=1" werden die GET/POST-Parameter durch die aktuellen
> internen Parameter im Formhandler ersetzt. So kommst du auf die Daten,
> die der PreProcessor geladen hat. Ev. musst du noch deinen
"formValuesPrefix"
> dazu verweden, aber da bin ich mir spontan nicht sicher.
>
> Viele Grüße,
> Reinhard
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
>
>
Das "[prefix]" war nur als Platzhalter gedacht. Wenn in deinem Fall der
"formValuesPrefix" "formhandler" ist, kannst du so auf die Daten zugreifen:
data = GP:formhandler|type
Viele Grüße,
Reinhard
_______________________________________________
TYPO3-german mailing list
TYPO3-german at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
More information about the TYPO3-german
mailing list