This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

richfaces: javascript function to read the current value of a bean property??

 
kirk israel
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(this might be a sneaky way of asking a different question about datascrollers...)

Say I have a binding like
#{dataModel.curPage}

Is there some kind of ajax call I could make from javascript to get the current value of that element?

Something where I could go like

var currentPage = SomeFunction("dataModel.curPage"};
alert("current page is "+currentPage);

but the SomeFunction would of course have to have some kind of communication with the server?

Is this a very typical "binding" activity, or does binding refer only to tying in the controls to the values statically, so to speak?
 
kirk israel
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any thoughts on this?

Is it that silly of a question?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17627
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd need to formulate it as an AJAX query. JavaScript runs on the client (browser). The backing beans live in the server. So the client will have to query the server to get the bean value.
 
kirk israel
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, yes, I understand that it would have to be an AJAX query...
my question is, is there some kind of javascript/AJAX library API call already there that I could use for this?
 
John teras
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
xfvnxb xb x
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic