• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

jQuery find h:selectOneMenu component

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

how can I find the JSF <h:selectOneMenu> component using by jquery methods?
I can find <h:inputText styleClass="input"> only:
Any advice? Thank you
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Duplicate of https://coderanch.com/t/537007/JSF/java/jQuery-find-selectOneMenu-component

Joe, can you avoid posting the same message more than once? Thanks. Just pick what you think is the most appropriate forum and stick with it. Otherwise we might get people trying to help you out duplicating work that's already been done.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm unlocking this as it is the more appropriate forum for this question. And I am locking the JSF thread. And yes, please do NOT post the same question more than once.

There is more than one way:



Also, JSF should give all your element an ID that you could use to find it. You might just need to inspect the source. I know that JSF prefixes ID's with junk. Just don't remember what that junk is. Also, you could simply give your SELECT element a class, and reference it that way.
 
Joe Shannow
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I wasn't sure where to put it, thanks

I've tried but it doesn't work.

I've add those components styleClass="input"
but my jQuery method to redirect ENTER to TAB key doesn't focus to selectOneMenu (when it step on it) and instead of focus it submits the button



 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to respectfully disagree with Gregg and move this to the JSF forum. Examples with JSF markup will only makes sense to the JSF-savvy and to no one else.
 
Oh. Hi guys! Look at this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic