<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: selectOneMenu: Value will not be set</title><link>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set</link><description>&lt;p&gt;I've got a dropdown menu, which gets the persons from our LDAP server. What I basically did was copying the SelectOneMenuDemo from the Demo files.&lt;/p&gt;
&lt;p&gt;However, it's displaying all persons correctly in the dropdown, but it won't set the selected person to my &lt;em&gt;data.manager&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This is the code from the demo:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;p:selectonemenu value="#{data.selectedPerson}" converter="ivy.ListItem"&amp;gt;&lt;br&gt;
                    &amp;lt;f:selectitem itemlabel="Select One" itemvalue=""/&amp;gt;&lt;br&gt;
                    &amp;lt;f:selectitems value="#{data.persons}" var="it" itemvalue="#{it}" itemlabel="#{it.name}"&amp;gt;&amp;lt;/f:selectitems&amp;gt;
                    &amp;lt;f:selectitems value="#{data.morePersons}" var="it" itemvalue="#{it}" itemlabel="#{it.name}"&amp;gt;&amp;lt;/f:selectitems&amp;gt;
                    &amp;lt;f:selectitem itemvalue="#{data.onePerson}" itemlabel="#{data.onePerson.name}"&amp;gt;&amp;lt;/f:selectitem&amp;gt;
                &amp;lt;/p:selectonemenu&amp;gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And this is what I wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;p:selectonemenu id="manager" value="{data.manager}" converter="ivy.ListItem" style="width: 200px;"&amp;gt;
                                        &amp;lt;f:selectitems value="#{data.managers}" var="it" itemvalue="#{it}" itemlabel="#{it.cn}"&amp;gt;&amp;lt;/f:selectitems&amp;gt;
                                                                            &amp;lt;/p:selectonemenu&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is there something I've forgotten? This looks exactly the same to me. Do I have to do something when I submit? I've got a multiview HTML dialog.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 30 Apr 2014 17:17:25 -0400</lastBuildDate><item><title>Answer by StoRicMan</title><link>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set/672</link><description>&lt;p&gt;The Hash in value is not set: 
wrong: ... value="{data.manager}" ...
correct: ... value="&lt;strong&gt;#&lt;/strong&gt;{data.manager}" ...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">StoRicMan</dc:creator><pubDate>Wed, 30 Apr 2014 17:17:25 -0400</pubDate><guid>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set/672</guid></item><item><title>Comment by ahatius on ahatius's question</title><link>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#595</link><description>&lt;p&gt;&lt;a href="/users/102/roland/"&gt;&lt;a href="/users/102/roland/"&gt;@roland&lt;/a&gt;&lt;/a&gt; But that would only save one attribute of the object instead of the whole object. What bugs my mind is the fact that it works in the demo, so it can't be impossible. I suspect somethings wrong with the multiview, but I have no idea what it might be.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ahatius</dc:creator><pubDate>Thu, 27 Mar 2014 20:37:46 -0400</pubDate><guid>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#595</guid></item><item><title>Comment by roland on ahatius's question</title><link>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#594</link><description>&lt;p&gt;Hi did you try to Change the value to example  itemvalue="#{it.logon}" ? we had also Problems writing object into a value.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">roland</dc:creator><pubDate>Thu, 27 Mar 2014 20:18:10 -0400</pubDate><guid>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#594</guid></item><item><title>Comment by ahatius on ahatius's question</title><link>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#578</link><description>&lt;p&gt;&lt;a href="/users/5/peter-st%C3%B6ckli/"&gt;&lt;a href="/users/5/peter-st%C3%B6ckli/"&gt;@Peter Stöckli&lt;/a&gt;&lt;/a&gt; No, unfortunately it doesn't even show up in the history. I tried the snippet of the demo in my view, won't work either. Might this be a problem with switching views?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ahatius</dc:creator><pubDate>Thu, 13 Mar 2014 13:54:51 -0400</pubDate><guid>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#578</guid></item><item><title>Comment by Peter Stöckli on ahatius's question</title><link>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#577</link><description>&lt;p&gt;Hi. Do you have any errors in the Runtime Log? Is the person not set if you look at the history of the element? If you copy the SelectOneMenu sample to your multiview Dialog is it also not set correctly?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Stöckli</dc:creator><pubDate>Thu, 13 Mar 2014 13:27:53 -0400</pubDate><guid>https://answers.axonivy.com/questions/576/selectonemenu-value-will-not-be-set#577</guid></item></channel></rss>