• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Getting the submitted form name

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to get the submitted form name in JSF. I was thinking that it would be stored somewhere in Faces Context. I'm pretty sure that its not in the HTTPServletRequest object in Faces Context. It's important for me to get the name of the form that is submitted.

Saloon Keeper
Posts: 22483
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, in my experience, questions like that usually indicate you're trying to solve some other problem. And it's just possible that brute-force access to the underlying HTML form name might not be the most graceful solution to that outer problem when you're using JSF. So it would be good if you could tell us more about what you want to accomplish and why, as opposed to jumping right into "how".

As far as the "how" goes, the digested JSF view is in a tree structure anchored by the ViewRoot and there are various accessor methods that allow running up and down the View. But stuff like that I don't do very often and I've been doing JSF for a long time. There's usually a simpler, more portable solution.
    Bookmark Topic Watch Topic
  • New Topic