This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Could you explain what you plan to do with the hidden field?
JSF is designed in such a fashion that directly saving and manipulating hidden fields is often unnecessary. The state of a component is automatically saved on the server, or automatically saved in a hidden field if you specify the state saving strategy as "client".
If you explain what you need it for, I might be able to give you a couple of options that will be easier.
Joined: Jul 15, 2006
I am studying the feasibility of implementing an exam engine on JSF instead of developing using pure servlets and jsps.
For example, the add multiple choice question allow the user to specify question text in a text field and possible choices.
I imagine the page containing a text field for question and an add choice button that when the user clicks will add to the page a row containing text field (for choice text) and check box for whether this is a correct choice or not.
Can such a page be created in JSF and what is the approach or components used in creating it ??
Any ideas on how such a page can be implemented in JSF ??
Hi, I am facing similar situation. I have a hidden field for storing label, on which table needs to sorted. Sorting is taken care in DB calls. Based on the value of hidden field, i want to switch queries.
Joined: Jul 15, 2006
I have written a custom converter class that can save any serializable object into a hidden field.
The idea is to convert the binary representation of a Java object to base64 and vice versa.
Here is the code :
After you compile this class and include it in your project class path, you add an entry to this converter in the faces-confing.xml file like the following :
And finllay in the JSF page, you have the following :
For the base64 libraries used in the converter, they can be download from the below URL :