user1595858
user1595858

Reputation: 3878

Primefaces UI component need to get value from jQuery instead of getting it from the server(managed bean)

I want to know if there is way that primefaces UI can use the value from jQuery. For example, i have placed array of values into 'imgArray' now i want to display it in p:datalist.

jQuery

$.getJSON("http://xxxx?url="+ url,function(data){
    var imageArray=[];
    imageArray=data.images;
      $("formId:dataTable).html(imageArray);

UI

<p:datalist id="dataTable" value= />

Upvotes: 0

Views: 429

Answers (1)

siebz0r
siebz0r

Reputation: 20329

I believe that this is not possible. The JSF page is rendered server side. The values must refer to an element collection.

Use a Java based solution to create a collection of the supplied JSON.

Upvotes: 1

Related Questions