Super thank you -----Message d'origine----- De : Greg Brown [mailto:[email protected]] Envoyé : vendredi 30 avril 2010 14:42 À : [email protected] Objet : Re: ListView & ArrayList
You need to make sure you declare the collections namespace in your WTKX; e.g. xmlns:collections="org.apache.pivot.collections". On Apr 30, 2010, at 8:37 AM, Jérôme Serré wrote: > Hello, > > > > When i use an ArrayList with a ListView it doesnt work. With an array its > ok. > > Somebody can help me ? > > Thanks > > > > OK : > > <BoxPane orientation="vertical"> > > <ScrollPane horizontalScrollBarPolicy="fill" > verticalScrollBarPolicy="fill_to_capacity" > > preferredWidth="180" > preferredHeight="250"> > > <view> > > > <ListView wtkx:id="gaucheHaut" selectMode="single" > > > listData="['Gestion Utilisateur']"/> > > </view> > > </ScrollPane> > > </BoxPane> > > > > NOK : Error is > > An error occurred while processing element <listData> starting at line > number 37 in file /vsm/ihm/applet/administrationCentreGauche.wtkx: > > org.apache.pivot.serialization.SerializationException: > javax.xml.stream.XMLStreamException: ParseError at [row,col]:[38,38] > > Message: > http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?collec > tions&collections:ArrayList > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.processEndElement(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.processEndElement(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source) > > at > ihm.applet.Administration.startup(Administration.java:45) > > at > org.apache.pivot.wtk.BrowserApplicationContext$HostApplet$StartCallback.run( > Unknown Source) > > at > org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(Unknown Source) > > at java.awt.event.InvocationEvent.dispatch(Unknown > Source) > > at java.awt.EventQueue.dispatchEvent(Unknown Source) > > at > java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) > > at > java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) > > at > java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > > at java.awt.EventDispatchThread.pumpEvents(Unknown > Source) > > at java.awt.EventDispatchThread.pumpEvents(Unknown > Source) > > at java.awt.EventDispatchThread.run(Unknown Source) > > Caused by: javax.xml.stream.XMLStreamException: ParseError at > [row,col]:[38,38] > > Message: > http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?collec > tions&collections:ArrayList > > at > com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown > Source) > > <BoxPane orientation="vertical"> > > <ScrollPane horizontalScrollBarPolicy="fill" > verticalScrollBarPolicy="fill_to_capacity" > > preferredWidth="180" > preferredHeight="340"> > > <view> > > > <ListView wtkx:id="gaucheBas" selectMode="single"> > > > <listData> > > > <collections:ArrayList> > > > <content:ListItem text="Red"/> > > > <content:ListItem text="Orange"/> > > > <content:ListItem text="Yellow"/> > > > <content:ListItem text="Green"/> > > > <content:ListItem text="Blue"/> > > > <content:ListItem text="Purple"/> > > > </collections:ArrayList> > > > </listData> > > > </ListView> > > </view> > > </ScrollPane> > > </BoxPane> > > __ > > Cordialement > > Jérôme Serré > > > >
