jsf - Update Primefaces selectOneMenu from JavaScript -


i have jsf form, contains javascript. when specific input changes value >= 10 selectonemenu needs dynamically change option (which yes or no).

my jquery:

if ($("input[id*='inputbox']").val() >= 10) {     $("select[id*='selectonemenu']").val("no");     } else {     $("select[id*='selectonemenu']").val("yes"); } 

when debug, value in selectonemenu changed correctly, ui component doesn't change option. how tell selectonemenu update rendered value?

primefaces selectonemenu not trivial select tag, collection of divs put make select tag, use widgetvar.selectvalue(val);

select tag hidden inside visible ui parts that's why not working you.


Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -