For Fragment my code is
public class FragmentOne extends AbstractFragment
{
protected static final String TEMPLATE_DIRECTORY_PATH = "templates/fragments/";
public FragmentByAssignee(VelocityTemplatingEngine templatingEngine, JiraAuthenticationContext authenticationContext)
{
super(templatingEngine, authenticationContext);
}
@Override
public String getId() {
return "fragmentByAssignee";
}
@Override
public boolean showFragment(BrowseContext arg0)
{
return true;
}
@Override
protected String getTemplateDirectoryPath() {
return TEMPLATE_DIRECTORY_PATH;
}
@Override
protected Map<String, Object> createVelocityParams(BrowseContext ctx) {
Map<String, Object> createVelocityParams = super.createVelocityParams(ctx);
createVelocityParams.put("user", "Satyendra");
return createVelocityParams;
}
}
For Newprojecttab class it is:
public class Newprojecttab extends AbstractFragmentBasedTabPanel
{
private final FragmentOne fragmentOne;
private final FragmentTwo fragmentTwo;
public IssuesBasedProjectTab(VelocityTemplatingEngine templatingEngine, JiraAuthenticationContext authenticationContext)
{
this.fragmentOne= new FragmentOne(templatingEngine, authenticationContext);
this.fragmentTwo= new FragmentTwo (templatingEngine, authenticationContext);
}
@Override
protected List getLeftColumnFragments(BrowseContext arg0)
{
final List fragments = new ArrayList();
fragments.add(fragmentOne);
return fragments;
}
@Override
protected List getRightColumnFragments(BrowseContext arg0)
{
final List fragments = new ArrayList();
fragments.add(fragmentTwo);
return fragments;
}
public boolean showPanel(BrowseContext ctx)
{
return true;
}
}
Its compiling and build sucessfully, But it is not displaying the tab panel & fragment.
Thanks in advance.