myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: Best way of getting a Form Name through JSF way
Date Mon, 30 Oct 2006 16:07:27 GMT
The form name is the same as the form ID. From a control, simply surf
the parents until you get to the form control and then get the ID:

String formId = null;
for (UIComponent parent = comp.getParent(); parent != null; parent =
parent.getParent())
{
  if (parent instanceof HtmlForm)
  {
    formId = parent.getId();
    break;
  }
}





On 10/29/06, Chandra Sekhar <svr.chandrasekhar@lasersoft.co.in> wrote:
> Hi Experts,
>
>          I need a solution regarding,the JSF way of getting a Form name and
> display it on the header while loading a JSF page .
>
> Thanks & Regards,
> Chandra Sekhar.
>

Mime
View raw message