List of usage examples for org.apache.wicket Component setOutputMarkupId
public final Component setOutputMarkupId(final boolean output)
From source file:au.org.theark.core.web.behavior.ArkDefaultFormFocusBehavior.java
License:Open Source License
public void bind(Component component) { this.component = component; component.setOutputMarkupId(true); }
From source file:au.org.theark.core.web.form.ArkFormVisitor.java
License:Open Source License
public void component(final Component component, final IVisit<Void> visit) { if (!visited.contains(component)) { visited.add(component);/*from w w w. ja va 2 s.c o m*/ if (component instanceof FormComponent) { // Force id's in HTML to allow for target.focusCompont to focus on fieds in error component.setOutputMarkupId(true); // Add a "*" after the required fields component.add(new ArkRequiredFieldHintBehavior()); } } }
From source file:au.org.theark.study.web.component.contact.ContactContainerPanel.java
License:Open Source License
/** * Switching the loaded panel according to the button click. * @param target//from ww w.j a v a2s . com * @param type */ private void switchBetweenPanels(AjaxRequestTarget target, String type) { Component addressDetailPanelComp = arkCrudContainerVO.getDetailPanelContainer() .get(au.org.theark.study.web.Constants.ADDRESS_DETAIL_PANEL); addressDetailPanelComp.setOutputMarkupId(true); Component phoneDetailPanelComp = arkCrudContainerVO.getDetailPanelContainer() .get(au.org.theark.study.web.Constants.PHONE_DETAIL_PANEL); phoneDetailPanelComp.setOutputMarkupId(true); arkCrudContainerVO.getDetailPanelContainer().setVisible(true); arkCrudContainerVO.getDetailPanelContainer().setEnabled(true); arkCrudContainerVO.getDetailPanelFormContainer().setVisible(true); arkCrudContainerVO.getDetailPanelFormContainer().setEnabled(true); if (au.org.theark.study.web.Constants.PHONE_DETAIL_PANEL.equals(type)) { phoneDetailPanelComp.setVisible(true); addressDetailPanelComp.setVisible(false); } else if (au.org.theark.study.web.Constants.ADDRESS_DETAIL_PANEL.equals(type)) { phoneDetailPanelComp.setVisible(false); addressDetailPanelComp.setVisible(true); } arkCrudContainerVO.getSearchResultPanelContainer().setVisible(false); arkCrudContainerVO.getEditButtonContainer().setVisible(true); arkCrudContainerVO.getViewButtonContainer().setVisible(false); arkCrudContainerVO.getSearchPanelContainer().setVisible(false); target.add(arkCrudContainerVO.getDetailPanelContainer()); target.add(arkCrudContainerVO.getDetailPanelFormContainer()); target.add(addressDetailPanelComp); target.add(phoneDetailPanelComp); target.add(arkCrudContainerVO.getSearchResultPanelContainer()); target.add(arkCrudContainerVO.getSearchPanelContainer()); target.add(arkCrudContainerVO.getViewButtonContainer()); target.add(arkCrudContainerVO.getEditButtonContainer()); }
From source file:br.com.digilabs.wicket.component.meiomask.MeioMaskBehavior.java
License:Apache License
@Override public void onRendered(Component component) { super.onRendered(component); component.setOutputMarkupId(true); Response response = component.getResponse(); response.write(JavascriptUtils.SCRIPT_OPEN_TAG); response.write("$('"); response.write(component.getMarkupId()); response.write("').meiomask($('"); response.write(component.getMarkupId()); response.write("').get('data-meiomask'), JSON.decode($('"); response.write(component.getMarkupId()); response.write("').get('data-meiomask-options')));"); response.write(JavascriptUtils.SCRIPT_CLOSE_TAG); }
From source file:brix.tinymce.TinyMceEnabler.java
License:Apache License
@Override public void bind(Component component) { if (!(component instanceof TextArea)) { throw new IllegalStateException( getClass().getName() + " can only be added to " + TextArea.class.getName()); }// ww w . j a va 2 s. c o m component.setOutputMarkupId(true); }
From source file:ca.travelagency.components.decorators.FieldDecorator.java
License:Apache License
@Override public void bind(Component component) { component.setOutputMarkupId(true); }
From source file:com.axway.ats.testexplorer.pages.testcase.statistics.charts.ChartsPanel.java
License:Apache License
public ChartsPanel(String id, PageParameters parameters) { super(id);//from w ww . j a v a2 s . c o m // get all parameters from the URL parsePageParameters(parameters); systemStatisticsPanel = new DataPanel(this, "System statistics", "system"); userStatisticsPanel = new DataPanel(this, "User activities", "user"); actionStatisticsPanel = new DataPanel(this, "Action responses", "checkpoint"); loadStatisticDescriptions(this.timeOffSet, false); calculateTestcaseStarttimeDeltas(); chartsPanelContent = new Form("chartsPanelContent"); chartsPanelContent.setOutputMarkupId(true); // load the statistics data from the database getSystemStatistics(); getUserStatistics(); getActionStatistics(); ListView chartListView = getChartListViewComponent(); chartListView.setOutputMarkupId(true); Component detailedStatisticDescriptions = getStatisticsDetailsComponent(); detailedStatisticDescriptions.setOutputMarkupId(true); chartsPanelContent.add(chartListView); chartsPanelContent.add(detailedStatisticDescriptions); add(chartsPanelContent.setOutputMarkupId(true)); }
From source file:com.comcast.cdn.traffic_control.traffic_monitor.wicket.behaviors.MultiUpdatingTimerBehavior.java
License:Apache License
@Override public void bind(final Component hostComponent) { Args.notNull(hostComponent, "hostComponent"); if (component == null) { component = hostComponent;//from w ww . ja va 2 s. co m } hostComponent.setOutputMarkupId(true); components.add(hostComponent); }
From source file:com.comcast.cdn.traffic_control.traffic_monitor.wicket.components.GraphPanel.java
License:Apache License
public GraphPanel(final String string, final Model<Integer> size) { super(string); final Component graph = new Label("graph_canvas", ""); this.add(graph); graphId = graph.setOutputMarkupId(true).getMarkupId(); tickCount = 180;//from ww w.ja va 2s. c om // this.min = min; this.size = size; }
From source file:com.doculibre.constellio.wicket.behaviors.SetFocusBehavior.java
License:Open Source License
/** * Forces the focusComponent to print its markup id and adds a Javascript * function call to the <head> tag that will set the focus on it. * //from www .java 2 s . com * @param focusComponent * @param response */ private void setFocus(Component focusComponent, IHeaderResponse response) { // Forces to print the id attribute. focusComponent.setOutputMarkupId(true); // Sets the id attribute if it does not already exist. String focusFormComponentId = focusComponent.getMarkupId(true); // Function call added to the <head> tag. response.renderOnLoadJavascript("document.getElementById('" + focusFormComponentId + "').focus()"); }