Search code examples
jsfjsf-2primefacesphoto-tagging

Is there any JSF or Primefaces Photo tagger component?


Is there any built-in component for facebook like photo-tagging in JSF(Preferably in Primefaces). Or will it be in near future? I have googled a lot but found nothing -- I found a lot of jQuery photo taggers, but I am not good at jQuery, I am unable to submit tag values to the JSF in jQuery.


Solution

  • Well you could use the jQuery-photo-tagger (believe me, it's worth looking into jQuery) and use the PrimeFaces Ajax-API to make your ajax-calls. The basic functionality is:

    PrimeFaces.ajax.AjaxRequest(url, config, parameters);
    

    A little more complex example would be:

    PrimeFaces.ajax.AjaxRequest(‘/myapp/createUser.jsf’,
    {
    formId:’userForm’,
    ,source:’userForm’
    ,process:’userForm’
    ,update:’msgs’
    oncomplete:function(xhr, status) {alert(‘Done’);}   
    },
    {
    ‘param_name1’:’value1’,
    ‘param_name2’:’value2’
    }
    );
    

    For more information you can have a look at the User Guide: http://primefaces.org/documentation.html (starting from page 420)