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 7176079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:26:08+00:00 2026-05-28T16:26:08+00:00

Hello Everyone I would like to open a rich:popupPanel inside a conditional expression, actually

  • 0

Hello Everyone I would like to open a rich:popupPanel inside a conditional expression, actually what I’m trying is something like this:

onclick="#{searchBackingBean.showLoginPanel==true ? #{rich:component('loginPopup')}.show();':''}"

However I’m getting errors related to EL, how should I write this correctly?.
Thanks a lot.

  • 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-05-28T16:26:09+00:00Added an answer on May 28, 2026 at 4:26 pm

    You may not nest EL expressions. I suggest to rewrite the expression as follows so that the condition is delegated to JavaScript:

    onclick="if (#{searchBackingBean.showLoginPanel}) #{rich:component('loginPopup')}.show();"
    

    (please note that I removed the superfluous == true comparison because this makes no sense as the method returns/prints a boolean value already)

    Note that this only works in <rich:xxx> and <a4j:xxx> components as they have enhanced the on* attributes to re-evaluate the EL expression on postbacks. The standard JSF <h:xxx> components doesn’t do that. You’d need to workaround it with the rendered attribute:

    <h:commandButton>
        <f:ajax render="script" />
    </h:commandButton>
    <h:panelGroup id="script">
        <h:panelGroup rendered="#{searchBackingBean.showLoginPanel}">
            <script>#{rich:component('loginPopup')}.show();</script>
        </h:panelGroup>
    </h:panelGroup>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I am trying to resize an image of 700kb with imagecreatefromjpeg. This
Hello everyone and thank you for your time. I would just like to say
hello everyone im trying to create this tweak that copies a file from one
Hello everyone I'm trying to work with jboss messaging, does anyone knows the default
Hello everyone I'm trying to improve my Java skills by solving some problems from
Hello everyone i currently have this: import feedparser d = feedparser.parse('http://store.steampowered.com/feeds/news.xml') for i in
I solved this question my own. The filename was wrong lolz. Hello everyone! I'm
Hello there everyone, I've been trying to figure out how to create a function
Hello everyone I'm trying to convert a PKCS#8 private key that I generate in
Hello everyone I'm currently having 2 issues with the code below: Upon return of

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.