<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "What is the best way to do that?"]]></title>
		<link>http://forum.infiniteautomation.com/forum/posts/list/3.page</link>
		<description><![CDATA[Latest messages posted in the topic "What is the best way to do that?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>What is the best way to do that?</title>
				<description><![CDATA[ Got some datapoints for retrieving error codes ( int<img src="http://forum.infiniteautomation.com/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" /><br /> Wish to offer a view with errors in plain text.<br /> <br /> thought about using customview with a function let's say <br /> String V(int code , String lang)<br /> <br /> and in viewpoint something like :<br /> <br /> if(value == "0") image = greenflag<br /> else<br /> image = redflag<br /> out.println(V(value.parseInt() , lang));<br /> <br /> but got an error saying that my function does not exist.<br /> where/how can I declare my function?<br /> <br /> on another hand,<br /> Is there any way to declare 'transformation scripts' on datapoints in mango. Let's say ScriptA.<br /> <br /> and then custom Datapoint as the result of applying ScriptA on another datapoint.<br /> <br /> something like MetaDatasource or pointslink , but with the same script for all points.<br /> No copy/Paste<br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/309/1420.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/309/1420.page</link>
				<pubDate><![CDATA[Tue, 16 Feb 2010 14:37:35]]> GMT</pubDate>
				<author><![CDATA[ Patriator]]></author>
			</item>
			<item>
				<title>Re:What is the best way to do that?</title>
				<description><![CDATA[ An easy way may be to define your points as multistate, and then create a text renderer that maps the states to text descriptions. Would that work for you?]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/309/1423.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/309/1423.page</link>
				<pubDate><![CDATA[Tue, 16 Feb 2010 22:41:47]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:What is the best way to do that?</title>
				<description><![CDATA[ Did not find the clue for using textrenderer.<br /> Is there any exemple , doc ? <br /> <br /> I guess that if I define a text renderer I'll be able to use it several times and that's exactly the point.<br /> <br /> the other thing is that my points are from a modbus datasource... I'll have to create Meta-Points.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/309/1424.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/309/1424.page</link>
				<pubDate><![CDATA[Wed, 17 Feb 2010 03:10:22]]> GMT</pubDate>
				<author><![CDATA[ Patriator]]></author>
			</item>
			<item>
				<title>Re:What is the best way to do that?</title>
				<description><![CDATA[ Well I finally did it via CustomView ...<br /> Things were easier once I realize that code I can add between  &lt;view:scriptPoint&gt; and &lt;/view:scriptPoint&gt; was the code for the <br /> function(value, time) and should be in javascript.<br /> <br /> So my code looks like that :<br /> <br /> in a js file the declaration of my function.<br /> <br /> in the jsp : <br /> <br /> [code]&lt;h3&gt;Roof n° 1 &lt;img id="scripted" src="images/hourglass.png"/&gt;<br /> &lt;SPAN id="sperreur" style="color: red"&gt;&lt;/SPAN&gt;<br /> <br /> &lt;view:scriptPoint xid="DP_DP_999973"&gt;<br />   if (value == "0") {<br />       $("scripted").src = "graphics/BlinkingLights/light_green.gif";<br />       binaryValue = true;<br />   }<br />   else {<br />       $("scripted").src = "graphics/BlinkingLights/light_red.gif";<br /> 	  $("scripted").title = getErrorString(parseInt(value)) ;<br /> 	  $("sperreur").innerHTML = getErrorString(parseInt(value)) ;<br />        binaryValue = false;<br />   }<br /> &lt;/view:scriptPoint&gt;<br /> &lt;/h3&gt;[/code]]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/309/1425.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/309/1425.page</link>
				<pubDate><![CDATA[Wed, 17 Feb 2010 04:46:19]]> GMT</pubDate>
				<author><![CDATA[ Patriator]]></author>
			</item>
			<item>
				<title>Re:What is the best way to do that?</title>
				<description><![CDATA[ Text renderers are assigned to points. Editing is found in the page with a "brick" icon that has a pencil on it.<br /> <br /> Anyway, i'm glad that you were able to do this with a custom view. I had a feeling that users were more than willing to do their own scripting.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/309/1426.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/309/1426.page</link>
				<pubDate><![CDATA[Wed, 17 Feb 2010 09:45:16]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
	</channel>
</rss>
