Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2745

Add info about SubmittingButton to RequestLogger

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.5, 6.0.0-beta1
    • None
    • None

    Description

      Most forms have cancel and submit. It would be very useful to see in the requestlog which one has been clicked.

      I tryed something like this but i got an IllegalStateException.

      Is there a chance to fix it?

      if (target instanceof IListenerInterfaceRequestTarget)
      {
      IListenerInterfaceRequestTarget listener = (IListenerInterfaceRequestTarget)target;
      sb.append("Interface[target:");
      sb.append(Classes.simpleName(listener.getTarget().getClass()));
      sb.append("(");
      sb.append(listener.getTarget().getPageRelativePath());
      sb.append("), page: ");
      sb.append(listener.getPage().getClass().getName());
      sb.append("(");
      sb.append(listener.getPage().getId());
      sb.append("), interface: ");
      sb.append(listener.getRequestListenerInterface().getName());
      sb.append(".");
      sb.append(listener.getRequestListenerInterface().getMethod().getName());
      sb.append("- via button ");
      if (listener.getTarget() instanceof Form<?>)

      { Form<?> form = (Form<?>) listener.getTarget(); sb.append(form.findSubmittingButton().getPageRelativePath()); }

      sb.append("]");
      }

      Attachments

        1. form_logging.patch
          7 kB
          Fridolin Jackstadt
        2. logger.zip
          11 kB
          Fridolin Jackstadt

        Activity

          People

            papegaaij Emond Papegaaij
            frido-lbm Fridolin Jackstadt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: