[
https://issues.apache.org/jira/browse/WICKET-2745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fridolin Jackstadt updated WICKET-2745:
---------------------------------------
Attachment: form_logging.patch
this patch adds a log call to the form class.
i would propose to do it that way, because the logging calls from
AbstractRequestCycleProcessor are before the parsing of a multipart-request and
after the event processing.
If the form is removed from page during event processing and the name of the
submitting button lies in a multipart-request, i think it is not possible to
get information about the submitting component to log it.
Therefore i added a call to the logger from the form class to resolve this
issue.
The patch is for the 1.4.x branch
> Add info about SubmittingButton to RequestLogger
> ------------------------------------------------
>
> Key: WICKET-2745
> URL: https://issues.apache.org/jira/browse/WICKET-2745
> Project: Wicket
> Issue Type: Improvement
> Reporter: Fridolin Jackstadt
> Attachments: form_logging.patch, logger.zip
>
>
> 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("]");
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.