public boolean process() { ++submitCnt; try { return super.process(); } finally { --submitCnt; } } };
public boolean process() { // set redirect to true for a stateless form. setRedirect(true); return super.process(); }
@Override public boolean process() { // set redirect to true for a stateless form. setRedirect(true); return super.process(); }
@Override public void process(IFormSubmitter submittingComponent) { // clear feedbacks in form's data prior processing clearFeedbackMessages(); super.process(submittingComponent); }
@Override public void process(IFormSubmitter submittingComponent) { SecurityUtils.getSubject().runAs(getUser().getPrincipals()); try { super.process(submittingComponent); } finally { SecurityUtils.getSubject().releaseRunAs(); } }
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { form.process(this); WMTSStoreInfo info = (WMTSStoreInfo) form.getModelObject(); try { onSave(info, target); } catch (IllegalArgumentException e) { form.error(e.getMessage()); target.add(form); } } };
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { form.process(this); WMSStoreInfo info = (WMSStoreInfo) form.getModelObject(); try { onSave(info, target); } catch (IllegalArgumentException e) { form.error(e.getMessage()); target.add(form); } } };
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { form.process(); WMSStoreInfo info = (WMSStoreInfo) form.getModelObject(); try { onSave(info, target); } catch (IllegalArgumentException e) { form.error(e.getMessage()); target.addComponent(form); } } };
@Override public void process(IFormSubmitter submittingComponent) { /* * Manually clear old feedback generated by CMS validation prior processing because * {@link org.hippoecm.frontend.plugins.cms.root.RootPlugin#RootPlugin(IPluginContext, IPluginConfig)} configures * to keep all feedback messages after each request cycle. */ if (hasFeedbackMessage()) { getFeedbackMessages().clear(); } super.process(submittingComponent); } }
@Override public void onSubmit(final AjaxRequestTarget target, Form form) { // perform manual processing otherwise the component contents won't be updated form.process(); ResourceInfo resource = (ResourceInfo) BasicResourceConfig.this.getDefaultModelObject(); try { CatalogBuilder cb = new CatalogBuilder(GeoServerApplication.get().getCatalog()); ReferencedEnvelope bounds = cb.getNativeBounds(resource); resource.setNativeBoundingBox(bounds); nativeBBox.setModelObject(bounds); } catch(IOException e) { LOGGER.log(Level.SEVERE, "Error computing the native BBOX", e); error("Error computing the native BBOX:" + e.getMessage()); } target.addComponent(nativeBBox); }
@Override public void onSubmit(final AjaxRequestTarget target, Form form) { // perform manual processing otherwise the component contents won't be updated form.process(null); ResourceInfo resource = (ResourceInfo) BasicResourceConfig.this.getDefaultModelObject(); try { CatalogBuilder cb = new CatalogBuilder(GeoServerApplication.get().getCatalog()); ReferencedEnvelope bounds = cb.getNativeBounds(resource); resource.setNativeBoundingBox(bounds); nativeBBox.setModelObject(bounds); } catch (IOException e) { LOGGER.log(Level.SEVERE, "Error computing the native BBOX", e); error("Error computing the native BBOX:" + e.getMessage()); } target.add(nativeBBox); }
super.process(submittingComponent);
super.process(submittingComponent);
@Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { // perform manual processing of the required fields form.process(null); form.visitFormComponents(new FeedbackMessageCleaner<>(FeedbackMessage.UNDEFINED)); ReferencedEnvelope nativeBounds = (ReferencedEnvelope) nativeBBox.getModelObject(); try { // if the native bounds are not around compute them if (nativeBounds == null) { ResourceInfo resource = (ResourceInfo) BasicResourceConfig.this.getDefaultModelObject(); CatalogBuilder cb = new CatalogBuilder(GeoServerApplication.get().getCatalog()); nativeBounds = cb.getNativeBounds(resource); resource.setNativeBoundingBox(nativeBounds); nativeBBox.setModelObject(nativeBounds); target.add(nativeBBox); } CatalogBuilder cb = new CatalogBuilder(GeoServerApplication.get().getCatalog()); latLonPanel.setModelObject( cb.getLatLonBounds(nativeBounds, declaredCRS.getCRS())); } catch (IOException e) { LOGGER.log(Level.SEVERE, "Error computing the geographic BBOX", e); error("Error computing the geographic bounds:" + e.getMessage()); } target.add(latLonPanel); }
formToProcess.process(submitter);
formToProcess.process(submitter);
/** * DO NOT OVERRIDE UNLESS A VERY GOOD REASON */ @Override public void onEvent(IEvent<?> event) { if (event.getPayload() instanceof DialogEvent) { final DialogEvent payload = (DialogEvent) event.getPayload(); final Form<?> form = this.getForm(payload.getButton()); if (form != null) { form.process(new DialogFormSubmitter(payload.getTarget())); if (!form.hasError()) { this.onClick(payload); //fires onClick (& closes the dialog by default) } } else { this.onClick(payload); //fires onClick (& closes the dialog by default) } } else if (event.getPayload() instanceof AbstractDialog.CloseEvent) { AjaxRequestTarget target = ((AbstractDialog.CloseEvent) event.getPayload()).getTarget(); this.onClose(target, null); } }
formToProcess.process(submittingComponent);
if (formToProcess.process())