Dear fellows,

I am getting a strange problem, I have a form for adding a new hotel in db. I 
have two selectOneMenu in my forms. 
1. country
2. states

when the value of country is selected, i use seam remoting to get the states of 
that country and populate in my second list states. And i submit the form, 
untill here there are no problems.

but when i submit the form get a validation message for the states list box, 
"value is not valid". I dont know why it is giving it. Here is some description 
of my code in javascript.

function loadCountryStates(){
  | 
  |     var str = document.getElementById('hotelform:country').value;
  |     HotelsAction.getCountryStatesList(str,getStatesCallback);
  | 
  | }     
  |     
  | function getStatesCallback(result){
  |             clearStatesList();
  | 
  |             var resLen = result.length;
  |             
  |             for(var i=0; i < resLen ; i ++){
  | 
  |                     var codeName = result;
  |                     var code = codeName[0];
  |                     var name = codeName[1];
  |                     
  |                     var states = document.getElementById('hotelform:state');
  |                                     
  |                     newOpt = document.createElement('option');
  |                     newOpt.value = code;
  |                     newOpt.text  = name;
  |                     
  |                     try {
  |                         states.add(newOpt, null); // standards compliant; 
doesn't work in IE
  |                      }catch(ex) {
  |                         states.add(newOpt); // IE only
  |                      }
  |             }
  |     }
  | 
THis is the way i am populating my list and it give following error on the 
console output 

anonymous wrote : 17:47:37,468 ERROR [NavigationMenuUtils] Invalid child with 
id _id2of component with id : nav_3 : must be UINavigationMenuItem or 
UINavigationMenuItems, is of type : com.sun.facelets.compiler.UIInstructions

Can any one help me thanx in advance

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045282#4045282

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045282
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to