ValuechangeListener with autoSubmit

i have a requirement where a state dropdown populates the city. so i used autosubmit on the statedropdown & a valuechangeListener to refersh the city dropdown using partial triggers, since i want my values on the client side i have used the valuepassthru on the state dropdown but this prevents my valluechange listener from being called.

If i set the valuepassthru attibute to false the valuechange listener is called but i need the valuepassthru to be set to true to access the value at client side javascript.

My binded object on the state is a string and the options are list of selectItems so i thought this could be a issue and used a custome converter but that didnt work either

Any thoughts on what could be reason for not triggering the valuechangelistener with autosubmit and valuepassthrough=true? any help on this is highly appreciated

I am using trinidad componets for the dropdown and Jsf1.1 thanks


Do you only need the selected value, or do you need to access all values? If you only need the selected value you can add some Javascript in your bean's value change listener:

FacesContext context = FacesContext.getCurrentInstance();
ExtendedRenderKitService erks = Service.getRenderKitService(
, ExtendedRenderKitService.class
String jsValue = StringEscapeUtils.escapeJavaScript(value);
erks.addScript(context, "alert('"+ jsValue +"');");

Need Your Help

How to create a uniqule field in database mysql

mysql database

I'm db beginner and i'm trying to write scrit which creates database, i want a field of chars to be unique is there any keyword in MYSQL which will guarantee that my field will be unique ?

Could not load a file or assembly SMDiagnostics.dll

c# .net visual-studio-2010 .net-4.0 .net-3.5

I´m trying to build my c# .NET solution containing 18 projects. Out of the blue I´m receiving an odd error message for one of my projects (the web gui).