Click here to Skip to main content
15,887,370 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
I used java and jsf.
I created dynamic datatable in java file.
can i call java method from setOnchange() event?

I am able to call java script function from setOnchange() event.
see the below code which is working fine for java script.

HtmlSelectOneMenu selectOneMenu = new HtmlSelectOneMenu();
selectOneMenu.setStyleClass("dropdownStyleTwo");
selectOneMenu.setOnchange("openWin(this);IGNORE_UNLOAD=false");


i wrote openwin() function in java script.

but i am not able to call java method change().
code which is not working.
HtmlSelectOneMenu selectOneMenu = new HtmlSelectOneMenu();
selectOneMenu.setStyleClass("dropdownStyleTwo");
selectOneMenu.setOnchange("myclass.change();IGNORE_UNLOAD=false");


myclass is the bean of class Test.
If user select any value from dropdown i want to call change java method.
This function will apply the same selected dropdown value to the other record also.
Posted
Updated 4-Mar-14 2:13am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900