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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:49:29+00:00 2026-06-08T21:49:29+00:00

I am using RichFaces 4. I am using flot as a JQuery Charting library

  • 0

I am using RichFaces 4. I am using flot as a JQuery Charting library and i want to implement a chart, that keeps refreshing itself via AJAX.

I get the data for the chart via JSON from my backing bean.

I am lost on how to get new data from a backing bean into a javascript variable. From what i understand i can’t use <f:ajax> since there is no user interaction and no use of html input elements.

I think the solution would be the use of jsf.ajax.request. But i don’t understand how to call that without an input-element either.

Following is a code snipped of how it should look like, but i don’t know how to get the value from my backing bean into a javascript variable.

$(function() {
function update(){
    //**dont know how this call should look like**
    jsf.ajax.request('dev-form-input1', {render:'dev-form-output1'});
    //'newAjaxData' would be the value from #{someBean.chartData}
    plot.setData(newAjaxData);
    // draw the chart with the new data
    plot.draw();
    //get an update every second
    setTimeout(update, 1000);
}

I managed to send AJAX requests with jsf.ajax.request when using some input-element, but i didnt get the new value to render. And even if i could i wouldnt know hot to get it in a javascript variable (i dont have a lot of experience with javascript).

<h:form id="dev-form">
<h:inputText id="input1" value="#{someBean.chartData}"/>
<h:outputText id="output1" value="#{someBean.chartData}" />
</h:form>

note: i changed the javax.faces.SEPARATOR_CHAR to “-“, because i need “:” for jquery.

Thanks for your help!

  • 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-08T21:49:30+00:00Added an answer on June 8, 2026 at 9:49 pm

    JSF is the wrong tool for the job. Use a webservice framework like JAX-RS, not a MVC framework like JSF. Then you can in the client end just use jQuery the usual way and so on.

    See also:

    • Jersey (JAX-RS reference implementation) tutorial
    • Servlet vs RESTful
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Richfaces JSF and I want to iterate over an Map<Object,Object> . I
I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have
I'm using JSF 1.2 with Richfaces, and for every ajax request, the server is
I'm implementing file uploading using Richfaces version 4.0. I've noticed, that there is quite
I want to render using Richfaces a context menu on left click on a
I'm new to richfaces and I want to support a bean class using annotation
I want to perform the following task using JSF / Richfaces On click of
I've got a login form that looks something like this, using RichFaces and Seam:
I want to render 6 blocks on a page asynchronously using richfaces a4j support.
Using Richfaces 3.3.0GA, jsf 1.2_14 and facelets. I have a richfaces ModalPanel with an

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.