Voilà le fameux textbox[type="autosuggest"] fonctionnant en remote.
syntaxe : fichier XUL
<?xml-stylesheet href="[[jar:xbl/textfield/textfield.jar!/textfield.css]]" type="text/css"?>
minimum avec un rdf repondant au standard detaillé plus bas:
<textbox type="autosuggest" autosuggestsearch="jsp/suggestion.jsp"/>
avec toutes les option personnalisable :
<textbox type="autosuggest" autosuggestsearch="jsp/suggestion.jsp" autosuggestparam="start" autosuggestlimit="limit" limit="1000"
minlength="0"
maxrows="20"
ref="[[urn:suggest:values]]"
label="[[rdf:urn:suggest:rdf#label]]"
properties="[[rdf:urn:suggest:rdf#prop]] issuggest_[[rdf:urn:suggest:rdf#issuggest]]"
issuggest="[[rdf:urn:suggest:rdf#issuggest"/]]>
details :
Notez que je me sert aussi de issuggest dans l'attribut 'properities' cella me permettra de griser les ligne non selectionnable.
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF [[xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#]]" [[xmlns:NC="http://home.netscape.com/NC-rdf#]]" [[xmlns:KEY="urn:suggest:rdf#]]">
<RDF:Seq RDF:about="[[urn:suggest:values]]">
<RDF:li><RDF:Description KEY:label="à" KEY:prop="" KEY:issuggest="" /></RDF:li>
<RDF:li><RDF:Description KEY:label="a" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="aï" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="av" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="as" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="ah" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="al" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="au" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="an" KEY:prop="" KEY:issuggest=""/></RDF:li>
<RDF:li><RDF:Description KEY:label="ai" KEY:prop="" KEY:issuggest=""/></RDF:li>
</RDF:Seq>
<RDF:Seq RDF:about="[[urn:suggest:nb"]]>
<RDF:li><RDF:Description RDF:number="10"/></RDF:li>
</RDF:Seq>
</RDF:RDF>
la Sequence finale qui informe le composant du nombre de ligne retourné. à tjs renseigner
<RDF:Seq RDF:about="[[urn:suggest:nb"]]>
<RDF:li><RDF:Description RDF:number="10"/></RDF:li>
</RDF:Seq>
Copyright © 2003-2013 association xulfr, 2013-2016 Laurent Jouanneau - Informations légales.
Mozilla® est une marque déposée de la fondation Mozilla.
Mozilla.org™, Firefox™, Thunderbird™, Mozilla Suite™ et XUL™
sont des marques de la fondation Mozilla.