Multiselect in history pane

17 views
Skip to first unread message

Eddy Vanlerberghe

unread,
Sep 16, 2025, 5:10:00 AM (8 days ago) Sep 16
to ZAP Developer Group
I am working on an extension that needs to handle multiple selected messages in the histor pane. As a start I am modifying the simpleexample extension to test a couple of features. One thing that puzzles me is that when one HTTP message is selected, the rightclick popup menu shows an active entry for simpleexample, but when more than one is selected then the menu item is disabled.

As a quick hack, I added a setEnabled() method to RightClickMsgMenu to always call super.setEnabled(true), and added an ActionListener to the same object to call my code. This seems to work (for now) and I can access the selected HTTP messages.

However, I think that there is probably a good reason why Zap prevents calling an action method when multiple messages are selected? If so, is there a better way to handle this issue?

Regards,

Eddy.

thc202

unread,
Sep 16, 2025, 5:40:35 AM (8 days ago) Sep 16
to zaproxy...@googlegroups.com
Hi.

Call the constructor `PopupMenuItemHttpMessageContainer(String,
boolean)` with true if you want to select multiple messages.

https://javadoc.io/doc/org.zaproxy/zap/latest/org/zaproxy/zap/view/popup/PopupMenuItemHttpMessageContainer.html#%3Cinit%3E(java.lang.String,boolean)

Best regards.

Eddy Vanlerberghe

unread,
Sep 17, 2025, 12:40:49 AM (7 days ago) Sep 17
to ZAP Developer Group
Thanks.
Reply all
Reply to author
Forward
0 new messages