autoSubmit is the legit way of doing this - was
it purely the delay that was at issue in the usability
review?

The issue you're confronting - which would affect
h:inputText too, FWIW - is that the server-side control
still thinks it's disabled, and will until Update Model when
#{data.enabled} gets pushed.  To bypass that, you could
have a PhaseListener that runs pre-ApplyRequestValues
and explicitly calls setDisabled(false) on the control.

-- Adam


On 5/25/06, Frank Felix Debatin <[EMAIL PROTECTED]> wrote:

I have something like:

<af:selectCheckBox value="#{data.enabled}"/>
...
<af:inputText id="text" disabled="#{data.enabled}"
value="#{data.text}"/>

If the user checks the check box, the text field should be
enabled respectively disabled. So far, I used autoSubmit,
which worked, but is somehow clumsy and fell through in our
usability review.

I replaced this with some client-side Javascript,
onclick = "
        x = document.getElementById('text');
      x.disable = (this.value==1);
        x.className = ...;"

Unfortunately, it seems that fields that have been disabled
on server-side, cannot be reenabled on client-side: the
input text just doesn't submit any value!

What could I do? Maybe there is something like:

         adf_enable_input_text('text', true)

Frank Felix





Reply via email to