Issue 1:
Harikrishna Kollli opened SPR-5876 and commented

The Inner tags not able to access the name of the command object via the PageContext in partial page rendering using the FormTag.MODEL_ATTRIBUTE_VARIABLE_NAME, DEFAULT_COMMAND_NAME attribute. I am putting the name of the command bean into the model.

@RequestMapping(value="/dashboard/hotels.action", method = RequestMethod.GET)

public String hotelsHandler(@ModelAttribute("command") DashboardPresentationModel command, Model model)

{

model.addAttribute(FormTag.MODEL_ATTRIBUTE_VARIABLE_NAME, DEFAULT_COMMAND_NAME);
model.addAttribute(DEFAULT_COMMAND_NAME,command);
return "locationDependent";
}

I get the below exception on page refresh

java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'hotel' available as request attribute

at org.springframework.web.servlet.support.BindStatus .<init>(BindStatus.java:141)

at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getBindStatus(AbstractData BoundFormElementTag.java:175)

at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getPropertyPath(AbstractDa taBoundFormElementTag.java:195)

at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getName(AbstractDataBoundF ormElementTag.java:161)

at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.autogenerateId(AbstractDat aBoundFormElementTag.java:148)

at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.resolveId(AbstractDataBoun dFormElementTag.java:139)

at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.writeDefaultAttributes(Abs tractDataBoundFormElementTag.java:123)

at org.springframework.web.servlet.tags.form.Abstract HtmlElementTag.writeDefaultAttributes(AbstractHtml ElementTag.java:380)

at org.springframework.web.servlet.tags.form.SelectTa g.writeTagContent(SelectTag.java:199)

Affects: 3.0 M3

Reference URL: http://forum.springsource.org/showthread.php?t=74021

Issue Links:

#10544 Partial page refresh with form tag is not working ("duplicates")

Issue 2:
Noel Flicken opened SPR-4702 and commented

Expected behavior:

Context should be close()'d after end of test class execution

Observed behavior:

Context only closed when @DirtiesContext annotates method

Multiple test classes can re-use the same context, which allows for faster test execution, so automatically closing a context after test class execution is probably not the best mechanism.

However, there should be a way to annotate that a context should be close()'d after all tests in a test class are executed.

Suggested fix:

allow @DirtiesContext to annotate class

add TestExecutionListener#destroyTestInstance

Willing to implementing, if given approval of design.

Issue Links:

#10068 ApplicationContext not closed when using @ContextConfiguration to implement integration tests ("is duplicated by")

#9978 Add a setDirty method to AbstractTestNGSpringContextTests

#10311 Reload the application context for each test in a class with a class level annotation

#6700 ANT does not call destroy-method after tests

#10068 ApplicationContext not closed when using @ContextConfiguration to implement integration tests

Referenced from: commits 2dee54b, e77e070, 7782184, 0483cb5, 8dec6af, 1f087b4, 51b8b99, f26e2e3

4 votes, 6 watchers