Quick skim through the prime faces cookbook
Posted: 25 Feb 2019, 13:00
I have a quick skim through the primefaces cookbook but I still do not quite understand how to use p:component. Maybe, I am blind or stupid. Do you mind giving me a simple example how to use it.
Let use the case in the DynaForm example, and use the "basic usage" example which has "Author" and "ISBN" as input text field. Assume that when the form get generated these two fields will be rendered but they can appear in any order and in any row, i.e. you do not know where they are. And assume that I need to perform a javascript that need to access the content of both "Author" and "ISBN" for processing when the user presss the "Submit" button.
My question is how to I write a javascript to access the content of "Author" and "ISBN" since I do not know what their ids before build time since they can be anywhere and this will affect the ids being generated. Sorry, might be a simple question, I am weak in Javascripts.
Thanks
Let use the case in the DynaForm example, and use the "basic usage" example which has "Author" and "ISBN" as input text field. Assume that when the form get generated these two fields will be rendered but they can appear in any order and in any row, i.e. you do not know where they are. And assume that I need to perform a javascript that need to access the content of both "Author" and "ISBN" for processing when the user presss the "Submit" button.
My question is how to I write a javascript to access the content of "Author" and "ISBN" since I do not know what their ids before build time since they can be anywhere and this will affect the ids being generated. Sorry, might be a simple question, I am weak in Javascripts.
Thanks