Re: t:selectManyCheckbox - Make Checkbox label a link
Here is one solution:Write a custom renderer. In that renderer, make a parent component with two temporal child components. First child: select one checkbox. Second child: output link. On the rendering of the checkbox, record it's client ID in a variable. On rendering of the output link, add a _javascript_: getElementById('+checkboxId +').value = !getElementById('+checkboxId +').value; as the URL of the link. This will toggle the value of the checkbox. Doing it as a custom component and a renderer you will have access to the client ID of the checkbox. Another alternative is to use forceId and just hand-code the output:scriptfunction toggleCheckbox(elemId) {var elem = document.getElementById(elemId)elem.value = !elem.value}/scriptt:selectBooleanCheckBox id=mycheckbox forceId=true .../t:outputLink url="" toggleCheckbox('mycheckbox') / There are other solutions and variations, but this should work for you. Depends on how much work you want to do to make it nice. Sounds like a good idea for a sandbox component to me (if only I had the time...) -AndrewOn 5/3/06, fischman_98 [EMAIL PROTECTED] wrote: Anyone know how to make the itemLabel of a SelectItem a href? I'd like to produce a checkbox that looks like this: COLUMBIA RIVER (WASHINGTON) SUN CLOUDS View this message in context: t:selectManyCheckbox - Make Checkbox label a link Sent from the MyFaces - Users forum at Nabble.com.
Re: t:selectManyCheckbox - Make Checkbox label a link
Maybe you could work with Yasushi on this.-- Forwarded message --From: Mike Kienenberger [EMAIL PROTECTED]Date: May 4, 2006 11:31 AMSubject: Re: question for t:selectOneRadio : how to add other components besides f:selectItem To: MyFaces Discussion users@myfaces.apache.orgOn 5/3/06, Yasushi Okubo [EMAIL PROTECTED] wrote: I would like to add other components like outputtext, panelGrid etc inside t:selectOneRadio besides f:selectItem, but it seems it does not work. Is there any way to achieve this ?There have been a number of people asking how to do various things (images, outputLinks, etc) inside f:selectItem.Perhaps you could submit a patch to t:select* components that supportsa t:selectItem which could contain a component to use as a renderer?Maybe as a facet or simply anything enclosed by t:selectItem?
t:selectManyCheckbox - Make Checkbox label a link
Anyone know how to make the itemLabel of a SelectItem a href? I'd like to produce a checkbox that looks like this: COLUMBIA RIVER (WASHINGTON) SUN CLOUDS View this message in context: t:selectManyCheckbox - Make Checkbox label a link Sent from the MyFaces - Users forum at Nabble.com.