Hi,
I'm using roo 1.2.3 in combination with spring data for mongodb and jspx/tiles to show my ui.
On my domain class I have a field like
On my update.jspx page for that entity, it produces an input field likeCode:@NotNull @DBRef @ManyToOne //many to one to force use of select field in ui private Category category;
which is as expected. But the problem is that when I access the update page, the select field are populated with all available options for the category, but the correct option is not selected. I would expect the combobox to display the category setted for the entity you are editing, but it always just display the first option from the list.Code:<field:select field="category" id="c_dk_rl_pdfbrowser_domain_PdfFile_category" itemValue="id" items="${categorys}" path="/categorys" required="true" z="8R8620DBGyAiLQOLueF59FZgaMA="/>
Is that a bug? Or how should I force the combobox to display the actual selected category on my entity, instead of just the first one available. If I change the input type to a textfield, the name of the selected category is shown correctly in the textfield.
In the markup for the html all options are like
and none has selected="selected"Code:<option value="25115080317610238519379680847">name_807 description_807</option> <option value="25115084468127743141689715818">name_2147483647 description_2147483647</option>
When I create an empty example using a derby embedded database, the correct element are selected in the combobox
Best Regards
Niels


Reply With Quote