Page 2 of 2

PostPosted: Mon Aug 30, 2004 10:47 am
by Jan Blok
This works ok for me:
Code: Select all
elements.blob_url_display.setImageURL('media:///servoy_blobloader?servername='+controller.getServerName()+'&tablename='+controller.getTableName()+'&dataprovider=img&mimetype=image/gif&rowid1=1');

the same url syntax can be used in html.

PostPosted: Mon Aug 30, 2004 11:18 am
by patrick
A method, that sets a label, works for me, too:

Code: Select all
var image = 'media:///servoy_blobloader?servername=' + currentcontroller.getServerName() + '&tablename=v_laender&dataprovider=flagge_klein&mimetype=image/gif&rowid1=' + uid_v_laender
elements.bild.setImageURL(image);


What doesn't work, is to use this in a calculation where either the image is returned (in a media calculation) or returned nested in HTML.

For the calculation I am using the exact same code as above, but I return "image" in case of the media calculation.

PostPosted: Mon Aug 30, 2004 1:55 pm
by Jan Blok
Loading in html seems no problem for me:
Code: Select all
elements.blob_url_display.text =  '<html><img src="media:///servoy_blobloader?servername='+controller.getServerName()+
'&tablename='+controller.getTableName()+
'&dataprovider=img&mimetype=image/gif&rowid1=1"></html>';


What you are trying todo with the media field I don't understand you are loading the url text in a media field? (which only support byte array's).
It seems to me you are trying to use the media field in the wrong way

PostPosted: Mon Aug 30, 2004 2:15 pm
by patrick
We are having communication troubles...

Let's try it this way:

What I want to do is a value list which shows icon and text in the popup. I have done those before with html by hand. Each entry is a table with one row and three columns: icon, spacer, text.

Now I want to use the new functionality to do a value list like that based on a table. I have a table with countries and their flags. So I thought I create a calculation (stored) in that table that throws me the html code for one entry and I could then build a value list on that column.

How do I have to go about this?

PostPosted: Mon Aug 30, 2004 4:06 pm
by Jan Blok
1) make a dbvaluelist on columns (language_id,stored_calc_flag_language)
2) let stored_calc_flag_name return:
Code: Select all
'<html><img src="media:///servoy_blobloader?...flagimage-per-language_id..."> - '+language_name+'</html>'
3) attach value list to combobox

PostPosted: Mon Aug 30, 2004 6:06 pm
by patrick
Hello Jan,

thanks for your patience! I have found my problem, it was something little but itchy in my HTML code. Now it works!