Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: /index.xhtml @30,146 <f:ajax> 'valueChange' is not a supported event for HtmlForm. Please specify one of: click, dblclick, keydown, etc

Tags:

jsf

primefaces

I have code here that works correctly:

<h:selectOneMenu value="#{customer.selectedname}" id="ulist">
                        <f:selectItems value="#{customer.allCustomers}"/>
                        <f:ajax event="change" render="cid fname lname email sd" listener="#{customer.fullInfo}"/>
                    </h:selectOneMenu>

But, when I implement it in different project, it is not working. below is the code:

<td><h:outputLabel value="No Polisi:"/></td>
                            <td><h:inputText value="#{motor.VNOPOL}" id="VNOPOL"/></td>
                         <f:ajax event="valueChange" render="VIDPROSPEK VFRAMENUM VENGINENUM VTHNPROD NKMSERVICE " listener="#{motor.fullInfo}"/>

I got an error:

/index.xhtml @30,146 'valueChange' is not a supported event for HtmlForm. Please specify one of these supported event names: click, dblclick, keydown, keypress, keyup, mousedown, mousemove, mouseout, mouseover, mouseup.

What should I implement to show all info after my input in VNOPOL ?

like image 318
Veni Manurung Avatar asked Dec 20 '25 20:12

Veni Manurung


1 Answers

JSF ajax supports only for JSF components, you have not enclosed <f:ajax> inside the component

you should change your code as below

<td>
   <h:inputText value="#{motor.VNOPOL}" id="VNOPOL">
       <f:ajax event="your event" render="your elements" listener="your listener"/>
   </h:inputText>
</td>

Note that the <f:ajax> now inside <h:inputText>

like image 132
rashidnk Avatar answered Dec 24 '25 09:12

rashidnk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!