Thanks for the info.  Checking the client-side generated ids was
actually the first thing I tried, and for some reason, it's still not
working as expected.  That could very well be a problem with my
javascript, and I won't ask anyone to debug that for me -- I'll take
care of it :)  My only problem now is how to check the "checked" status
of the boolean checkbox from within the script.

Thanks,
Taylor
 

-----Original Message-----
From: Jeff Bischoff [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 10, 2006 12:22 PM
To: MyFaces Discussion
Subject: Re: JSF + Javascript question

Nebinger, David wrote:
 > Obviously there would be other ways to skin this cat, but it should
all work just fine...

He's right. If you use the right client-side id, it should work. 
However, client ids in JSF can get real messy. I would highly recommend
the other ways. (to skin the cat - it makes some great soup!)

For example, you can use the "disabled" and "rendered" attributes on JSF
components to control their status. If you do not want to submit the
entire form, there are several ways around that: e.g. s:subForm or AJAX
frameworks like Ajax4jsf.

But if you're determined to stick with quick & dirty (hey so was I, when
I first started using JSF), you will need to be aware of those client
ids.

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.


Nebinger, David wrote:
> Without info re: falling flat, my guess is you're not accommodating
the real ID of the control on the HTML side.  Your javascript will
probably work just fine if you a) pass the real id (effectively the
client id on the JSF side), or b) iterate through the controls looking
for a control with the id that ends with your logically-assigned id.
Obviously there would be other ways to skin this cat, but it should all
work just fine...
> 
> -----Original Message-----
> From: Fraley, Taylor [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 10, 2006 2:01 PM
> To: MyFaces Discussion
> Subject: JSF + Javascript question
> 
> 
> Does anyone know a quick and dirty way to disable a set of JSF form
elements based on the checked status of a h:selectBooleanCheckbox?  I
have some Javascript that works great when using normal HTML elements,
but falls flat when I'm using faces.
>  
> Thanks,
> Taylor
>  
> 
> 


Reply via email to