Package org.apache.wicket.markup.html.form

Examples of org.apache.wicket.markup.html.form.SubmitLink


        service.setRequired(true);
        method.setRequired(true);
    }

    SubmitLink saveLink() {
        return new SubmitLink("save") {
            @Override
            public void onSubmit() {
                onFormSubmit();
            }
        };
View Full Code Here


        form.add( nsUriTextField );
       
        CheckBox defaultChk = new CheckBox("default", new PropertyModel(this, "defaultWs"));
        form.add(defaultChk);
       
        SubmitLink submitLink = new SubmitLink( "submit", form );
        form.add( submitLink );
        form.setDefaultButton(submitLink);
       
        AjaxLink cancelLink = new AjaxLink( "cancel" ) {
            @Override
View Full Code Here

        formCatalogMode.add(new BookmarkablePageLink("cancel", GeoServerHomePage.class));
        formCatalogMode.add(saveLink());
    }

    SubmitLink saveLink() {
        return new SubmitLink("save") {
            @Override
            public void onSubmit() {
                onFormSubmit();
            }
View Full Code Here

                }
            }
        });
       
        form.add(lgEntryPanel = new LayerGroupEntryPanel( "layers", layerGroup ));
        form.add(new SubmitLink("save"){
            @Override
            public void onSubmit() {
                if(lgEntryPanel.getEntries().size() == 0) {
                    error((String) new ParamResourceModel("oneLayerMinimum", getPage()).getObject());
                    return;
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      request.getPostParameters().setParameterValue(pageRelativePath, "x");

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

    public TestPage()
    {
      Form<?> form = new Form<Void>("form");
      add(form);
      form.add(new TextField<String>("text", Model.of(""), String.class));
      form.add(new SubmitLink("submit"));
    }
View Full Code Here

    public TestPage(PageParameters pageParameters)
    {
      super(pageParameters);
      StatelessForm<Void> form = new StatelessForm<Void>("form");
      add(form);
      SubmitLink submitLink = new SubmitLink("submitLink");
      form.add(submitLink);
    }
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      getParametersForNextRequest().put(pageRelativePath, new String[] { "x" });
      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      getParametersForNextRequest().put(pageRelativePath, new String[] { "x" });

      Form<?> form = submitLink.getForm();
      form.visitFormComponents(new FormComponent.IVisitor()
      {
        public Object formComponent(IFormVisitorParticipant formComponent)
        {
          FormComponent<?> component = (FormComponent<?>)formComponent;
          if (getParametersForNextRequest().containsKey(component.getInputName()) == false)
          {
            getParametersForNextRequest().put(component.getInputName(),
              new String[] { component.getDefaultModelObjectAsString() });
          }

          return IVisitor.CONTINUE_TRAVERSAL;
        }
      });

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      getParametersForNextRequest().put(pageRelativePath, new String[] { "x" });
      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.SubmitLink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.