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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:43:51+00:00 2026-05-15T00:43:51+00:00

I can’t find any resources which can answer why I’m getting an error with

  • 0

I can’t find any resources which can answer why I’m getting an error with this:

oncomplete="#{MyBacking.oError ? #{rich:component('oErrorPanel')}.show() : return false;}"

in a richfaces a4j:commandButton. oError is referring to a method in my bean called isOError.

I’m getting the error

SEVERE: Servlet.service() for servlet Faces Servlet threw exception
org.apache.el.parser.ParseException: Encountered " "?" "? "" at line 1, column 30.
Was expecting one of:
    "}" ...
    "." ...
...

I want to say ‘if a method returns true, show modal panel A otherwise false’. Any help much appreciated.

EDIT
I’ve edited the code so it looks as follows:

                        <a4j:region id="Cont">
                        <a4j:form name="Form">
                            <h:panelGrid columns="2" style="padding: 2px;">

                                <h:outputText value="Old password&#160;" />
                                <h:inputSecret id="FormOldP" value="#{MyBacking.dbOldPwd}" />

                                <h:outputText value="New password&#160;" />
                                <h:inputSecret id="FormNewP0" value="#{MyBacking.dbNewPwd0}" />

                                <h:outputText value="Re-enter new password&#160;" />
                                <h:inputSecret id="FormNewP1" value="#{MyBacking.dbNewPwd1}" />

                                <h:panelGroup>
                                    <a4j:commandButton value="Submit"
                                        action="#{MyBacking.dbPwdChange}"
                                        data="#{MyBacking.oldDbPwdError}"
                                        oncomplete="if(data == true) { rich:component('OldErrorPanel').show(); }"
                                        image="/img/btnSubmit16.png"
                                        reRender="sysMsg,FormCont" />

                                    <a4j:commandButton value="Cancel"
                                        onclick="#{rich:component('MyPanel')}.hide();return false;" />
                                </h:panelGroup>
                            </h:panelGrid>
                        </a4j:form>
                    </a4j:region>

This compiles fine, but even if the boolean is set to true (when old passwd is not as the one stored) panel MyPanel remains on screen but the error modal OldErrorPanel doesn’t appear. The above looks ok to me though. This is the java:

public void setOldDbPwdError(boolean b) {
    logger.info("setting ldDbPwdErro to "+b);
    oldDbPwdError = b;
}

public boolean isOldDbPwdError() {
    logger.info("asking for isOldDbPwdError, returning" +oldDbPwdError);
    return oldDbPwdError;
}

Any further advice greatly appreciated.

  • 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-15T00:43:52+00:00Added an answer on May 15, 2026 at 12:43 am

    Your expression is invalid. You are opening another expression from within your expression (the #{})

    If it was valid it would look like :
    oncomplete=”#{MyBacking.oError ? rich:component(‘oErrorPanel’).show() : ”}”

    However I don’t think that this addresses your problem as you would have to reRender the button itself to get the value of oError (remember that JSF is all rendered to HTML/Javascript for the page)

    I would use the data attribute on the commandButton like this:

    <a:commandButton
      id="Bgo"
      action="#{MyBacking.someAction}"
      value="Submit"
      data="#{MyBacking.oError}"
      oncomplete="if(data == true) { rich:component('oErrorPanel').show(); }"/>
    

    Have a read of the Richfaces manual particularly around Javascript Interactions.

    UPDATE: in response to updated question.
    Try reRendering the value of what you use for the data somewhere else on your page to check the value. Eg:

    <h:outputText id="reRenderMe" value="#{MyBacking.oError}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can find why i get this error can someone help? package Android.data; public class
Can someone please tell me why this wont work? I am getting error preg_match_all():
Can someone help me with this scenario? *There is a button, which when tapped,
can any one tell me why im only getting flag inserted into my tables
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can anyone help me trying to find out why this doesn't work. The brushes
Can this be done in any better way or must i type object.event =
Can any one tell, how to get the result of LINQ query contains group
Can anyone explain to me why this program: for(float i = -1; i <
Can I run this in a Windows command prompt like I can run it

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.