Hello,

I am testing a combo box filled with data from a managed bean, however, no 
matter what value is selected from the combobox in the create window, no value 
is stored in the attribute. I think the problem is with the value attribute 
from selecOneMenu that should be "#{field_0}" but in that case it won't be 
possible to select a default value to show (in this case, the current year). 
Here is the code:

        <!-- Shows the current year as default selected value -->
        <c:if test="#{widget.mode == 'edit' and field_0 == null}">
                <h:selectOneMenu id="#{widget.id}_selectyear" 
value="#{calendarBean.selectedItem}">
                          <f:selectItems value="#{calendarBean.selectItems}" />
                </h:selectOneMenu>
        </c:if>
        
        <!-- Shows the attribute value instead of current year -->
        <c:if test="#{widget.mode == 'edit' and field_0 != null}">
                <h:selectOneMenu id="#{widget.id}_selectyear" 
value="#{field_0}">
                          <f:selectItems value="#{calendarBean.selectItems}" />
                </h:selectOneMenu>
        </c:if>
        
Any suggestions/ideas?

Thanks
--
Posted by "aldago" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread: 
<http://www.nuxeo.org/discussions/thread.jspa?threadID=3314#9991>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to