Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7860415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:16:30+00:00 2026-06-02T22:16:30+00:00

The middle click seems not to work for commandButton in JSF. At least not

  • 0

The middle click seems not to work for commandButton in JSF. At least not as expected – which would be opening the result of the action in a new tab. No submit/action is triggered.

The mouseup and mousedown events seem to work OK as the “animation” for a pressed button is working on middle click.

Middle clicks on commandLink work as expected.

How would I go about implementing a “normal” middle click behaviour for my commandButtons? How would i know on the mouseup/down events which button has been clicked?

Thank you.

I am using JSF 2 with Mojarra 2.1.7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:16:31+00:00Added an answer on June 2, 2026 at 10:16 pm

    First of all, there is no “normal” middleclick behaviour. This is unspecified in HTML and the default behaviour is browser dependent.

    As to the concrete question, you could catch it in the onclick event. On a middle click the event.which would return 2. You can then set the form’s target to _blank to let it submit to a new window.

     onclick="if (event.which == 2) form.target = '_blank'"
    

    Again, this will not work for some browsers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hoping not to re-invent the wheel -- I'm fairly new to Java, but
I'm looking for a way to stop the middle mouse click from causing the
I have a window which i would like to display above everything else. My
I have noticed when user clicks on a link with, say middle button, or
Middle-tier component will execute the data access routines in application. The component will call
I have a middle size query with 500.000 registers from an Oracle to an
I am in the middle of a production deployment. Unfortunately I am deploying to
I'm in the middle in studying some code and I encountered this word "Append"
I'm in the middle of sorting out a nested set of if/then begin/end pairs,
I'm in the middle of amending our data export process and was wondering whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.