Revision: 867
http://stripes.svn.sourceforge.net/stripes/?rev=867&view=rev
Author: mongus
Date: 2008-02-27 06:18:21 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
fixed NPE caused by tag reuse without resetting properties
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/tag/InputOptionsCollectionTag.java
Modified:
trunk/stripes/src/net/sourceforge/stripes/tag/InputOptionsCollectionTag.java
===================================================================
---
trunk/stripes/src/net/sourceforge/stripes/tag/InputOptionsCollectionTag.java
2008-02-27 03:45:22 UTC (rev 866)
+++
trunk/stripes/src/net/sourceforge/stripes/tag/InputOptionsCollectionTag.java
2008-02-27 14:18:21 UTC (rev 867)
@@ -296,16 +296,19 @@
new
BeanComparator(getPageContext().getRequest().getLocale(), props));
}
- InputOptionTag tag = new InputOptionTag();
- tag.setParent(this);
- tag.setPageContext(getPageContext());
- tag.getAttributes().putAll(getAttributes());
-
Object lastGroup = null;
for (Entry entry : sortedEntries) {
- tag.setLabel(entry.label == null ? null :
entry.label.toString());
- tag.setValue(entry.value);
+ InputOptionTag tag = new InputOptionTag();
+
+ // Set properties common to all options
+ tag.setParent(this);
+ tag.setPageContext(getPageContext());
+ tag.getAttributes().putAll(getAttributes());
+
+ // Set properties for this tag
+ tag.setLabel(entry.label == null ? null : entry.label.toString());
+ tag.setValue(entry.value);
try {
if (entry.group != null && !entry.group.equals(lastGroup))
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development