Back Forum Reply New

Possible error in mvc-convention example

Forgive me if this is rubbish.

Was keen to look at Spring 2 so downloaded and set to with the samples, with particular interest in the XML reducing mvc new features displayed in the sample 'mvc-convention'.

The edit recipe page didnt work though, just redisplayed with no error. After a while scratching my head I think the editRecipe.jsp might contain an error.

The hidden field is causing a double id request param on post as the id is taken care of by the initial call to editrecipe getting into the form action. Was causing id to come thru as '3,3' and fail auto transform to long for id property of Recipe.

Have replaced: -

lt;form:hidden path=quot;idquot;/gt;

with   
lt;form:errors path=quot;*quot; /gt;

so any error's (of which there now arent any) are displayed and now appears to work ok.

Have checked the latest nightly build and looks same as my less recent download.

Just in case any other newbies struggle.

cheers,
G.

Hi,
i hade similar problem. The reason was, that i had two form:form tags each after eachother. Chack it.

Antoni
¥
Back Forum Reply New