Hi,

I have modified a xhtml task form generated by the Graphical designer plugin in 
order to add a combobox component:


  |       <h:selectOneMenu onchange="updateTopic(this);" id="topicCombo" 
value="#{ChooseTopicBean.value}" styleClass="combobox">
  |    value="#{ChooseTopicBean.items}"/>
  |       </h:selectOneMenu>
  |     </jbpm:datacell>
  | 

and defined apart a JS function called "updateTopic(ref)" which try to change 
the value of another jsf component when select any of the combobox's options, 
that is:


  | <h:inputText id="inputTopic" value="#{var['topic']}" />
  | 

I don't know how to reference the inputText from my JavaScript function since 
I've seen from the generated HTML page parsed by the browser that the 
components/forms IDs are generated dynamically:


  | <input id="j_id197:inputTopic" type="text" name="j_id197:inputTopic" />
  | 

So, I'll get an error if I try to reference as 
"document.getComponentById('inputTopic')".

Where is the "j_id197" id name coming from? Is there any other way to reference 
jsf components from Javascript?

Thanks in advance.

Cheers. 

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

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

Reply via email to