Fix for Jira [DS-96] XMLUI Wing-Framework 'Radio' class doesn't support adding radio buttons which are unselected by default.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3604 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Tim Donohue
2009-03-17 19:17:27 +00:00
parent bf1fdd525e
commit 1fb610e594
2 changed files with 21 additions and 5 deletions

View File

@@ -133,7 +133,10 @@ public class Radio extends Field
public Option addOption(boolean selected, String returnValue) public Option addOption(boolean selected, String returnValue)
throws WingException throws WingException
{ {
setOptionSelected(returnValue); if (selected)
{
setOptionSelected(returnValue);
}
return addOption(returnValue); return addOption(returnValue);
} }
@@ -165,7 +168,10 @@ public class Radio extends Field
*/ */
public void addOption(boolean selected,String returnValue, String characters) throws WingException public void addOption(boolean selected,String returnValue, String characters) throws WingException
{ {
setOptionSelected(returnValue); if (selected)
{
setOptionSelected(returnValue);
}
addOption(returnValue,characters); addOption(returnValue,characters);
} }
@@ -197,7 +203,10 @@ public class Radio extends Field
*/ */
public void addOption(boolean selected, int returnValue, String characters) throws WingException public void addOption(boolean selected, int returnValue, String characters) throws WingException
{ {
setOptionSelected(returnValue); if (selected)
{
setOptionSelected(returnValue);
}
addOption(returnValue,characters); addOption(returnValue,characters);
} }
@@ -229,7 +238,10 @@ public class Radio extends Field
*/ */
public void addOption(boolean selected, String returnValue, Message message) throws WingException public void addOption(boolean selected, String returnValue, Message message) throws WingException
{ {
setOptionSelected(returnValue); if (selected)
{
setOptionSelected(returnValue);
}
addOption(returnValue,message); addOption(returnValue,message);
} }
@@ -261,7 +273,10 @@ public class Radio extends Field
*/ */
public void addOption(boolean selected, int returnValue, Message message) throws WingException public void addOption(boolean selected, int returnValue, Message message) throws WingException
{ {
setOptionSelected(returnValue); if (selected)
{
setOptionSelected(returnValue);
}
addOption(returnValue,message); addOption(returnValue,message);
} }

View File

@@ -70,6 +70,7 @@
- Fix for Jira bug [DS-86] XMLUI Feedback form does not include any protection from spamming - Fix for Jira bug [DS-86] XMLUI Feedback form does not include any protection from spamming
- Fix for Jira [DS-87] XMLUI file download links break in Google search results if file 'sequence' number changes. - Fix for Jira [DS-87] XMLUI file download links break in Google search results if file 'sequence' number changes.
- Fix for Jira [DS-95] XMLUI: Visiting an item page with a trailing slash returns a 404 message - Fix for Jira [DS-95] XMLUI: Visiting an item page with a trailing slash returns a 404 message
- Fix for Jira [DS-96] XMLUI Wing-Framework 'Radio' class doesn't support adding radio buttons which are unselected by default.
(Kim Shepherd) (Kim Shepherd)
- [2385187] Fix for toDate method in DCDate - [2385187] Fix for toDate method in DCDate