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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:11:32+00:00 2026-05-25T00:11:32+00:00

I am trying to add a dynamic onclick event using rich:findComponent as: <font class=topFirstTablehdCategory2

  • 0

I am trying to add a dynamic onclick event using rich:findComponent as:

<font class="topFirstTablehdCategory2" style="font-size: 12px; cursor: pointer;" onclick="#{rich:findComponent('benchmarkEndDate').value = channelPerformanceController.resetDate}">
    RESET
</font>

But I am getting

com.sun.el.parser.ParseException: Encountered "=" at line 1, column 48.

What I am willing to do, is to set string value to a rich:calender whose id is benchmarkEndDate supplied from the field resetDate of ChannelPerformanceController class.

I also write a javascript method in the jsp page:

function setResetDate(id, date) {
    #{rich:findComponent('benchmarkEndDate').value} = date;
}

is not working. It is called as: onclick="setResetDate('benchmarkEndDate', '#{channelPerformanceController.resetDate}')"

It is rendering in browser as:

function setResetDate(id, date) {
        2011-03-24 00:00:00.0 = date;
}

This method:

function setResetDate(id, date) {
        document.getElementById(#{rich:clientId(id)}) = date;
}

is change into :

function setResetDate(id, date) {
        document.getElementById() = date;
}

What I am doing wrong? How can I achieve this?

  • 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-25T00:11:33+00:00Added an answer on May 25, 2026 at 12:11 am
    • JavaScript is executed by the client.
    • Expression Language expressions are evaluated on the server before the markup is sent to the browser.

    #{foo = bar} is not a valid EL expression. = is not a valid operator in EL. EL does not have an assignment operator. The only way to assign values via EL is using a value binding in attributes that support them (almost exclusively via JSF input controls).


    If this expression is evaluated:

    #{rich:clientId(id)}
    

    This expression will search the request, session and application scopes looking using getAttribute("id"), using managed bean mechanisms to create such a bean if it is defined with this id. When this is evaluated and returns null, nothing will be rendered.


    If this expression is not evaluated:

    #{rich:clientId(id)}
    

    Then it is being placed in template text (probably in JSP 2.0/J2EE 1.4.)

    There are two types of EL expression:

    • #{foo} – deferred expression: only evaluated in attributes that allow them
    • ${foo} – immediate expression: allowed in template text

    Beginning with JSP 2.1, it is a translation error to have a deferred expression in template text. From the JSP 2.1 specification:

    When used in template text in a JSP page, the #{ character sequence
    triggers a translation error, unless specifically allowed through a
    configuration setup. This is because the #{} syntax is associated
    exclusively with deferred-evaluation in JSP
    2.1 and does not make sense in the context of template text (only
    immediate evaluation using the ${expr} syntax makes sense in
    template text).

    In a tag file, #{expr} in template text is handled according to the
    tag file’s JSP version: If the tag file’s JSP version is 2.0 or less,
    #{expr} in template text will not cause any error. If the tag file’s
    JSP version is equal to or greater than 2.1, #{expr} in template
    text must cause an error, unless it has been escaped or the tag file
    contains a deferredSyntaxAllowedAsLiteral tag directive attribute
    set to TRUE.

    Generally, #{foo} expressions must be in JSF control attributes only (for JSP views).


    If you want to change a server-side value, use a form submit and action binding. This can be done via AJAX in RichFaces.

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

Sidebar

Related Questions

I'm trying to add details to a database by using ajax and table dynamic
I'm trying to add dynamic content to my mvc application. I'm using Steven Sanderson
I'm trying add a tab to my web page that looks like this: Using
Trying to add an onclick handler to my tabs, and can't seem to get
I'm a wordpress newbie trying to add dynamic posts and pages through get requests.
I'm trying to use jQuery to add dynamic Add/Remove row function, but I meet
Currently I am trying to figure out how I can add dynamic query string
I am trying to add a dynamic Meta attribute to all of my Django
I'm trying to add the functionality to this dynamic order form that will auto
I'm using both JSF 2.0 and jQuery/javaScript, where needed. I'm trying to add and

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.