Jsf Render Component Ajax Radio Button Selection
This Question is a follow up to JSF Primefaces Radio Button show/hide/enable a textarea One of the two problems were solved from that Post by wrapping the inputTextArea in a panel
Solution 1:
Well the real answer is to not have the value at 2 when the bean is loaded if you want to not display it. But you already know that. What you are asking is subjective to you and how you wanna do things. You have no issue and this is more a design question. Having said that here is one:
Maybe you'd like to have 2 conditions :
<h:inputTextarea value="#{qAndA.fail_reason}" rendered="#{qAndA.toggle_value == '2'and bean.AnotherCondition}" />
If you wanna get fancy make a @ViewScoped bean that listen for the click you were talking about in your post ( not sure what the click does). Listen for the click and have a boolean property you can set to true once the click has been registered (maybe with an action listener). This way the textarea will only show when clicked.
Post a Comment for "Jsf Render Component Ajax Radio Button Selection"