You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "H. Swaczinna" <sw...@wlp-systems.de> on 2006/12/06 00:58:34 UTC

[Tobago] no onchange for tc:selectBooleanCheckbox

Hello,

the onchange attribute of the tc:selectBooleanCheckbox is not rendered
into the HTML code.

Example:

JSP <tc:selectBooleanCheckbox label="Test" onchange="javascript:alert('Hello');"/>

HTML <input type="checkbox" value="true" name="gena:_idJsp0" class="tobago-selectBooleanCheckbox-default " id="gena:_idJsp0">

And the valueChangeListener isn't called also, because there's no
onChange generated.

I'm using snapshot 1.0.9 form yesterday night.

Regards
Helmut

Antwort: [Tobago] no onchange for tc:selectBooleanCheckbox

Posted by Ad...@nordlb-it.de.
Hello Helmut,

you can use instead of the onchange attribute the change facet:

<tc:selectBooleanCheckbox label="Test" />
        <f:facet name="change">
                <tc:command action="#{myForm.doChange}" />
        </f:facet>
</tc:selectBooleanCheckbox>



kind regards

Adam A. Henne


"H. Swaczinna" <sw...@wlp-systems.de> schrieb am 06.12.2006 00:58:34:

> Hello,
> 
> the onchange attribute of the tc:selectBooleanCheckbox is not rendered
> into the HTML code.
> 
> Example:
> 
> JSP <tc:selectBooleanCheckbox label="Test" 
onchange="javascript:alert('Hello')
> ;"/>
> 
> HTML <input type="checkbox" value="true" name="gena:_idJsp0" 
> class="tobago-selectBooleanCheckbox-default " id="gena:_idJsp0">
> 
> And the valueChangeListener isn't called also, because there's no
> onChange generated.
> 
> I'm using snapshot 1.0.9 form yesterday night.
> 
> Regards
> Helmut