-
1. Re: Rendering/Disabling/Enabling components based on other c
trouby Dec 28, 2007 2:04 PM (in response to trouby)Hey,
Well I guess this can easily achieved by using the 'support' tag of RF,
The problem is that if components affects others in a big form will only work if the form is correctly validated, otherwise JSF bypass the update model phase,
And immediate=true bypass update model phase too,
So in big forms where the form is not yet filled up, how can I skip validation but still update model phase?
Myfaces has subForms which I think can help here,
Is there any way to achieve this with RF?
Thanks,
Asaf. -
2. Re: Rendering/Disabling/Enabling components based on other c
fabmars Dec 28, 2007 5:41 PM (in response to trouby)Question 1)
Yes, this is pretty common in JSF. Just use some managed beans to set your submitted values and some EL expressions to provide a test in any rendered attibute you want. Use that with some A4J support tags and you're good.
Question 2)
Use the ajaxSingle attribute of most A4J/RichFaces components. You will bypass the whole form submission and perform only a partial submit, BUT you will pass thru the validation (only of what you're submitting) anyway.
My advice is you check the online RF demo with galore souce examples. -
3. Re: Rendering/Disabling/Enabling components based on other c
trouby Dec 28, 2007 7:32 PM (in response to trouby)Yap,
'ajaxSingle' looks good for me (missed it somehow),
Thanks FAbmars,
Asaf. -
4. Re: Rendering/Disabling/Enabling components based on other c
sergeysmirnov Dec 28, 2007 8:08 PM (in response to trouby)"trouby" wrote:
Myfaces has subForms which I think can help here,
Is there any way to achieve this with RF?
a4j:region is an analog for subform when we speak about the ajax request. It allows to process only the form element inside the a4j:region and ignore the outer data.
ajaxSingle does the same, but for one particular form element. -
5. Re: Rendering/Disabling/Enabling components based on other c
valatharv Oct 25, 2008 11:24 AM (in response to trouby)Hi,
I this is best place you can help, please suggest me on the following..
I have form field (h:inputText) which is disabled when the page loads.
Is there nice way just to enable h:inputText when user clicks "Edit This" link(it can be button also).
I don't want to use Javascript.........
<s:link value="Edit This" id="edit">
<s:decorate template="layout/edit.xhtml">
<h:inputText id="name" required="true" value="Test enable" disabled="true"/>
</s:decorate>