Philipp,
Which JSF libraries are you using? What you are trying to do can easily be
done with Trinidad. Just add the partialTriggers attribute to your
tr:inputText with a value of "checkbox1" and add an autoSubmit attribute to
your checkbox with a value of "true".
When posting to the mailing list, you can get better response to your email
for the different libraries by putting "[Trinidad]", "[MyFaces]", or
"[Tobago]" in the subject line.
-Richard
On Jan 14, 2008 12:13 PM, Philipp Daumke <[EMAIL PROTECTED]> wrote:
> 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
>
>
>
>
>
>