@Override
	public void onInitialize() {
		super.onInitialize();
		// unpack model
		final Map<String, Object> modelData = this.model.getObject();
		final String eid = (String) modelData.get("eid");
		final String firstName = (String) modelData.get("firstName");
		final String lastName = (String) modelData.get("lastName");
		final String displayName = (String) modelData.get("displayName");
		final GbStudentNameSortOrder nameSortOrder = (GbStudentNameSortOrder) modelData.get("nameSortOrder");
		// link
		final GbAjaxLink<String> link = new GbAjaxLink<String>("link") {
			private static final long serialVersionUID = 1L;
			@Override
			public void onClick(final AjaxRequestTarget target) {
				final GradebookPage gradebookPage = (GradebookPage) getPage();
				final GbModalWindow window = gradebookPage.getStudentGradeSummaryWindow();
				final GradebookUiSettings settings = gradebookPage.getUiSettings();
				final Map<String, Object> windowModel = new HashMap<>(StudentNameCellPanel.this.model.getObject());
				windowModel.put("groupedByCategoryByDefault", settings.isCategoriesEnabled());
				final Component content = new StudentGradeSummaryPanel(window.getContentId(), Model.ofMap(windowModel), window);
				if (window.isShown() && window.isVisible()) {
					window.replace(content);
					content.setVisible(true);
					target.add(content);
				} else {
					window.setContent(content);
					window.setComponentToReturnFocusTo(this);
					window.show(target);
				}
				content.setOutputMarkupId(true);
				final String modalTitle = (new StringResourceModel("heading.studentsummary",
						null, new Object[] { displayName, eid })).getString();
				target.appendJavaScript(String.format(
						"new GradebookGradeSummary($(\"#%s\"), false, \"%s\");",
						content.getMarkupId(), modalTitle));
			}
		};
		link.setOutputMarkupId(true);
		// name label
		link.add(new Label("name", getFormattedStudentName(firstName, lastName, nameSortOrder)));
		// eid label, configurable
		link.add(new Label("eid", eid) {
			private static final long serialVersionUID = 1L;
			@Override
			public boolean isVisible() {
				return true; // TODO use config, will need to be passed in the model map
			}
		});
		add(link);
	}
@Override
	public void onInitialize() {
		super.onInitialize();
	
		final Map<String, Object> modelData = this.model.getObject();
		final String eid = (String) modelData.get("eid");
		final String firstName = (String) modelData.get("firstName");
		final String lastName = (String) modelData.get("lastName");
		final String displayName = (String) modelData.get("displayName");
		final GbStudentNameSortOrder nameSortOrder = (GbStudentNameSortOrder) modelData.get("nameSortOrder");
	
		final GbAjaxLink<String> link = new GbAjaxLink<String>("link") {
			private static final long serialVersionUID = 1L;
			@Override
			public void onClick(final AjaxRequestTarget target) {
				final GradebookPage gradebookPage = (GradebookPage) getPage();
				final GbModalWindow window = gradebookPage.getStudentGradeSummaryWindow();
				final GradebookUiSettings settings = gradebookPage.getUiSettings();
				final Map<String, Object> windowModel = new HashMap<>(StudentNameCellPanel.this.model.getObject());
				windowModel.put("groupedByCategoryByDefault", settings.isCategoriesEnabled());
				final Component content = new StudentGradeSummaryPanel(window.getContentId(), Model.ofMap(windowModel), window);
				if (window.isShown() && window.isVisible()) {
					window.replace(content);
					content.setVisible(true);
					target.add(content);
				} else {
					window.setContent(content);
					window.setComponentToReturnFocusTo(this);
					window.show(target);
				}
				content.setOutputMarkupId(true);
				final String modalTitle = (new StringResourceModel("heading.studentsummary",
						null, new Object[] { displayName, eid })).getString();
				target.appendJavaScript(String.format(
						"new GradebookGradeSummary($(\"#%s\"), false, \"%s\");",
						content.getMarkupId(), modalTitle));
			}
		};
		link.setOutputMarkupId(true);
	
		link.add(new Label("name", getFormattedStudentName(firstName, lastName, nameSortOrder)));
	
		link.add(new Label("eid", eid) {
			private static final long serialVersionUID = 1L;
			@Override
			public boolean isVisible() {
				return true;
			}
		});
		add(link);
	}
@override public void oninitialize() { super.oninitialize(); final map<string, object> modeldata = this.model.getobject(); final string eid = (string) modeldata.get("eid"); final string firstname = (string) modeldata.get("firstname"); final string lastname = (string) modeldata.get("lastname"); final string displayname = (string) modeldata.get("displayname"); final gbstudentnamesortorder namesortorder = (gbstudentnamesortorder) modeldata.get("namesortorder"); final gbajaxlink<string> link = new gbajaxlink<string>("link") { private static final long serialversionuid = 1l; @override public void onclick(final ajaxrequesttarget target) { final gradebookpage gradebookpage = (gradebookpage) getpage(); final gbmodalwindow window = gradebookpage.getstudentgradesummarywindow(); final gradebookuisettings settings = gradebookpage.getuisettings(); final map<string, object> windowmodel = new hashmap<>(studentnamecellpanel.this.model.getobject()); windowmodel.put("groupedbycategorybydefault", settings.iscategoriesenabled()); final component content = new studentgradesummarypanel(window.getcontentid(), model.ofmap(windowmodel), window); if (window.isshown() && window.isvisible()) { window.replace(content); content.setvisible(true); target.add(content); } else { window.setcontent(content); window.setcomponenttoreturnfocusto(this); window.show(target); } content.setoutputmarkupid(true); final string modaltitle = (new stringresourcemodel("heading.studentsummary", null, new object[] { displayname, eid })).getstring(); target.appendjavascript(string.format( "new gradebookgradesummary($(\"#%s\"), false, \"%s\");", content.getmarkupid(), modaltitle)); } }; link.setoutputmarkupid(true); link.add(new label("name", getformattedstudentname(firstname, lastname, namesortorder))); link.add(new label("eid", eid) { private static final long serialversionuid = 1l; @override public boolean isvisible() { return true; } }); add(link); }