You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andrew Robinson <an...@gmail.com> on 2006/10/30 17:07:27 UTC
Re: Best way of getting a Form Name through JSF way
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 <sv...@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.
>