com.atlassian.jira.web.util
Class SubTaskQuickCreationWebComponent
java.lang.Object
com.atlassian.jira.web.component.AbstractWebComponent
com.atlassian.jira.web.util.SubTaskQuickCreationWebComponent
public class SubTaskQuickCreationWebComponent
- extends AbstractWebComponent
Used to render a Quick Sub Task Creation (html) form. This form is primarily used on the View Issue page
when sub-tasks are enabled to allow users to quickly create new sub tasks. This web component allows to show
the form anywhere.
To use this Web Component instantiate it and then call its getHtml()
method. To instantiate this object you
will need to pass in the parent issue for which the sub-tasks will be created, and a WebWork action that backs the
display operation. This class also has quite a few dependencies on JIRA Manager Objects. The easiest way to
instantiate it is to use JiraUtils
.
For example:
SubTaskQuickCreationWebComponent component =
(SubTaskQuickCreationWebComponent) JiraUtils.loadComponent(SubTaskQuickCreationWebComponent.class,
EasyList.build(issue, action));
String html = component.getHtml();
Copyright (c) 2002-2004
All rights reserved.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubTaskQuickCreationWebComponent
public SubTaskQuickCreationWebComponent(Issue parentIssue,
webwork.action.Action action,
IssueFactory issueFactory,
SubTaskManager subTaskManager,
FieldManager fieldManager,
com.atlassian.velocity.VelocityManager velocityManager,
JiraAuthenticationContext authenticationContext,
ApplicationProperties applicationProperties,
SubTaskQuickCreationConfig config)
getParentIssue
public Issue getParentIssue()
getSubTask
public Issue getSubTask()
getSubTaskFieldHtml
public String getSubTaskFieldHtml(String fieldId,
boolean showHeaders)
- Generates HTML view (input control) for the field with given field id. If the field is visible
for at least one sub-task issue type in the parent issue's project the HTML for the input control is
returned. If the field is hidden for all sub-task issue types of the parent issue's project then  
is returned.
Remember that sub-tasks are always in the same project as the parent issue
This method is used to generate input HTML for a field by the (velocity) template of this object. It is not
really intended to be used by anything other than the template.
- Parameters:
fieldId
- the id of the field for with HTML shoudl be generated. See
IssueFieldConstants
for the list of issue fields.showHeaders
- if set to true headers will be shown (true for vertical layout, false for horizontal layout)
- Returns:
- HTML of the "input control" of the field. It will be wrapped in a
in expectation of being included in table.
getSubTaskFieldPreset
public String getSubTaskFieldPreset(String fieldId)
isFieldInScope
protected boolean isFieldInScope(OrderableField field)
setHistoryIssueType
protected void setHistoryIssueType()
getHtml
public String getHtml()
- Generates and returns the HTML of the Sub-Task Quick Creation form.
- Returns:
- HTML of the Sub-Task Quick Creation form
getDisplayFieldIds
protected Collection getDisplayFieldIds()
- Returns a collection of
OrderableField ids that will be dispalyed on the sub-task creation form.
- Returns:
- collection of
OrderableField ids that will be dispalyed on the sub-task creation form
getPresetFieldIds
protected Collection getPresetFieldIds()
- Returns a collection of
OrderableField ids which have predefined values.
- Returns:
- a collection of
OrderableField ids which have predefined values
Copyright © 2002-2012 Atlassian. All Rights Reserved.
|