[mapguide-users] Field editor

Jamo adam.jamison at portbris.com.au
Thu Mar 19 20:48:24 EDT 2009




Jamo wrote:
> 
>   String currentClassName = currentLayer.GetClassName();
>   MgSelection newSel = new MgSelection(map);
>   newSel.FromXml(mySelXML);
>   String myFilter = new MgSelection(map,
> mySelXML).GenerateFilter(currentLayer, currentClassName);
>   Response.Write(myFilter);
> 

Should Read!
  String currentClassName = currentLayer.GetFeatureClassName();
  MgSelection newSel = new MgSelection(map);
  newSel.FromXml(mySelXML);
  String myFilter = new MgSelection(map,
mySelXML).GenerateFilter(currentLayer, currentClassName);
  Response.Write(myFilter);


Now how ddoes one actually write the property back to the feature?

using

  void ReleaseReader(MgPropertyCollection res, MgFeatureCommandCollection
commands)
{
    if(res == null)
        return;

    for(int i = 0; i < res.GetCount(); i++)
    {
        MgFeatureCommand cmd = commands.GetItem(i);
        if(cmd.GetCommandType().Equals(MgFeatureCommandType.UpdateFeatures))
        {
            MgFeatureProperty resProp = res.GetItem(i) as MgFeatureProperty;
            if(resProp != null)
            {
                MgFeatureReader reader =
(MgFeatureReader)resProp.GetValue();
                if(reader == null)
                    return;
                reader.Close();
            }
        }
    }
} 
-- 
View this message in context: http://n2.nabble.com/Field-editor-tp2505715p2506402.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list