Java Code Examples for org.apache.wicket.markup.head.IHeaderResponse

The following examples show how to use org.apache.wicket.markup.head.IHeaderResponse. These examples are extracted from open source projects.
Example 1
Project: inception   File: HtmlAnnotationEditor.java    License: Apache License 2.0 6 votes vote down vote up
private static void initAnnotatorJs(IHeaderResponse aResponse, WebComponent aContainer,
        StoreAdapter aAdapter)
{
    String callbackUrl = aAdapter.getCallbackUrl().toString();
    StringBuilder script = new StringBuilder();
    script.append(
            "var ann = $('#" + aContainer.getMarkupId() + "').annotator({readOnly: true});");
    script.append("ann.annotator('addPlugin', 'Store', {");
    script.append("    prefix: null,");
    script.append("    emulateJSON: true,");
    script.append("    emulateHTTP: true,");
    script.append("    urls: {");
    script.append("        read:    '" + callbackUrl + "',");
    script.append("        create:  '" + callbackUrl + "',");
    script.append("        update:  '" + callbackUrl + "',");
    script.append("        destroy: '" + callbackUrl + "',");
    script.append("        search:  '" + callbackUrl + "'");
    script.append("    }");
    script.append("});");
    // script.append("Wicket.$('" + vis.getMarkupId() + "').annotator = ann;");
    aResponse.render(OnDomReadyHeaderItem.forScript(script.toString()));
}
 
Example 2
Project: onedev   File: Select2Choice.java    License: MIT License 6 votes vote down vote up
@Override
protected void renderInitializationScript(IHeaderResponse response) {
	T value;
	if (getWebRequest().getRequestParameters().getParameterNames().contains(getInputName())) {
		convertInput();
		value = getConvertedInput();
	} else {
		value = getModelObject();
	}
	if (value != null) {

		JsonBuilder selection = new JsonBuilder();

		try {
			selection.object();
			getProvider().toJson(value, selection);
			selection.endObject();
		} catch (JSONException e) {
			throw new RuntimeException("Error converting model object to Json", e);
		}
		response.render(OnLoadHeaderItem.forScript(
				JQuery.execute("$('#%s').select2('data', %s);", getJquerySafeMarkupId(), selection.toJson())));
	} else {
		clearInput();
	}
}
 
Example 3
Project: onedev   File: InfiniteScrollBehavior.java    License: MIT License 6 votes vote down vote up
@Override
public void renderHead(Component component, IHeaderResponse response) {
	super.renderHead(component, response);
	response.render(JavaScriptReferenceHeaderItem.forReference(new InfiniteScrollResourceReference()));
	
	String itemSelector;
	if (getItemSelector() != null)
		itemSelector = "'"+JavaScriptEscape.escapeJavaScript(getItemSelector())+"'";
	else
		itemSelector = "undefined";
	
	// Run onload script as the container size might be adjusted in window resize event (which 
	// happens before onload). An example is the issue board columns
	String script = String.format("onedev.server.infiniteScroll.onLoad('%s', %s, %s, %s);", 
			component.getMarkupId(true), getCallbackFunction(explicit("offset"), explicit("count")), 
			pageSize, itemSelector);
	response.render(OnLoadHeaderItem.forScript(script));
}
 
Example 4
Project: onedev   File: SourceLinesPage.java    License: MIT License 6 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	
	Map<Day, Map<String, Integer>> lineIncrements = OneDev.getInstance(CommitInfoManager.class).getLineIncrements(getProject());
	Map<Integer, Map<String, Integer>> data = new HashMap<>();
	for (Map.Entry<Day, Map<String, Integer>> entry: lineIncrements.entrySet()) 
		data.put(entry.getKey().getValue(), entry.getValue());
	try {
		ObjectMapper mapper = OneDev.getInstance(ObjectMapper.class);
		String jsonOfData = mapper.writeValueAsString(data);
		String jsonOfDefaultBranch = mapper.writeValueAsString(getProject().getDefaultBranch());
		String script = String.format("onedev.server.stats.sourceLines.onDomReady(%s, %s);", 
				jsonOfData, jsonOfDefaultBranch);
		response.render(OnDomReadyHeaderItem.forScript(script));
	} catch (JsonProcessingException e) {
		throw new RuntimeException(e);
	}
}
 
Example 5
Project: onedev   File: CodePropertyEditor.java    License: MIT License 6 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new CodeSupportResourceReference()));

	CallbackParameter matchWith = CallbackParameter.explicit("matchWith");
	CallbackParameter line = CallbackParameter.explicit("line");
	CallbackParameter start = CallbackParameter.explicit("start");
	CallbackParameter end = CallbackParameter.explicit("end");
	String script = String.format(
			"onedev.server.codeSupport.onEditorDomReady('%s', '%s', %s);", 
			input.getMarkupId(), 
			getCode().language(), 
			behavior.getCallbackFunction(matchWith, line, start, end));
	response.render(OnLoadHeaderItem.forScript(script));
}
 
Example 6
Project: onedev   File: MarkdownViewer.java    License: MIT License 6 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	
	response.render(JavaScriptHeaderItem.forReference(new LozadResourceReference()));
	response.render(JavaScriptHeaderItem.forReference(new MarkdownResourceReference()));
	
	CharSequence taskCallback = taskBehavior.getCallbackFunction(
			explicit(SourcePositionTrackExtension.DATA_START_ATTRIBUTE), 
			explicit(TASK_CHECKED));
	
	CharSequence referenceCallback = referenceBehavior.getCallbackFunction(
			explicit(REFERENCE_TYPE), explicit(REFERENCE_ID));
	
	String script = String.format("onedev.server.markdown.onViewerDomReady('%s', %s, '%s', %s);", 
			getMarkupId(), 
			contentVersionSupport!=null?taskCallback:"undefined", 
			SourcePositionTrackExtension.DATA_START_ATTRIBUTE, 
			referenceCallback);
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 7
Project: onedev   File: DropzoneField.java    License: MIT License 6 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new DropzoneFieldResourceReference()));
	
	String script = String.format(
			"onedev.server.dropzone.onDomReady('%s', '%s', %s, %s, %s, %d);", 
			getMarkupId(), 
			uploadBehavior.getCallbackUrl(), 
			deleteBehavior.getCallbackFunction(CallbackParameter.explicit("name")),
			acceptedFiles!=null?"'" + acceptedFiles + "'":"null",				
			maxFiles!=0?maxFiles:"null",
			maxFilesize);
	
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 8
Project: onedev   File: ProjectBlobPage.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);

	response.render(JavaScriptHeaderItem.forReference(new ProjectBlobResourceReference()));
	
	String callback = ajaxBehavior.getCallbackFunction(explicit("action")).toString();
	String script = String.format("onedev.server.projectBlob.onDomReady(%s);", callback);
	
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 9
Project: inception   File: ConceptFeatureEditor.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse aResponse)
{
    super.renderHead(aResponse);

    aResponse.render(forReference(KendoChoiceDescriptionScriptReference.get()));
}
 
Example 10
Project: inception   File: PropertyFeatureEditor.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse aResponse)
{
    super.renderHead(aResponse);

    aResponse.render(forReference(KendoChoiceDescriptionScriptReference.get()));
}
 
Example 11
Project: inception   File: TutorialFooterPanel.java    License: Apache License 2.0 5 votes vote down vote up
@Override
    public void renderHead(IHeaderResponse aResponse) {
        aResponse.render(JavaScriptHeaderItem.forReference(WebAnnoJavascriptReference.get()));
        
        //TODO move it back to web jars after latest release
        aResponse.render(JavaScriptHeaderItem.forReference(EnjoyHintJsReference.get()));
//        aResponse.render(JavaScriptHeaderItem
//                .forReference(new WebjarsJavaScriptResourceReference("enjoyhint/current/enjoyhint.js")));

        // Loading resources for the tour guide feature for the new users
        aResponse.render(JavaScriptHeaderItem.forReference(
                new WebjarsJavaScriptResourceReference("enjoyhint/current/jquery.enjoyhint.js")));
        aResponse.render(CssHeaderItem.forReference(
                new WebjarsCssResourceReference("enjoyhint/current/jquery.enjoyhint.css")));
        aResponse.render(JavaScriptHeaderItem.forReference(new WebjarsJavaScriptResourceReference(
                "jquery.scrollTo/current/jquery.scrollTo.js")));
        aResponse.render(JavaScriptHeaderItem.forReference(
                new WebjarsJavaScriptResourceReference("kinetic/current/kinetic.min.js")));

        aResponse.render(JavaScriptHeaderItem.forReference(TutorialJavascriptReference.get()));
        // add top-margin to next button to fix label and buttons overlapping
        aResponse.render(CssHeaderItem.forCSS(
                ".enjoyhint_next_btn{\n" +
                "  margin-top: 8px;\n" +
                "}",
                "enjoyhint"));
        // check if the tutorial will need to be run
        aResponse.render(OnLoadHeaderItem
                .forScript("setContextPath('" + context.getContextPath() + "');\n" +
                           "runRoutines();"));
    }
 
Example 12
Project: onedev   File: ImageDiffPanel.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new ImageDiffResourceReference()));
	String script = String.format("onedev.server.imageDiff.onDomReady('%s');", getMarkupId());
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 13
Project: onedev   File: InputAssistBehavior.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(Component component, IHeaderResponse response) {
	super.renderHead(component, response);

	response.render(JavaScriptHeaderItem.forReference(new InputAssistResourceReference()));
	
	String script = String.format("onedev.server.inputassist.onDomReady('%s', %s);", 
			getComponent().getMarkupId(true), 
			getCallbackFunction(explicit("type"), explicit("input"), explicit("caret")));
	
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 14
Project: onedev   File: OnTypingDoneBehavior.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(Component component, IHeaderResponse response) {
	super.renderHead(component, response);

	response.render(JavaScriptHeaderItem.forReference(new DoneEventsResourceReference()));
	String script = String.format(""
			+ "var $input = $('#%s');"
			+ "$input.doneEvents('input', function() {"
			+ "  $(this).trigger('donetyping');"
			+ "}, %s);",
			component.getMarkupId(true), timeout);
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 15
Project: onedev   File: BlobViewPanel.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	
	response.render(JavaScriptHeaderItem.forReference(new BlobViewResourceReference()));
	
	response.render(OnDomReadyHeaderItem.forScript(String.format("onedev.server.blobView.onDomReady('%s');", getMarkupId())));
}
 
Example 16
Project: onedev   File: ColorPicker.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new ColorPickerResourceReference()));
	
	String script = String.format("onedev.server.colorPicker.onDomReady('%s', %b);", 
			getMarkupId(true), allowEmpty);
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 17
Project: onedev   File: CodePropertyViewer.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new CodeSupportResourceReference()));
	
	String script = String.format("onedev.server.codeSupport.onViewerDomReady('%s', '%s');", 
			input.getMarkupId(), language);
	response.render(OnLoadHeaderItem.forScript(script));
}
 
Example 18
Project: onedev   File: FieldListEditPanel.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new FieldListCssResourceReference()));
	validate();
	if (!getModelObject().equals(getConvertedInput())) {
		String script = String.format("onedev.server.form.markDirty($('#%s').closest('form'));", getMarkupId());
		response.render(OnDomReadyHeaderItem.forScript(script));
	}
}
 
Example 19
Project: onedev   File: BuildSpecEditPanel.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new BuildSpecResourceReference()));
	String selection = BuildSpecRendererProvider.getSelection(context.getPosition());
	
	String script = String.format("onedev.server.buildSpec.onDomReady(%s, undefined, %s);", 
			selection!=null? "'" + JavaScriptEscape.escapeJavaScript(selection) + "'": "undefined", 
			deleteBehavior.getCallbackFunction(CallbackParameter.explicit("index")));
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 20
Project: onedev   File: MarkdownEditor.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new MarkdownResourceReference()));
	
	String encodedAttachmentSupport;
	if (getAttachmentSupport() != null) {
		encodedAttachmentSupport = Base64.encodeBase64String(SerializationUtils.serialize(getAttachmentSupport()));
		encodedAttachmentSupport = StringUtils.deleteWhitespace(encodedAttachmentSupport);
		encodedAttachmentSupport = StringEscapeUtils.escapeEcmaScript(encodedAttachmentSupport);
		encodedAttachmentSupport = "'" + encodedAttachmentSupport + "'";
	} else {
		encodedAttachmentSupport = "undefined";
	}
	String callback = ajaxBehavior.getCallbackFunction(explicit("action"), explicit("param1"), explicit("param2"), 
			explicit("param3")).toString();
	
	String autosaveKey = getAutosaveKey();
	if (autosaveKey != null)
		autosaveKey = "'" + JavaScriptEscape.escapeJavaScript(autosaveKey) + "'";
	else
		autosaveKey = "undefined";
	
	String script = String.format("onedev.server.markdown.onDomReady('%s', %s, %d, %s, %d, %b, %b, '%s', %s);", 
			container.getMarkupId(), 
			callback, 
			ATWHO_LIMIT, 
			encodedAttachmentSupport, 
			getAttachmentSupport()!=null?getAttachmentSupport().getAttachmentMaxSize():0,
			getUserMentionSupport() != null,
			getReferenceSupport() != null, 
			JavaScriptEscape.escapeJavaScript(ProjectNameValidator.PATTERN.pattern()),
			autosaveKey);
	response.render(OnDomReadyHeaderItem.forScript(script));
	
	script = String.format("onedev.server.markdown.onWindowLoad('%s');", container.getMarkupId());
	response.render(OnLoadHeaderItem.forScript(script));
}
 
Example 21
Project: onedev   File: SourceFormComponent.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	String autosaveKey = JavaScriptEscape.escapeJavaScript(getContext().getAutosaveKey());
	PlanarRange mark = SourceRendererProvider.getRange(getContext().getPosition());
	String jsonOfMark;
	if (mark != null) {
		try {
			jsonOfMark = OneDev.getInstance(ObjectMapper.class).writeValueAsString(mark);
		} catch (JsonProcessingException e) {
			throw new RuntimeException(e);
		}
	} else {
		jsonOfMark = "undefined";
	}
	String script = String.format("onedev.server.sourceEdit.onDomReady("
			+ "'%s', '%s', %s, '%s', %s, '%s', %b, '%s');", 
			getMarkupId(), 
			JavaScriptEscape.escapeJavaScript(getContext().getNewPath()), 
			jsonOfMark,
			getSourceFormat().getIndentType(), 
			getSourceFormat().getTabSize(), 
			getSourceFormat().getLineWrapMode(), 
			getContext().getMode() == Mode.EDIT || getContext().getInitialNewPath() != null, 
			autosaveKey);
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 22
Project: onedev   File: TestPage.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new TestResourceReference()));
	response.render(JavaScriptHeaderItem.forReference(new ScrollIntoViewResourceReference()));
	response.render(OnDomReadyHeaderItem.forScript("onedev.server.test.onDomReady();"));
}
 
Example 23
Project: onedev   File: BoardCardPanel.java    License: MIT License 5 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	
	CharSequence callback = ajaxBehavior.getCallbackFunction(CallbackParameter.explicit("issue"));
	String script = String.format("onedev.server.issueBoards.onCardDomReady('%s', %s);", 
			getMarkupId(), SecurityUtils.getUser()!=null?callback:"undefined");
	response.render(OnDomReadyHeaderItem.forScript(script));
}
 
Example 24
Project: onedev   File: RevisionComparePage.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new RevisionCompareResourceReference()));
	response.render(OnDomReadyHeaderItem.forScript("onedev.server.revisionCompare.onDomReady();"));
}
 
Example 25
Project: onedev   File: BuildSingleChoice.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	
	response.render(JavaScriptHeaderItem.forReference(new BuildChoiceResourceReference()));
}
 
Example 26
Project: onedev   File: ProjectIssuesPage.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new ProjectIssuesCssResourceReference()));
}
 
Example 27
Project: onedev   File: ReviewListPanel.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new ReviewCssResourceReference()));
}
 
Example 28
Project: onedev   File: PullRequestChangesPage.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new PullRequestChangesResourceReference()));
}
 
Example 29
Project: inception   File: PdfAnnotationEditor.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse aResponse)
{
    super.renderHead(aResponse);
}
 
Example 30
Project: onedev   File: NoCommitsPanel.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new NoCommitsCssResourceReference()));
}
 
Example 31
Project: onedev   File: NewPullRequestPage.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new NewPullRequestResourceReference()));
	response.render(OnDomReadyHeaderItem.forScript("onedev.server.newPullRequest.onDomReady();"));
}
 
Example 32
Project: onedev   File: MarkdownReportPage.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new MarkdownReportCssResourceReference()));
}
 
Example 33
Project: onedev   File: Wizard.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new WizardResourceReference()));
}
 
Example 34
Project: onedev   File: HtmlReportPage.java    License: MIT License 4 votes vote down vote up
@Override
protected void onInitialize() {
	super.onInitialize();

	String startPage = LockUtils.read(getBuild().getReportLockKey(JobHtmlReport.DIR), new Callable<String>() {

		@Override
		public String call() throws Exception {
			File startPageFile = new File(getBuild().getReportDir(JobHtmlReport.DIR), 
					reportName + "/" + JobHtmlReport.START_PAGE);
			if (startPageFile.exists())
				return FileUtils.readFileToString(startPageFile, StandardCharsets.UTF_8);
			else
				return null;
		}
		
	});
	
	if (startPage != null) {
		PageParameters params = HtmlReportDownloadResource.paramsOf(getProject(), getBuild().getNumber(), 
				reportName, startPage);
		CharSequence startPageUrl = RequestCycle.get().urlFor(new HtmlReportDownloadResourceReference(), params);
		add(new WebMarkupContainer("htmlReport") {
			
			@Override
			public void renderHead(IHeaderResponse response) {
				super.renderHead(response);
				response.render(JavaScriptHeaderItem.forReference(new HtmlReportResourceReference()));
				String script = String.format("onedev.server.htmlReport.onWindowLoad('%s');", getMarkupId(true));
				response.render(OnLoadHeaderItem.forScript(script));
			}

		}.add(AttributeAppender.append("src", startPageUrl.toString())));
	} else {
		add(new Label("htmlReport", "No html report published") {

			@Override
			protected void onComponentTag(ComponentTag tag) {
				super.onComponentTag(tag);
				tag.setName("div");
			}
			
		}.add(AttributeAppender.append("class", "alert alert-warning")));
	}
}
 
Example 35
Project: onedev   File: PullRequestJobsPanel.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new PullRequestJobsCssResourceReference()));
}
 
Example 36
Project: onedev   File: AvatarEditPanel.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new AvatarEditCssResourceReference()));
}
 
Example 37
Project: onedev   File: BlameMessageBehavior.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(Component component, IHeaderResponse response) {
	super.renderHead(component, response);
	response.render(JavaScriptHeaderItem.forReference(new BlameMessageResourceReference()));
}
 
Example 38
Project: onedev   File: ReferencedFromPullRequestPanel.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(CssHeaderItem.forReference(new TitleAndStatusCssResourceReference()));
}
 
Example 39
Project: onedev   File: CommitDetailPage.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new CommitDetailResourceReference()));
	response.render(OnDomReadyHeaderItem.forScript("onedev.server.commitDetail.onDomReady();"));
}
 
Example 40
Project: onedev   File: BranchSelector.java    License: MIT License 4 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new BranchSelectorResourceReference()));
}