Hello everyone,
I am relatively new in using
Primefaces and I have created UI, which I feed with data which I get
from my database.
I have created a
java service (
MyArticlesService) and I have programmed a method which gets the
id of
a
div in order to get the data from the database.
In the
onclick event of my
div I make the call to the method (
getSelectedProduct) which
exists in my service (
MyArticlesService) and I try to pass the
id of the
div which was clicked, by
using javascript (
this.id). See code excerpt below:
in onclick event:
I make a java call to the method
getSelectedProduct and I try to pass the "
this.id" javascript value as
parameter.
I face though the following problem:
javascript in not recognized as javascript but it is manipulated as Java code.
The question is:
How can I pass a javascript value/parameter as a parameter to a Java method?
In case you have any ideas or an answer, I would really appreciate your feedback.
Thank you in advance :)