Select to view content in your preferred language

Query Widget

894
1
10-19-2010 01:25 AM
MagalyC_
Deactivated User
Hi,

I am testing the query widget and have problems with emphasis.
Here is my config:
<?xml version="1.0" ?>
<configuration>
    <layer>http://[MySERVER]/arcgis/rest/services/ab_equipement/MapServer/1</layer>
    <titlefield>NOM</titlefield>
    <fields all="false">
        <field name="NOM"/> 
    </fields>
    <filterfield>
        <name>NOM</name>
        <alias>Filtrer par nom:</alias>
    </filterfield>
    <linkfield></linkfield>
    <refreshrate></refreshrate>
    <query>TYPE='AGGLO'</query>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>


Thanks for help!
Tags (2)
0 Kudos
1 Reply
MagalyC_
Deactivated User
I found the solution:

public class FunctionsUtils
{
                public static function utf8_decode(utftext:String):String
  {
   var string:String = "";
   var i:int = 0;
   var c:int;
   var c1:int;
   var c2:int;
   var c3:int;
   c = c1 = c2 = 0;
   
   while ( i < utftext.length ) {
    
    c = utftext.charCodeAt(i);
    
    if (c < 128) {
     string += String.fromCharCode(c);
     i++;
    }
    else if((c > 191) && (c < 224)) {
     c2 = utftext.charCodeAt(i+1);
     string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
     i += 2;
    }
    else {
     c2 = utftext.charCodeAt(i+1);
     c3 = utftext.charCodeAt(i+2);
     string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
     i += 3;
    }
    
   } 
   return string;
  }
}


FunctionsUtils.utf8_decode(graphic.attributes[fieldName])


It Works!!! 🙂

Source: http://www.webtoolkit.info/actionscript-utf8.html
0 Kudos