Hi all,
I'm absolutely new to JSF and find it very hard to get a good
documentation for specific problems. Maybe you can help me with this
little problem. I want to use a checkbox and a inputText. When I
activate the checkbox, the inputText shall be enabled so that i can
write something in it. If I uncheck the checkbox the inputFile shall be
grey again. So far, I only have
<h:selectBooleanCheckbox id="checkbox1" value="#{user.toggleFileUsage}"/>
<h:inputText id="inputFile" disabled="#{user.fileUsed}" value="Type your
text here" />
and the bean user:
public class User {
private boolean fileUsed = false;
public void toggleFileUsage() {
fileUsed = !fileUsed;
}
public boolean isFileUsed() {
return fileUsed;
}
public void setFileUsed(boolean fileUsed) {
this.fileUsed = fileUsed;
}
}
However, this doesn't work. I also tried a little with bindings and
Listeners, but didn't really know how to use them. As I said, I don't
find any good documentation or tutorial for this.
All the best
Philipp