you could use a visitor:
form.visitChildren(new Component.IVisitor()
{
public Object component(Component component)
{
if (component instanceof FormComponent)
{
FormComponent formComponent = (FormComponent)
component;
if (!formComponent.isRequired())
{
// do something
}
}
return component;
}
});
2009/6/4 Eyal Golan <[email protected]>
> Hi,
> What is the best way to check if there are any required fields in a page?
> I want a page that checks for these fields and do something accordingly.
>
> Thanks,
>
> Eyal Golan
> [email protected]
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P Save a tree. Please don't print this e-mail unless it's really necessary
>