[jboss-jira] [JBoss JIRA] Created: (JBFORUMS-287) active duration field creating a new topic

Luca Stancapiano (JIRA) jira-events at lists.jboss.org
Sun Jul 26 07:50:29 EDT 2009


active duration field creating a new topic
------------------------------------------

                 Key: JBFORUMS-287
                 URL: https://jira.jboss.org/jira/browse/JBFORUMS-287
             Project: JBoss Forums
          Issue Type: Bug
    Affects Versions: 1.2.0 Alpha
         Environment: JBoss Portal 2.7.2 with JBoss AS 4.2.3.GA
            Reporter: Luca Stancapiano
            Assignee: Luca Stancapiano
             Fix For: 1.2.0 Alpha, 1.3.0 Alpha, 1.2.0 GA


when I create a new topic I have an error of conversion. The active duration field is an Integer but it is stored as String because the converter doesn't work right:

org.jboss.portlet.forums.ui.action.converters.PollDurationConverter:

   public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException
    {
        
        if (value==null || value.trim().length()==0)
        {
            return 0;
        }
        else
        {
            try
            {
            	return value;
            }
            catch (NumberFormatException e)
            {
                FacesMessage message = new FacesMessage();
                message.setDetail(JSFUtil.getBundleMessage(Constants.BUNDLE_NAME, ValidatorMessages.POLL_DURATION_MSG));
                message.setSummary(JSFUtil.getBundleMessage(Constants.BUNDLE_NAME, ValidatorMessages.POLL_DURATION_MSG));
                message.setSeverity(FacesMessage.SEVERITY_ERROR);
                throw new ConverterException(message);
            }
        }
    }


It should return return Integer.valueOf(value);

because the result is elaborated by the method setActiveDuration(int intactiveDuration)   of org.jboss.portlet.forums.ui.action.PostAction class


It should to be tested in other versions too

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list