[TYPO3-project-formidable] Refresh and dynamic listbox

Izzie Greys izzie.greys at gmail.com
Tue Jul 22 11:24:22 CEST 2008


Hey Jerome,

Thank you so much for the example. It was very useful. It was exactly what I
want to do, I just replace php array by sql request and it's nearly perfect.
Nearly because there is just a strange problem on IE6 (it's perfect with
Firefox). When I select a "rub" item, for some of them, it's loading,
loading (ajax image).... and nothing happens. The "subrub" isn't loaded. But
it works for few of them. That's weird isn't it ?

2008/7/22 Jerome Schneider <typo3dev at ameos.com>:

> Hi Izzie,
>
> I think avoiding page-refresh thanks to ajax might help you out.
>
> I placed an example there for your understanding:
> http://formidable.typo3.ug/tutorials/nested-listboxes.html
>
> Please tell if you encounter any problem with this.
>
> Regards,
> Jerome
>
>
> Izzie Greys a écrit :
> > Hi, it's me again. I'm sorry to bother you with my problem but I really
> ned
> > your help. I have made some change and now the form is entirely working
> in
> > edition mode but it's still not working in creation mode. Problems are
> > still:
> > 1 - If I click on the create button on the page where is my
> > renderlet lister, my listbox "rubrique" is ok but my listbox "categorie"
> is
> > empty. I would like it contains the elements in relation with the
> "rubrique"
> > selected.
> > 2 - If I select a element of the listbox "rubrique", my form is closed
> and
> > I'm redirected on my lister.
> > Nothing is created. But it works fine with the edit form. I select an
> > element in the listbox "rubrique" and the listbox "categorie" is updated.
> I
> > don't understand this redirection ?!? Why ? I'm confuse.
> >
> > My new code:
> > <renderlet:LISTBOX name="rubrique" label="Rubrique">
> >    <onchange refresh="true"/>
> >       <data>
> >            <userobj>
> >                 <php>
> >                      <![CDATA[
> >                          return
> > $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, nom as
> > caption","table_rubrique","","nom","");
> >                      ]]>
> >                 </php>
> >            </userobj>
> >      </data>
> > </renderlet:LISTBOX>
> >
> > <renderlet:LISTBOX name="parent_category" label="Catégorie">
> >       <onchange refresh="true"/>
> >            <data>
> >                 <items>
> >                        <item caption="" value=""/>
> >                 </items>
> >                 <userobj>
> >                       <php>
> >                            <![CDATA[
> >                                 $iRubrique =
> > $this->oDataHandler->_getThisFormData("rubrique");
> >                                 if(intval($iRubrique) > 0)
> >                                 {
> >                                 $where .= "rubrique='".$iRubrique."'";
> >                                 return
> > $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, label as
> > caption","table_categorie",$where,"label","");
> >                             }
> >                           ]]>
> >                       </php>
> >                </userobj>
> >        </data>
> > </renderlet:LISTBOX>
> >
> > Thanks for reading.
> > Regards,
> > Izzie
> >
> > 2008/7/18 Izzie Greys <izzie.greys at gmail.com>:
> >
> >> Hello list,
> >>
> >> I have another question for you about the edit/creation form and the
> action
> >> <onchange refresh="true"/> on the renderlet listbox. Here it's my
> problem.
> >> In my edit form/creation form I have a renderlet listbox like this one:
> >>
> >> <renderlet:LISTBOX name="rubrique" label="Rubrique">
> >>     <onchange refresh="true"/>
> >>     <data>
> >>            <userobj>
> >>                  <php>
> >>                      <![CDATA[
> >>                            return
> >> $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, label as
> >> caption","table_rubrique","","","");
> >>                      ]]>
> >>                 </php>
> >>            </userobj>
> >>      </data>
> >> </renderlet:LISTBOX>
> >>
> >> When I select one element of the list my second listbox is updated:
> >>
> >> <renderlet:LISTBOX name="categorie" label="Catégorie">
> >>     <data defaultvalue="">
> >>          <items>
> >>                <item caption="" value=""/>
> >>          </items>
> >>          <userobj>
> >>               <php>
> >>                   <![CDATA[
> >>                        $iRubrique =
> >> $this->oDataHandler->_getThisFormData("rubrique");
> >>                        if(intval($iRubrique) > 0)
> >>                        {
> >>                            $where .= "parent='".$iRubrique."'";
> >>                            return
> >> $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, label as
> >> caption","table_categorie",$where,"","");
> >>                        }
> >>                  ]]>
> >>              </php>
> >>          </userobj>
> >>     </data>
> >> </renderlet:LISTBOX>
> >>
> >> My problems are:
> >> 1 - If I click on the create button or edit button on the page where is
> my
> >> renderlet lister, my listbox "rubrique" is ok but my listbox "categorie"
> is
> >> empty. I would like it contains the elements in relation with the
> >> "rubrique"
> >> selected.
> >> 2 - The other problem concern the create form. If I select a element of
> the
> >> listbox "rubrique", my form is closed and I'm redirected on my lister.
> >> Nothing is created. But it works fine with the edit form. I select an
> >> element in the listbox "rubrique" and the listbox "categorie" is
> updated.
> >>
> >> I don't know how to resolve these problems. I hope you can help me.
> >>
> >> Thanks in advance and have a good day.
> >> _______________________________________________
> >> TYPO3-project-formidable mailing list
> >> TYPO3-project-formidable at lists.netfielders.de
> >>
> >>
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
> >>
>
>
> --
>
>
> *Jérôme Schneider*
> /Developer/
> /Formidable - Rapid Application Developpement Framework for Typo3
> <http://formidable.typo3.ug>/
> /Ameos <http://www.ameos.com>/
> _______________________________________________
> 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