This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have two pages. in main page user selects SelectOneMenu and x:inputCalendar date. From there he goes to second page. In second page also I am showing these two components. But I dont want user to change them.
Is there any way to only display them instead of changing?
Thanks in advance, Yamini
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
posted
0
Originally posted by yamini nadella: I have two pages. in main page user selects SelectOneMenu and x:inputCalendar date. From there he goes to second page. In second page also I am showing these two components. But I dont want user to change them.
Is there any way to only display them instead of changing?
Write the value on the page, use hidden fields to carry the ID. Or just make the component readonly.
Moreover, JSF takes readonly as disabled. Thus, it may not work. If you want to do this then you need to extend the SelectOneMenu and modify as you like.
The key is to use appropriate components for appropriate behavior. If you just need to display a static choice someone made from a dropdown then it seems to me using a selectOneMenu component isn't the right choice. Why not just use an outputLabel or outputText component to display the value from the backing bean?