<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Trigger Verifier - Dictionary ...</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Trigger Verifier - Dictionary ...</description>
  <pubDate>Wed, 19 Jun 2013 22:04:56 -700</pubDate>
  <lastBuildDate>Fri, 10 Dec 2010 09:27:34 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2354</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Trigger Verifier - Dictionary ... : Your suggestion to implement the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9366#9366</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2354<br /><strong>Posted:</strong> 10-Dec-2010 at 9:27am<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Your suggestion to implement the verification in the child class property rather than trying to do on the dictionary in the parent seems to be the way to go.&nbsp; Thanks for your help.]]>
   </description>
   <pubDate>Fri, 10 Dec 2010 09:27:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9366#9366</guid>
  </item> 
  <item>
   <title>Trigger Verifier - Dictionary ... :  Hi,You say that this data is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9365#9365</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2354<br /><strong>Posted:</strong> 10-Dec-2010 at 8:41am<br /><br />Hi,<br><br>You say that this data is taken from "EmployeeContact". Surely the EmployeeContact table then has a type column of some sort, indicating that it is a business/mobile/etc number? <br><br>Why not implement verification in this EmployeeContact class and have logic that defines what to do for specific types?<br><br>If you show us a screenshot or write out how your Employee / Contact tables, we can help you with some sample code. <br><br>Rather than:<br>public Dictionary&lt;string, string&gt; PhoneList&nbsp;&nbsp;{get; &nbsp;set;}<br><br>could you not do something like this:<br><br>public Dictionary&lt;string, EmployeeContact&gt; Contacts { get; set; }<br><br>then bind to Contacts&#091;"Business"&#093;.PhoneNumber ? This would then expose it as an IdeaBlade Entity and you would then have full property changed / verification capabilities.<span style="font-size:10px"><br /><br />Edited by smi-mark - 10-Dec-2010 at 8:43am</span>]]>
   </description>
   <pubDate>Fri, 10 Dec 2010 08:41:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9365#9365</guid>
  </item> 
  <item>
   <title>Trigger Verifier - Dictionary ... :   May be, I oversimplified the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9356#9356</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2354<br /><strong>Posted:</strong> 09-Dec-2010 at 9:23pm<br /><br /><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><SPAN style="mso-tab-count: 1"><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>May be, I oversimplified the Dictionary case <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>in the sample. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>The dictionary is derived from a child table of Employee (say, EmployeeContact) after retrieving the child entities for Employee. The dictionary is used so that the data can be shown as simple properties of Employee itself (rather than in a Master-Detail window), but persisted into the database as data in the child table. In fact, in our scenario, EmployeeContact could have different types of data (Phone Number, E-mail etc.) as the Contact type is configurable by the user, and let us ignore that complexity for now. As you have correctly pointed out, the UI is binding to a dictionary value and NOT to the dictionary itself. <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><o:p>&nbsp;</o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Ignoring the UI and other complexities for now, what I am trying to do is simply trigger validation when a dictionary <B>value</B> is changed, similar to the way any simple Entity property is changed. In this case, the property (dictionary) of the Employee is not changed directly, but a value within the dictionary. </SPAN></P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><o:p>&nbsp;</o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>I hope the problem situation is clear now. If not, please let me know.</P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><o:p>&nbsp;</o:p></SPAN></P><DIV><DIV></DIV><DIV></DIV>Thanks<o:p></o:p></SPAN></DIV><DIV></DIV><DIV></DIV><DIV></DIV></SPAN></SPAN>]]>
   </description>
   <pubDate>Thu, 09 Dec 2010 21:23:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9356#9356</guid>
  </item> 
  <item>
   <title>Trigger Verifier - Dictionary ... : Hi as123;After a few hours thinking...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9355#9355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2354<br /><strong>Posted:</strong> 09-Dec-2010 at 8:05pm<br /><br /><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-weight: normal; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; "><div>Hi as123;</div><div><br></div><div>After a few hours thinking about this, I finally consulted with my senior developer and this is what he has to say:</div><div><br></div>@as123 - Having trouble understanding the scenario.<div><br></div><div>The code you've written is - how do I say this - impossible. There is no UI control that returns a dictionary. You can't set this property to a dictionary that a user would enter.</div><div><br></div><div>The binding that you think is successful is, in fact, reading a value out of the dictionary and putting it on screen. You are binding to a value in the dictionary, not to the dictionary itself.</div><div><br></div><div>Perhaps you are trying to change a value in the dictionary? If so, where is that value going?</div><div><br></div><div>Usually an entity property is changeable only if the value will end up in the database record. No EF-supported table column can take multiple values (or a dictionary). So if you're trying to find a way to stick multiple phone numbers in the Employee ... this doesn't look like it will work.<div><br></div><div>Maybe you're trying to do something different? Maybe you're trying to classify the phone number as a Home, Business, Cell phone? Maybe that classification is stored in the Employee record? If that's the case, let me know and we can talk about how to do it.</div><div><br></div><div>Sorry but I can't help until I understand what you are doing. You may want to forget about the UI for a moment and provide an example of code that reads and writes to this PhoneList property. Then I might see what you're trying to do and be able to help.</div></div></div>]]>
   </description>
   <pubDate>Thu, 09 Dec 2010 20:05:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9355#9355</guid>
  </item> 
  <item>
   <title>Trigger Verifier - Dictionary ... : Is it possible to trigger a verifier...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9329#9329</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2354<br /><strong>Posted:</strong> 08-Dec-2010 at 12:01am<br /><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Is it possible to trigger a verifier when a dictionary value changes?&nbsp;<div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;For example, let us say we have a &nbsp;Dictionary&lt;TKey, Tvalue&gt; called PhoneList on the Employee entity as a property. This dictionary is created at runtime. &nbsp;Also,&nbsp;the PhoneList is bound to SilverLight text fields (PhoneList&#091;"Business"&#093; for business phone number entry)</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;How to specify TriggerItem to fire verification based on changes to a specific entry (for example, PhoneList&#091;"Business"&#093; in the dictionary, or any change (change to "Business", "Home" or "Mobile" dictionary entries) for that matter?&nbsp;</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;The SilverLight binding to the dictionary item (PhoneList&#091;"Business"&#093;) works ok, but not sure on what property the trigger should be specified.&nbsp;</div><div><br></div><div>Thanks</div><div><br></div><div><u>Sample scenario:</u></div><div><br></div><div>public class Employee: Entity</div><div>{</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; public int EmpNumber;</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; public string Name;</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Dictionary&lt;string, string&gt; PhoneList&nbsp;&nbsp;{get; &nbsp;set;}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;...</div><div>}</div>]]>
   </description>
   <pubDate>Wed, 08 Dec 2010 00:01:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2354&amp;PID=9329#9329</guid>
  </item> 
 </channel>
</rss>