[fusion-users] HTML in selection results?

Paul Spencer pspencer at dmsolutions.ca
Thu Aug 14 21:58:29 EDT 2008


Suggestion:

alter table properties add column PropertyReport;
update properties set PropertyReport = ...

ok, more seriously ... I think this will be something that has to be  
left to the new selection rendering code that Alan was working on -  
you can plug in your own JS function to render a selection.

What would be more useful in my mind would be a way to access the  
Extension contents when rendering so that you can have calculated  
properties be created in your own code on the client side.

Trying to do more stuff like this on the server with MapGuide is just  
going to get hairy (juggling types of fields, handling exceptions etc)  
and means more stuff in PHP that needs to be ported to the other  
languages if that ever gets done.

At least, that's what I think :)

Cheers

Paul

On 14-Aug-08, at 6:54 PM, Jason Birch wrote:

> Hi all,
>
> I'd really like to be able to define some calculated columns in a
> MapGuide FeatureSource like so:
>
> <Extension>
> <Name>Assessment_Hyperlinked</Name>
> <FeatureClass>Default:AssessmentParcels</FeatureClass>
> <CalculatedProperty>
>  <Name>PropertyReport</Name>
>  <Expression>concat('&lt;a
> href="http://citymap.nanaimo.ca/civicreportdetails.cfm?GISLINK=',concat(
> "GISLINK",'" target="_new"&gt;Launch Report&lt;/a&gt;')))</Expression>
> </CalculatedProperty>
> </Extension>
>
> (this creates a "column" called PropertyReport that contains an HTML
> link to the property report concatenated with the property identifier)
>
> and then have these show up as HTML in the attribute list when you
> select a feature.  I also see a case where I would want to have a
> thumbnail image show up in the selection results.  Currently, defining
> the columns works just fine, but the Fusion selection widget
> html-encodes the data so it shows up as HTML source in the browser.
>
> I can see why the results are html encoded (because valid user data
> sometimes contains HTML entities), so I don't think that there is a
> simple solution to this.
>
> Ideally, portions of the string that look like /<a href[^>]+/ and / 
> <img
> src^>]+/ would be excluded from the html encoding...
>
> Can anyone think of a solution?
>
> Thanks,
> Jason
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://www.dmsolutions.ca/



More information about the fusion-users mailing list