Java Code Examples for org.apache.wicket.markup.html.panel.Panel#setOutputMarkupId()
The following examples show how to use
org.apache.wicket.markup.html.panel.Panel#setOutputMarkupId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LearningCurveChartPanel.java From inception with Apache License 2.0 | 6 votes |
public LearningCurveChartPanel(String aId, IModel<AnnotatorState> aModel) { super(aId, aModel); model = aModel; setOutputMarkupId(true); //initially the chart is empty. passing empty model chartPanel = new ChartPanel(MID_CHART_CONTAINER, LoadableDetachableModel.of(this::renderChart)); // chartPanel.add(visibleWhen(() -> chartPanel.getModelObject() != null)); chartPanel.setOutputMarkupId(true); add(chartPanel); final Panel dropDownPanel = new MetricSelectDropDownPanel(MID_DROPDOWN_PANEL); dropDownPanel.setOutputMarkupId(true); add(dropDownPanel); selectedMetric = RecommenderEvaluationScoreMetricEnum.Accuracy; }
Example 2
Source File: StackPanel.java From nextreports-server with Apache License 2.0 | 6 votes |
public void forwardWorkspace(Panel panel, AjaxRequestTarget target) { if (stack.size() > STACK_MAX_SIZE) { // clear all stack.pop(); while (stack.size() > 1) { stack.pop(); } } panel.setOutputMarkupId(true); workContainer.replace(panel); stack.push(panel); if (target != null) { target.add(workContainer); } }
Example 3
Source File: HomePage.java From nextreports-server with Apache License 2.0 | 6 votes |
private void onSlidebarClick(AjaxRequestTarget target, String sectionId) { String oldSectionId = sectionManager.getSelectedSectionId(); Section section = sectionManager.getSection(sectionId); sectionManager.setSelectedSectionId(sectionId); Panel newPanel = section.createView("sectionPanel"); newPanel.setOutputMarkupId(true); sectionPanel.replaceWith(newPanel); target.add(newPanel); sectionPanel = newPanel; // close slidebar target.appendJavaScript("closeSlidebar();"); // refresh active class ListView<String> view = (ListView<String>) get("section"); Iterator<Component> it= view.iterator(); while (it.hasNext()) { ListItem<String> item = (ListItem<String>) it.next(); String itemId = item.getModelObject(); if (itemId.equals(sectionId) || itemId.equals(oldSectionId)) { target.add(item); } } }
Example 4
Source File: ViewFriends.java From sakai with Educational Community License v2.0 | 5 votes |
public ViewFriends(final String userUuid) { log.debug("ViewFriends()"); //get user viewing this page final String currentUserUuid = sakaiProxy.getCurrentUserId(); //check person viewing this page (currentuserId) is allowed to view userId's friends - unless admin boolean isFriendsListVisible = sakaiProxy.isSuperUser() || privacyLogic.isActionAllowed(userUuid, currentUserUuid, PrivacyType.PRIVACY_OPTION_MYFRIENDS); if (isFriendsListVisible) { //show confirmed friends panel for the given user Panel confirmedFriends = new ConfirmedFriends("confirmedFriends", userUuid); confirmedFriends.setOutputMarkupId(true); add(confirmedFriends); //post view event sakaiProxy.postEvent(ProfileConstants.EVENT_FRIENDS_VIEW_OTHER, "/profile/"+userUuid, false); } else { log.debug("User: {} is not allowed to view the friends list for: {} ", currentUserUuid, userUuid); String displayName = sakaiProxy.getUserDisplayName(userUuid); Label notPermitted = new Label("confirmedFriends" , new StringResourceModel("error.friend.view.disallowed", null, new Object[] {displayName})); add(notPermitted); } }
Example 5
Source File: MyMessages.java From sakai with Educational Community License v2.0 | 5 votes |
private void switchContentPanel(Panel replacement, AjaxRequestTarget target) { replacement.setOutputMarkupId(true); tabPanel.replaceWith(replacement); if(target != null) { target.add(replacement); //resize iframe target.appendJavaScript("setMainFrameHeight(window.name);"); } //must keep reference up to date tabPanel=replacement; }
Example 6
Source File: DynamicListItem.java From pm-wicket-utils with GNU Lesser General Public License v3.0 | 5 votes |
public void removeItem(AjaxRequestTarget target){ Panel panel = new EmptyPanel("container"); addOrReplace(panel); panel.setOutputMarkupId(true); panel.setVisible(false); target.add(panel); }
Example 7
Source File: SchemaTypeWizardBuilder.java From syncope with Apache License 2.0 | 5 votes |
public Details(final SchemaTO modelObject) { AjaxDropDownChoicePanel<SchemaType> kind = new AjaxDropDownChoicePanel<>("kind", getString("kind"), new Model<>()); kind.setChoices(List.of(SchemaType.values())); kind.setOutputMarkupId(true); kind.setModelObject(schemaType); kind.setEnabled(false); add(kind); Panel detailsPanel; switch (schemaType) { case DERIVED: detailsPanel = new DerSchemaDetails("details", (DerSchemaTO) modelObject); break; case VIRTUAL: detailsPanel = SyncopeWebApplication.get().getVirSchemaDetailsPanelProvider(). get("details", (VirSchemaTO) modelObject); break; case PLAIN: default: detailsPanel = new PlainSchemaDetails("details", (PlainSchemaTO) modelObject); } detailsPanel.setOutputMarkupId(true); add(detailsPanel); }
Example 8
Source File: ViewFriends.java From sakai with Educational Community License v2.0 | 5 votes |
public ViewFriends(final String userUuid) { log.debug("ViewFriends()"); //get user viewing this page final String currentUserUuid = sakaiProxy.getCurrentUserId(); //check person viewing this page (currentuserId) is allowed to view userId's friends - unless admin boolean isFriendsListVisible = sakaiProxy.isSuperUser() || privacyLogic.isActionAllowed(userUuid, currentUserUuid, PrivacyType.PRIVACY_OPTION_MYFRIENDS); if (isFriendsListVisible) { //show confirmed friends panel for the given user Panel confirmedFriends = new ConfirmedFriends("confirmedFriends", userUuid); confirmedFriends.setOutputMarkupId(true); add(confirmedFriends); //post view event sakaiProxy.postEvent(ProfileConstants.EVENT_FRIENDS_VIEW_OTHER, "/profile/"+userUuid, false); } else { log.debug("User: {} is not allowed to view the friends list for: {} ", currentUserUuid, userUuid); String displayName = sakaiProxy.getUserDisplayName(userUuid); Label notPermitted = new Label("confirmedFriends" , new StringResourceModel("error.friend.view.disallowed", null, new Object[] {displayName})); add(notPermitted); } }
Example 9
Source File: MyMessages.java From sakai with Educational Community License v2.0 | 5 votes |
private void switchContentPanel(Panel replacement, AjaxRequestTarget target) { replacement.setOutputMarkupId(true); tabPanel.replaceWith(replacement); if(target != null) { target.add(replacement); //resize iframe target.appendJavaScript("setMainFrameHeight(window.name);"); } //must keep reference up to date tabPanel=replacement; }
Example 10
Source File: DrawerManager.java From pm-wicket-utils with GNU Lesser General Public License v3.0 | 4 votes |
private void removeDrawer(MarkupContainer previous, AjaxRequestTarget target) { Panel panel = new EmptyPanel("next"); panel.setOutputMarkupId(true); previous.addOrReplace(panel); target.add(panel); }
Example 11
Source File: DynamicListItem.java From pm-wicket-utils with GNU Lesser General Public License v3.0 | 4 votes |
public void setContainer(Panel panel){ add(panel); panel.setOutputMarkupId(true); }