com.atlassian.jira.web.action.issue.util
Class ScreenTabErrorHelper

java.lang.Object
  extended by com.atlassian.jira.web.action.issue.util.ScreenTabErrorHelper
All Implemented Interfaces:
Serializable

public class ScreenTabErrorHelper
extends Object
implements Serializable

Helper class which contains the logic required to resolve which Field Screen Tabs contain errors, based on the error collection supplied.

Since:
v4.2
See Also:
EditIssue, CreateIssue, CommentAssignIssue, BulkWorkflowTransition, Serialized Form

Constructor Summary
ScreenTabErrorHelper()
           
 
Method Summary
 int initialiseTabsWithErrors(SortedSet<FieldScreenRenderTab> tabsWithErrors, Map<String,Object> errors, FieldScreenRenderer fieldScreenRenderer, Map webParameters)
          Populates the set of field screen tabs with the tabs which contain errors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenTabErrorHelper

public ScreenTabErrorHelper()
Method Detail

initialiseTabsWithErrors

public int initialiseTabsWithErrors(SortedSet<FieldScreenRenderTab> tabsWithErrors,
                                    Map<String,Object> errors,
                                    FieldScreenRenderer fieldScreenRenderer,
                                    Map webParameters)
Populates the set of field screen tabs with the tabs which contain errors. This is based on the error collection supplied, which is a mapping from field names to error messages. Will return the index of the tab to be selected, which is either the first tab with an error, or simply the first tab.

Parameters:
tabsWithErrors - the set of tabs to populate
errors - the error collection
fieldScreenRenderer - the field screen renderer to resolve FieldScreenRenderTab from field ids.
webParameters - the Webwork parameters
Returns:
the (1-based) index of the tab to be selected.


Copyright © 2002-2013 Atlassian. All Rights Reserved.