[TYPO3-project-formidable] Lister problem (v0.5.0 to v0.5.9)

FS fs.nospam1 at a-e-r.org
Fri Sep 8 17:43:17 CEST 2006


Sorry for my previous silly question...
But...

As it is a lister, nothing is selected from the beginning so the  
search does not search, event the lister seems to have a element  
selected, because this element is the only one !

If the restricted list is reduced to one element (it is my case),  
then it is easy to solve the problem : adding php code in the  
<defaultvalue> part, with the same query than for the data, but just  
to test the number of elements of the listbox. And the result is a
(There it could be interesting to be able to get directly the number  
of elements of the listbox and the elements themselves, but this is  
not available...)

The question remains open if I want to limit the result of the lister  
not with "value of the renderlet == thisValue", but with "value of  
the renderlet IN (val1,val2,val3). Is this posible ?

--
F. SCHOSSIG, ICT Manager
Assemblée des Régions d'Europe
http://www.a-e-r.org

   <renderlet:LISTBOX name="contact_id_regionsorgas">
     <label>LLL:EXT:aer_registrations/pi1/ 
locallang.xml:listform.contact_regionorga.label</label>
     <onchange>
       <refresh>true</refresh>
     </onchange>
     <custom>class="userRepList"</custom>
     <data>
       <userobj>
         <php><![CDATA[
           $aItems = array();
           $lang = $GLOBALS['TSFE']->config["config"] 
["sys_language_uid"];
           $oPageSelect = t3lib_div::makeinstance("t3lib_pageSelect");

           $resultQuery = $GLOBALS["TYPO3_DB"]->exec_SELECTquery  
(.../...);
           while(($enreg = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc 
($resultQuery)) !== false) {
             $enreg = $oPageSelect->getRecordOverlay 
("tx_aerdatabases_regionsorgas", $enreg, $lang, $OLmode = '');
             $aItems[] = array (
               "caption" => $enreg["nom"],
               "value"   => $enreg["uid"]
             );
           }
           if (count($aItems) > 1) array_unshift ($aItems,array("",""));
           reset ($aItems);
           return $aItems;
        ]]></php>
       </userobj>
       <defaultvalue>
         <userobj>
           <php><![CDATA[
             $uid = "";
             $oPageSelect = t3lib_div::makeinstance("t3lib_pageSelect");

             $resultQuery = $GLOBALS["TYPO3_DB"]->exec_SELECTquery  
(.../...);
             if ($GLOBALS["TYPO3_DB"]->sql_num_rows($resultQuery) ==  
1) {
               if (($enreg = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc 
($resultQuery)) !== false) {
                 $uid = $enreg["uid"];
               }
             }
             return $uid;
          ]]></php>
         </userobj>
       </defaultvalue>
     </data>
   </renderlet:LISTBOX>




Le 8 sept. 06 à 12:48, FS a écrit :

> Hello the list again...
>
> In the search part of the lister, I have a listbox wich content
> depends on the fe_user access rights...
> So if a user with limited access logs on the site, the content of the
> listbox is lighter. This works fine.
>
> The problem is in the result of the search. FORMidable seems not
> taking care about the limited list ?
> I have the next code in the XML : I thought that
> <search><atstartup>true</atstartup></search> was the thing to manage
> this ?
>
> <control>
>    ...
>    </datahandler:LISTER>
>      ...
>      <search>
>        <atstartup>true</atstartup>
>      </search>
>      ...
>    </datahandler:LISTER>
>    ...
> </control>
>
> Thanks.
> --
> F. SCHOSSIG, ICT Manager
> Assemblée des Régions d'Europe
> http://www.a-e-r.org
>
>
> _______________________________________________
> 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